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 | ec2375fb5116ccb1dd97e0be75f7a44cdc8c2bac (patch) | |
tree | f269c4f900b699ee327e544e8cb9eb95b4e27d69 /llvm/lib/IR/Module.cpp | |
parent | 885a0c494d2ba8776f43c7b0585cd629c8000286 (diff) | |
download | bcm5719-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/IR/Module.cpp')
-rw-r--r-- | llvm/lib/IR/Module.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp index 3d3dc737a1b..968b8f4b904 100644 --- a/llvm/lib/IR/Module.cpp +++ b/llvm/lib/IR/Module.cpp @@ -233,8 +233,7 @@ Function *Module::getFunction(StringRef Name) const { /// If AllowLocal is set to true, this function will return types that /// have an local. By default, these types are not returned. /// -GlobalVariable *Module::getGlobalVariable(StringRef Name, - bool AllowLocal) const { +GlobalVariable *Module::getGlobalVariable(StringRef Name, bool AllowLocal) { if (GlobalVariable *Result = dyn_cast_or_null<GlobalVariable>(getNamedValue(Name))) if (AllowLocal || !Result->hasLocalLinkage()) |