diff options
author | Devang Patel <dpatel@apple.com> | 2010-06-16 00:53:55 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-06-16 00:53:55 +0000 |
commit | 2f7d5291de87bfa195884e84dc0efe9705c2215c (patch) | |
tree | 08cfc02c5cca206415b6ddac7a87431a8341f533 /lib/VMCore/Module.cpp | |
parent | 7500e06e3886a13e3017d7af77c35d309e875182 (diff) | |
download | external_llvm-2f7d5291de87bfa195884e84dc0efe9705c2215c.zip external_llvm-2f7d5291de87bfa195884e84dc0efe9705c2215c.tar.gz external_llvm-2f7d5291de87bfa195884e84dc0efe9705c2215c.tar.bz2 |
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
Diffstat (limited to 'lib/VMCore/Module.cpp')
-rw-r--r-- | lib/VMCore/Module.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/VMCore/Module.cpp b/lib/VMCore/Module.cpp index 94840f0..a4c3d2e 100644 --- a/lib/VMCore/Module.cpp +++ b/lib/VMCore/Module.cpp @@ -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. |