diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2009-01-15 20:18:42 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2009-01-15 20:18:42 +0000 |
commit | bb46f52027416598a662dc1c58f48d9d56b1a65b (patch) | |
tree | ebdd7fc62b19bc9bdb7cc03563fd817d3943f17e /lib/VMCore/Module.cpp | |
parent | f193ff05909c2de373032f773e76804474b1ef4e (diff) |
Add the private linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62279 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Module.cpp')
-rw-r--r-- | lib/VMCore/Module.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/VMCore/Module.cpp b/lib/VMCore/Module.cpp index d5b48c0a73..ef94796b24 100644 --- a/lib/VMCore/Module.cpp +++ b/lib/VMCore/Module.cpp @@ -153,7 +153,7 @@ Constant *Module::getOrInsertFunction(const std::string &Name, } // Okay, the function exists. Does it have externally visible linkage? - if (F->hasInternalLinkage()) { + if (F->hasLocalLinkage()) { // Clear the function's name. F->setName(""); // Retry, now there won't be a conflict. @@ -238,14 +238,14 @@ Function *Module::getFunction(const char *Name) const { /// symbol table. If it does not exist, return null. The type argument /// should be the underlying type of the global, i.e., it should not have /// the top-level PointerType, which represents the address of the global. -/// If AllowInternal is set to true, this function will return types that -/// have InternalLinkage. By default, these types are not returned. +/// 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(const std::string &Name, - bool AllowInternal) const { + bool AllowLocal) const { if (Value *V = ValSymTab->lookup(Name)) { GlobalVariable *Result = dyn_cast<GlobalVariable>(V); - if (Result && (AllowInternal || !Result->hasInternalLinkage())) + if (Result && (AllowLocal || !Result->hasLocalLinkage())) return Result; } return 0; @@ -376,4 +376,3 @@ void Module::removeLibrary(const std::string& Lib) { return; } } - |