diff options
author | Chris Lattner <sabre@nondot.org> | 2005-12-05 05:30:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-12-05 05:30:21 +0000 |
commit | 30614675f45809c43d44c7243d8b747b39403155 (patch) | |
tree | b3e106709ee02a92db62fc403099b8321ee986a6 /include/llvm/Module.h | |
parent | aef8c64777a7d3b4aef1661305659d8ff5133dc9 (diff) |
Add a flag to Module::getGlobalVariable to allow it to return vars with
internal linkage.
Patch provided by Evan Jones, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24604 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Module.h')
-rw-r--r-- | include/llvm/Module.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/llvm/Module.h b/include/llvm/Module.h index 1ee8750eca..da2b53ddb5 100644 --- a/include/llvm/Module.h +++ b/include/llvm/Module.h @@ -137,13 +137,14 @@ public: // /// getGlobalVariable - Look up the specified global variable in the module - /// symbol table. If it does not exist, return null. Note that this only - /// returns a global variable if it does not have internal linkage. 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. + /// 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. /// - GlobalVariable *getGlobalVariable(const std::string &Name, const Type *Ty); + GlobalVariable *getGlobalVariable(const std::string &Name, const Type *Ty, + bool AllowInternal = false); //===--------------------------------------------------------------------===// |