aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Module.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/Module.cpp')
-rw-r--r--lib/VMCore/Module.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/VMCore/Module.cpp b/lib/VMCore/Module.cpp
index 429cf1a4c6..893a5fdcb0 100644
--- a/lib/VMCore/Module.cpp
+++ b/lib/VMCore/Module.cpp
@@ -201,6 +201,11 @@ Function *Module::getFunction(const std::string &Name) const {
return dyn_cast_or_null<Function>(SymTab.lookup(Name));
}
+Function *Module::getFunction(const char *Name) const {
+ const ValueSymbolTable &SymTab = getValueSymbolTable();
+ return dyn_cast_or_null<Function>(SymTab.lookup(Name, Name+strlen(Name)));
+}
+
//===----------------------------------------------------------------------===//
// Methods for easy access to the global variables in the module.
//