diff options
author | rdivacky <rdivacky@91177308-0d34-0410-b5e6-96231b3b80d8> | 2012-09-18 17:10:37 +0000 |
---|---|---|
committer | rdivacky <rdivacky@91177308-0d34-0410-b5e6-96231b3b80d8> | 2012-09-18 17:10:37 +0000 |
commit | b1fdebb1d11b5be8e8bbfea289564d6d97180939 (patch) | |
tree | 8a4e5b702e05d062befdbd1d87979acdd170b1ac /lib/MC | |
parent | 038aa84e7c5ec69d84f60d69971efae3fe0ccd41 (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')
-rw-r--r-- | lib/MC/MCContext.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/MC/MCContext.cpp b/lib/MC/MCContext.cpp index b5b14b95f66..477bd17c0d5 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 //===----------------------------------------------------------------------===// |