mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Use separate named MDNode to hold each function's local variable info.
This speeds up local variable handling in DwarfDebug. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106075 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -17,6 +17,7 @@
|
||||
#include "llvm/DerivedTypes.h"
|
||||
#include "llvm/GVMaterializer.h"
|
||||
#include "llvm/LLVMContext.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/ADT/StringExtras.h"
|
||||
#include "llvm/Support/LeakDetector.h"
|
||||
@ -316,6 +317,12 @@ NamedMDNode *Module::getNamedMetadata(StringRef Name) const {
|
||||
return NamedMDSymTab->lookup(Name);
|
||||
}
|
||||
|
||||
NamedMDNode *Module::getNamedMetadataUsingTwine(Twine Name) const {
|
||||
SmallString<256> NameData;
|
||||
StringRef NameRef = Name.toStringRef(NameData);
|
||||
return NamedMDSymTab->lookup(NameRef);
|
||||
}
|
||||
|
||||
/// getOrInsertNamedMetadata - Return the first named MDNode in the module
|
||||
/// with the specified name. This method returns a new NamedMDNode if a
|
||||
/// NamedMDNode with the specified name is not found.
|
||||
|
Reference in New Issue
Block a user