diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-07-25 02:50:08 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-07-25 02:50:08 +0000 |
commit | 2d680824e3a5272e386aa6c1d2a66676de7899fd (patch) | |
tree | 5a37a75e24db3600185b986a51d8e7c2b9669964 /lib/Transforms | |
parent | f245ae5a4a78d5a02b3b9e2dae819077a56d81e7 (diff) |
Make these methods const correct.
Thanks to Nick Lewycky for noticing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187098 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/IPO/GlobalOpt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp index 183a599bc12..6250cc5ec45 100644 --- a/lib/Transforms/IPO/GlobalOpt.cpp +++ b/lib/Transforms/IPO/GlobalOpt.cpp @@ -3043,7 +3043,7 @@ bool GlobalOpt::OptimizeGlobalCtorsList(GlobalVariable *&GCL) { /// \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. static GlobalVariable * -collectUsedGlobalVariables(const Module &M, const char *Name, +collectUsedGlobalVariables(Module &M, const char *Name, SmallPtrSet<GlobalValue *, 8> &Set) { GlobalVariable *GV = M.getGlobalVariable(Name); if (!GV || !GV->hasInitializer()) @@ -3106,7 +3106,7 @@ class LLVMUsed { GlobalVariable *CompilerUsedV; public: - LLVMUsed(const Module &M) { + LLVMUsed(Module &M) { UsedV = collectUsedGlobalVariables(M, "llvm.used", Used); CompilerUsedV = collectUsedGlobalVariables(M, "llvm.compiler.used", CompilerUsed); |