aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Module.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-07-13 17:19:57 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-07-13 17:19:57 +0000
commit66e41e3c6e8b8fbc48d5d3b4d2bd9ce0be4ecb75 (patch)
tree9de1c5f67a98cd0e73c60838396486c984f63ac2 /lib/VMCore/Module.cpp
parentabdf259d487163e72081a8cf4991b1617206b41e (diff)
downloadsrc-66e41e3c6e8b8fbc48d5d3b4d2bd9ce0be4ecb75.tar.gz
src-66e41e3c6e8b8fbc48d5d3b4d2bd9ce0be4ecb75.zip
Update LLVM to r108243.vendor/llvm/llvm-r108243
Notes
Notes: svn path=/vendor/llvm/dist/; revision=210006 svn path=/vendor/llvm/llvm-r108243/; revision=210077; tag=vendor/llvm/llvm-r108243
Diffstat (limited to 'lib/VMCore/Module.cpp')
-rw-r--r--lib/VMCore/Module.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/VMCore/Module.cpp b/lib/VMCore/Module.cpp
index 94840f07a4ab..38a51dfd5d38 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"
@@ -311,9 +312,11 @@ 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);
+/// specified name is not found.
+NamedMDNode *Module::getNamedMetadata(const Twine &Name) const {
+ SmallString<256> NameData;
+ StringRef NameRef = Name.toStringRef(NameData);
+ return NamedMDSymTab->lookup(NameRef);
}
/// getOrInsertNamedMetadata - Return the first named MDNode in the module