mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +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) {
|
||||
GenDwarfFileNumber = FileNumber;
|
||||
}
|
||||
MapVector<const MCSection *, std::pair<MCSymbol *, MCSymbol *>> &
|
||||
const MapVector<const MCSection *, std::pair<MCSymbol *, MCSymbol *>> &
|
||||
getGenDwarfSectionSyms() {
|
||||
return SectionStartEndSyms;
|
||||
}
|
||||
|
@ -532,9 +532,7 @@ EndStmt:
|
||||
getStreamer().SwitchSection(ELFSection, Subsection);
|
||||
|
||||
if (getContext().getGenDwarfForAssembly()) {
|
||||
auto &Sections = getContext().getGenDwarfSectionSyms();
|
||||
auto InsertResult = Sections.insert(
|
||||
std::make_pair(ELFSection, std::make_pair(nullptr, nullptr)));
|
||||
auto InsertResult = getContext().addGenDwarfSection(ELFSection);
|
||||
if (InsertResult.second) {
|
||||
if (getContext().getDwarfVersion() <= 2)
|
||||
Warning(loc, "DWARF2 only supports one section per compilation unit");
|
||||
|
Loading…
Reference in New Issue
Block a user