diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2013-12-22 00:04:03 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2013-12-22 00:04:03 +0000 |
commit | f8af5cf600354830d4ccf59732403f0f073eccb9 (patch) | |
tree | 2ba0398b4c42ad4f55561327538044fd2c925a8b /include/llvm/Transforms/Utils/ModuleUtils.h | |
parent | 59d6cff90eecf31cb3dd860c4e786674cfdd42eb (diff) |
Diffstat (limited to 'include/llvm/Transforms/Utils/ModuleUtils.h')
-rw-r--r-- | include/llvm/Transforms/Utils/ModuleUtils.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Utils/ModuleUtils.h b/include/llvm/Transforms/Utils/ModuleUtils.h index bb7fc06bf5307..98a19ed426ace 100644 --- a/include/llvm/Transforms/Utils/ModuleUtils.h +++ b/include/llvm/Transforms/Utils/ModuleUtils.h @@ -18,6 +18,9 @@ namespace llvm { class Module; class Function; +class GlobalValue; +class GlobalVariable; +template <class PtrType, unsigned SmallSize> class SmallPtrSet; /// Append F to the list of global ctors of module M with the given Priority. /// This wraps the function in the appropriate structure and stores it along @@ -28,6 +31,11 @@ void appendToGlobalCtors(Module &M, Function *F, int Priority); /// Same as appendToGlobalCtors(), but for global dtors. void appendToGlobalDtors(Module &M, Function *F, int Priority); +/// \brief Given "llvm.used" or "llvm.compiler.used" as a global name, collect +/// the initializer elements of that global in Set and return the global itself. +GlobalVariable *collectUsedGlobalVariables(Module &M, + SmallPtrSet<GlobalValue *, 8> &Set, + bool CompilerUsed); } // End llvm namespace #endif // LLVM_TRANSFORMS_UTILS_MODULEUTILS_H |