aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Module.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-08 18:38:51 +0000
committerChris Lattner <sabre@nondot.org>2006-03-08 18:38:51 +0000
commit6665b97ae99d03cf85da54253c12dec6f1a227b2 (patch)
treee12af3aa53fb449f89f5e31734db04bacd93a3df /include/llvm/Module.h
parent21b6c9d6477c8df3f884c3f1ebeaaa44dd53aafe (diff)
add a new helper method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26617 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Module.h')
-rw-r--r--include/llvm/Module.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Module.h b/include/llvm/Module.h
index 51f7838d97..84aa2a5e39 100644
--- a/include/llvm/Module.h
+++ b/include/llvm/Module.h
@@ -148,6 +148,12 @@ public:
GlobalVariable *getGlobalVariable(const std::string &Name, const Type *Ty,
bool AllowInternal = false);
+ /// getNamedGlobal - Return the first global variable in the module with the
+ /// specified name, of arbitrary type. This method returns null if a global
+ /// with the specified name is not found.
+ ///
+ GlobalVariable *getNamedGlobal(const std::string &Name);
+
//===--------------------------------------------------------------------===//
// Methods for easy access to the types in the module.