summaryrefslogtreecommitdiff
path: root/lib/IR/Module.cpp
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
commit2d680824e3a5272e386aa6c1d2a66676de7899fd (patch)
tree5a37a75e24db3600185b986a51d8e7c2b9669964 /lib/IR/Module.cpp
parentf245ae5a4a78d5a02b3b9e2dae819077a56d81e7 (diff)
downloadllvm-2d680824e3a5272e386aa6c1d2a66676de7899fd.tar.gz
llvm-2d680824e3a5272e386aa6c1d2a66676de7899fd.tar.bz2
llvm-2d680824e3a5272e386aa6c1d2a66676de7899fd.tar.xz
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/IR/Module.cpp')
-rw-r--r--lib/IR/Module.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/IR/Module.cpp b/lib/IR/Module.cpp
index 3d3dc737a1..968b8f4b90 100644
--- a/lib/IR/Module.cpp
+++ b/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())