mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Use existing helper for adding a section. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237909 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
57f70578fa
commit
f209e26fcc
@ -469,7 +469,7 @@ namespace llvm {
|
|||||||
void setGenDwarfFileNumber(unsigned FileNumber) {
|
void setGenDwarfFileNumber(unsigned FileNumber) {
|
||||||
GenDwarfFileNumber = FileNumber;
|
GenDwarfFileNumber = FileNumber;
|
||||||
}
|
}
|
||||||
MapVector<const MCSection *, std::pair<MCSymbol *, MCSymbol *>> &
|
const MapVector<const MCSection *, std::pair<MCSymbol *, MCSymbol *>> &
|
||||||
getGenDwarfSectionSyms() {
|
getGenDwarfSectionSyms() {
|
||||||
return SectionStartEndSyms;
|
return SectionStartEndSyms;
|
||||||
}
|
}
|
||||||
|
@ -532,9 +532,7 @@ EndStmt:
|
|||||||
getStreamer().SwitchSection(ELFSection, Subsection);
|
getStreamer().SwitchSection(ELFSection, Subsection);
|
||||||
|
|
||||||
if (getContext().getGenDwarfForAssembly()) {
|
if (getContext().getGenDwarfForAssembly()) {
|
||||||
auto &Sections = getContext().getGenDwarfSectionSyms();
|
auto InsertResult = getContext().addGenDwarfSection(ELFSection);
|
||||||
auto InsertResult = Sections.insert(
|
|
||||||
std::make_pair(ELFSection, std::make_pair(nullptr, nullptr)));
|
|
||||||
if (InsertResult.second) {
|
if (InsertResult.second) {
|
||||||
if (getContext().getDwarfVersion() <= 2)
|
if (getContext().getDwarfVersion() <= 2)
|
||||||
Warning(loc, "DWARF2 only supports one section per compilation unit");
|
Warning(loc, "DWARF2 only supports one section per compilation unit");
|
||||||
|
Loading…
Reference in New Issue
Block a user