summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index 151cb33d67c..11272fc2cae 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -298,6 +298,7 @@ class CodeGenModule : public CodeGenTypeCache {
/// forcing visibility of symbols which may otherwise be optimized
/// out.
std::vector<llvm::WeakVH> LLVMUsed;
+ std::vector<llvm::WeakVH> LLVMCompilerUsed;
/// GlobalCtors - Store the list of global constructors and their respective
/// priorities to be emitted when the translation unit is complete.
@@ -799,10 +800,11 @@ public:
template<typename SomeDecl>
void MaybeHandleStaticInExternC(const SomeDecl *D, llvm::GlobalValue *GV);
- /// AddUsedGlobal - Add a global which should be forced to be
- /// present in the object file; these are emitted to the llvm.used
- /// metadata global.
- void AddUsedGlobal(llvm::GlobalValue *GV);
+ /// Add a global to a list to be added to the llvm.used metadata.
+ void addUsedGlobal(llvm::GlobalValue *GV);
+
+ /// Add a global to a list to be added to the llvm.compiler.used metadata.
+ void addCompilerUsedGlobal(llvm::GlobalValue *GV);
/// AddCXXDtorEntry - Add a destructor and object to add to the C++ global
/// destructor function.
@@ -1104,9 +1106,8 @@ private:
/// still have a use for.
void EmitDeferredVTables();
- /// EmitLLVMUsed - Emit the llvm.used metadata used to force
- /// references to global which may otherwise be optimized out.
- void EmitLLVMUsed();
+ /// Emit the llvm.used and llvm.compiler.used metadata.
+ void emitLLVMUsed();
/// \brief Emit the link options introduced by imported modules.
void EmitModuleLinkOptions();
OpenPOWER on IntegriCloud