mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Keep track of named mdnodes in a Module using an ilist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77476 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -67,6 +67,7 @@ Module::~Module() {
|
||||
FunctionList.clear();
|
||||
AliasList.clear();
|
||||
LibraryList.clear();
|
||||
NamedMDList.clear();
|
||||
delete ValSymTab;
|
||||
delete TypeSymTab;
|
||||
}
|
||||
@ -288,6 +289,13 @@ GlobalAlias *Module::getNamedAlias(const StringRef &Name) const {
|
||||
return dyn_cast_or_null<GlobalAlias>(getNamedValue(Name));
|
||||
}
|
||||
|
||||
/// getNamedMetadata - Return the first named MDNode in the module with the
|
||||
/// 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));
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Methods for easy access to the types in the module.
|
||||
//
|
||||
|
Reference in New Issue
Block a user