aboutsummaryrefslogtreecommitdiff
path: root/lib/MC/MCContext.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@freebsd.org>2012-09-18 17:10:37 +0000
committerRoman Divacky <rdivacky@freebsd.org>2012-09-18 17:10:37 +0000
commitf145c135f3a28e2c59bd02e475fbf09f4157c9fb (patch)
tree8a4e5b702e05d062befdbd1d87979acdd170b1ac /lib/MC/MCContext.cpp
parent371d5d86bd70756d2066692114fec599c33baf92 (diff)
Avoid symbol name clash when filling TOC.
Patch by Adhemerval Zanella. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164141 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCContext.cpp')
-rw-r--r--lib/MC/MCContext.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/MC/MCContext.cpp b/lib/MC/MCContext.cpp
index b5b14b95f6..477bd17c0d 100644
--- a/lib/MC/MCContext.cpp
+++ b/lib/MC/MCContext.cpp
@@ -153,6 +153,12 @@ MCSymbol *MCContext::LookupSymbol(StringRef Name) const {
return Symbols.lookup(Name);
}
+MCSymbol *MCContext::LookupSymbol(const Twine &Name) const {
+ SmallString<128> NameSV;
+ Name.toVector(NameSV);
+ return LookupSymbol(NameSV.str());
+}
+
//===----------------------------------------------------------------------===//
// Section Management
//===----------------------------------------------------------------------===//