aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-06-13 03:09:13 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-06-13 03:09:13 +0000
commitfb66f477a1c1cdde2670163bd60e42139a5009d8 (patch)
treea8bfbda14fa35f695efe65cb6ec616bbfb47581f /lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parentffd0ae64c497d13956d16526c46245bfbf48e91f (diff)
Fix invalid uses of Twine. Hopefully this fixes the problem that Takumi is
having. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132898 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--lib/CodeGen/TargetLoweringObjectFileImpl.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index cdac42d1bf..2da1bd48fb 100644
--- a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -189,8 +189,8 @@ TargetLoweringObjectFileELF::getCFIPersonalitySymbol(const GlobalValue *GV,
return Mang->getSymbol(GV);
break;
case dwarf::DW_EH_PE_pcrel: {
- Twine FullName = StringRef("DW.ref.") + Mang->getSymbol(GV)->getName();
- return getContext().GetOrCreateSymbol(FullName);
+ return getContext().GetOrCreateSymbol(StringRef("DW.ref.") +
+ Mang->getSymbol(GV)->getName());
break;
}
}
@@ -199,13 +199,13 @@ TargetLoweringObjectFileELF::getCFIPersonalitySymbol(const GlobalValue *GV,
void TargetLoweringObjectFileELF::emitPersonalityValue(MCStreamer &Streamer,
const TargetMachine &TM,
const MCSymbol *Sym) const {
- Twine FullName = StringRef("DW.ref.") + Sym->getName();
- MCSymbol *Label = getContext().GetOrCreateSymbol(FullName);
+ SmallString<64> NameData("DW.ref.");
+ NameData += Sym->getName();
+ MCSymbol *Label = getContext().GetOrCreateSymbol(NameData);
Streamer.EmitSymbolAttribute(Label, MCSA_Hidden);
Streamer.EmitSymbolAttribute(Label, MCSA_Weak);
- Twine SectionName = StringRef(".data.") + Label->getName();
- SmallString<64> NameData;
- SectionName.toVector(NameData);
+ StringRef Prefix = ".data.";
+ NameData.insert(NameData.begin(), Prefix.begin(), Prefix.end());
unsigned Flags = ELF::SHF_ALLOC | ELF::SHF_WRITE | ELF::SHF_GROUP;
const MCSection *Sec = getContext().getELFSection(NameData,
ELF::SHT_PROGBITS,