Make these methods const correct.

Thanks to Nick Lewycky for noticing it.

llvm-svn: 187098
This commit is contained in:
Rafael Espindola
2013-07-25 02:50:08 +00:00
parent 885a0c494d
commit ec2375fb51
3 changed files with 13 additions and 7 deletions

View File

@@ -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())