diff options
author | Devang Patel <dpatel@apple.com> | 2010-06-22 01:19:38 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-06-22 01:19:38 +0000 |
commit | a762b093107ac3aa438815627006425d0b13a236 (patch) | |
tree | be044c6b7bc7e60f47ec8c8528b98eb218d6db2e /lib/VMCore/Module.cpp | |
parent | 4d54e5b2dd4a3d3bed38ff9c7aa57fc66adb5855 (diff) |
Use single interface, using twine, to get named metadata.
getNamedMetadata().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106518 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Module.cpp')
-rw-r--r-- | lib/VMCore/Module.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/VMCore/Module.cpp b/lib/VMCore/Module.cpp index a06911f77a..38a51dfd5d 100644 --- a/lib/VMCore/Module.cpp +++ b/lib/VMCore/Module.cpp @@ -313,11 +313,7 @@ GlobalAlias *Module::getNamedAlias(StringRef Name) const { /// getNamedMetadata - Return the first NamedMDNode in the module with the /// specified name. This method returns null if a NamedMDNode with the /// specified name is not found. -NamedMDNode *Module::getNamedMetadata(StringRef Name) const { - return NamedMDSymTab->lookup(Name); -} - -NamedMDNode *Module::getNamedMetadataUsingTwine(Twine Name) const { +NamedMDNode *Module::getNamedMetadata(const Twine &Name) const { SmallString<256> NameData; StringRef NameRef = Name.toStringRef(NameData); return NamedMDSymTab->lookup(NameRef); |