Index: src/IceGlobalContext.h |
diff --git a/src/IceGlobalContext.h b/src/IceGlobalContext.h |
index cc5da5800ca604f71a239924966a5e8e014679bc..026cb7f017b0ebe918d7c76c3417d5c4331bdd03 100644 |
--- a/src/IceGlobalContext.h |
+++ b/src/IceGlobalContext.h |
@@ -21,6 +21,7 @@ |
#include "llvm/Support/raw_ostream.h" |
#include "IceDefs.h" |
+#include "IceClFlags.h" |
#include "IceIntrinsics.h" |
#include "IceRNG.h" |
#include "IceTimerTree.h" |
@@ -29,6 +30,7 @@ |
namespace Ice { |
class ClFlags; |
+class FuncSigType; |
// This class collects rudimentary statistics during translation. |
class CodeStats { |
@@ -117,6 +119,17 @@ public: |
// getConstantPool() returns a copy of the constant pool for |
// constants of a given type. |
ConstantList getConstantPool(Type Ty) const; |
+ // Returns a new function declaration, allocated in an internal |
+ // memory pool. Ownership of the function is maintained by this |
+ // class instance. |
+ FunctionDeclaration *newFunctionDeclaration(const FuncSigType *Signature, |
+ unsigned CallingConv, |
+ unsigned Linkage, bool IsProto); |
+ |
+ // Returns a new global variable declaration, allocated in an |
+ // internal memory pool. Ownership of the function is maintained by |
+ // this class instance. |
+ VariableDeclaration *newVariableDeclaration(); |
const ClFlags &getFlags() const { return Flags; } |
@@ -186,6 +199,7 @@ private: |
CodeStats StatsFunction; |
CodeStats StatsCumulative; |
std::vector<TimerStack> Timers; |
+ std::vector<GlobalDeclaration *> GlobalDeclarations; |
GlobalContext(const GlobalContext &) = delete; |
GlobalContext &operator=(const GlobalContext &) = delete; |