summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-07-25 02:50:08 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-07-25 02:50:08 +0000
commitec2375fb5116ccb1dd97e0be75f7a44cdc8c2bac (patch)
treef269c4f900b699ee327e544e8cb9eb95b4e27d69 /llvm/lib/Transforms
parent885a0c494d2ba8776f43c7b0585cd629c8000286 (diff)
downloadbcm5719-llvm-ec2375fb5116ccb1dd97e0be75f7a44cdc8c2bac.tar.gz
bcm5719-llvm-ec2375fb5116ccb1dd97e0be75f7a44cdc8c2bac.zip
Make these methods const correct.
Thanks to Nick Lewycky for noticing it. llvm-svn: 187098
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/GlobalOpt.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
index 183a599bc12..6250cc5ec45 100644
--- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud