diff options
author | Eric Christopher <echristo@gmail.com> | 2016-07-01 06:07:38 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2016-07-01 06:07:38 +0000 |
commit | 36e601c6dcd8c30486897c626e017700817d1d73 (patch) | |
tree | 7110b13d3795d02b0cadb04235e56ce77c5b6839 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 0b6537e6e55bb74b6b39b7961a78e1d1a46416e3 (diff) | |
download | bcm5719-llvm-36e601c6dcd8c30486897c626e017700817d1d73.tar.gz bcm5719-llvm-36e601c6dcd8c30486897c626e017700817d1d73.zip |
Add support for allowing us to create uniquely identified "COMDAT" or "ELF
Group" sections while lowering. In particular, for ELF sections this is
useful for creating function-specific groups that get merged into the
same named section.
Also use const Twine& instead of StringRef for the getELF functions
while we're here.
Differential Revision: http://reviews.llvm.org/D21743
llvm-svn: 274336
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index a8e854ecbee..5f814c957e9 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -69,11 +69,9 @@ void TargetLoweringObjectFileELF::emitPersonalityValue( cast<MCSymbolELF>(getContext().getOrCreateSymbol(NameData)); Streamer.EmitSymbolAttribute(Label, MCSA_Hidden); Streamer.EmitSymbolAttribute(Label, MCSA_Weak); - StringRef Prefix = ".data."; - NameData.insert(NameData.begin(), Prefix.begin(), Prefix.end()); unsigned Flags = ELF::SHF_ALLOC | ELF::SHF_WRITE | ELF::SHF_GROUP; - MCSection *Sec = getContext().getELFSection(NameData, ELF::SHT_PROGBITS, - Flags, 0, Label->getName()); + MCSection *Sec = getContext().getELFNamedSection(".data", Label->getName(), + ELF::SHT_PROGBITS, Flags, 0); unsigned Size = DL.getPointerSize(); Streamer.SwitchSection(Sec); Streamer.EmitValueToAlignment(DL.getPointerABIAlignment()); |