forked from OSchip/llvm-project
Do not use getNamedValue() to lookup NamedMDNode. NamedMDNode is not a GlobalValue.
Thanks Benjamin Kramer! llvm-svn: 77619
This commit is contained in:
parent
57eae13c8d
commit
3f4ab29f45
|
@ -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));
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
Loading…
Reference in New Issue