Do not use getNamedValue() to lookup NamedMDNode. NamedMDNode is not a GlobalValue.

Thanks Benjamin Kramer!

llvm-svn: 77619
This commit is contained in:
Devang Patel 2009-07-30 18:46:29 +00:00
parent 57eae13c8d
commit 3f4ab29f45
1 changed files with 1 additions and 1 deletions

View File

@ -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));
}
//===----------------------------------------------------------------------===//