summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorKeno Fischer <kfischer@college.harvard.edu>2014-12-30 08:12:39 +0000
committerKeno Fischer <kfischer@college.harvard.edu>2014-12-30 08:12:39 +0000
commit76f4ab067d7416b4c726d022ae81429d78aa8a10 (patch)
tree176df4f9390d912f49823c43fa6682c588c7927b /clang/lib/CodeGen/CodeGenModule.h
parent4750dd18ea1bc8b3902474de8ad1576cc8e644a9 (diff)
downloadbcm5719-llvm-76f4ab067d7416b4c726d022ae81429d78aa8a10.tar.gz
bcm5719-llvm-76f4ab067d7416b4c726d022ae81429d78aa8a10.zip
Add a public accessor for GlobalCtors in CodeGenModule
Summary: In a JIT context it is useful to be able to access the GlobalCtors and especially clear them once they have been emitted and called. This adds a public method to be able to access the list. Subscribers: yaron.keren, cfe-commits Differential Revision: http://reviews.llvm.org/D6790 llvm-svn: 224982
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index 0dff5fe94c8..619356a70a4 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -261,6 +261,7 @@ class CodeGenModule : public CodeGenTypeCache {
CodeGenModule(const CodeGenModule &) LLVM_DELETED_FUNCTION;
void operator=(const CodeGenModule &) LLVM_DELETED_FUNCTION;
+public:
struct Structor {
Structor() : Priority(0), Initializer(nullptr), AssociatedData(nullptr) {}
Structor(int Priority, llvm::Constant *Initializer,
@@ -274,6 +275,7 @@ class CodeGenModule : public CodeGenTypeCache {
typedef std::vector<Structor> CtorList;
+private:
ASTContext &Context;
const LangOptions &LangOpts;
const CodeGenOptions &CodeGenOpts;
@@ -624,6 +626,9 @@ public:
return VTables.getMicrosoftVTableContext();
}
+ CtorList &getGlobalCtors() { return GlobalCtors; }
+ CtorList &getGlobalDtors() { return GlobalDtors; }
+
llvm::MDNode *getTBAAInfo(QualType QTy);
llvm::MDNode *getTBAAInfoForVTablePtr();
llvm::MDNode *getTBAAStructInfo(QualType QTy);
OpenPOWER on IntegriCloud