[llvm] r237909 - Use existing helper for adding a section. NFC.
Rafael Espindola
rafael.espindola at gmail.com
Thu May 21 09:19:33 PDT 2015
Author: rafael
Date: Thu May 21 11:19:32 2015
New Revision: 237909
URL: http://llvm.org/viewvc/llvm-project?rev=237909&view=rev
Log:
Use existing helper for adding a section. NFC.
Modified:
llvm/trunk/include/llvm/MC/MCContext.h
llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp
Modified: llvm/trunk/include/llvm/MC/MCContext.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCContext.h?rev=237909&r1=237908&r2=237909&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCContext.h (original)
+++ llvm/trunk/include/llvm/MC/MCContext.h Thu May 21 11:19:32 2015
@@ -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;
}
Modified: llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp?rev=237909&r1=237908&r2=237909&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp Thu May 21 11:19:32 2015
@@ -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");
More information about the llvm-commits
mailing list