aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-07-30 18:46:29 +0000
committerDevang Patel <dpatel@apple.com>2009-07-30 18:46:29 +0000
commit76dd4e894184f1e25396cc9eb1fd5fb584aaf551 (patch)
treebfc1e20adcdcd631af39b6e7a4d0a7641c942e7c
parenteeae0641bf3f8f62509ad488f716a7da7f44cbc9 (diff)
downloadexternal_llvm-76dd4e894184f1e25396cc9eb1fd5fb584aaf551.zip
external_llvm-76dd4e894184f1e25396cc9eb1fd5fb584aaf551.tar.gz
external_llvm-76dd4e894184f1e25396cc9eb1fd5fb584aaf551.tar.bz2
Do not use getNamedValue() to lookup NamedMDNode. NamedMDNode is not a GlobalValue.
Thanks Benjamin Kramer! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77619 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/Module.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/Module.cpp b/lib/VMCore/Module.cpp
index 87d4b05..9e1622e 100644
--- a/lib/VMCore/Module.cpp
+++ b/lib/VMCore/Module.cpp
@@ -293,7 +293,7 @@ GlobalAlias *Module::getNamedAlias(const StringRef &Name) const {
/// specified name. This method returns null if a MDNode with the specified
/// name is not found.
NamedMDNode *Module::getNamedMetadata(const StringRef &Name) const {
- return dyn_cast_or_null<NamedMDNode>(getNamedValue(Name));
+ return dyn_cast_or_null<NamedMDNode>(getValueSymbolTable().lookup(Name));
}
//===----------------------------------------------------------------------===//