diff options
Diffstat (limited to 'llvm/lib/MC/MCParser/AsmParser.cpp')
-rw-r--r-- | llvm/lib/MC/MCParser/AsmParser.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index 5b5cc5fae2a..da3fc72057e 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -632,10 +632,10 @@ bool AsmParser::Run(bool NoInitialTextSection, bool NoFinalize) { if (getContext().getGenDwarfForAssembly()) { MCSymbol *SectionStartSym = getContext().createTempSymbol(); getStreamer().EmitLabel(SectionStartSym); - auto InsertResult = getContext().addGenDwarfSection( - getStreamer().getCurrentSection().first); - assert(InsertResult.second && ".text section should not have debug info yet"); - InsertResult.first->second.first = SectionStartSym; + const MCSection *Sec = getStreamer().getCurrentSection().first; + bool InsertResult = getContext().addGenDwarfSection(Sec); + assert(InsertResult && ".text section should not have debug info yet"); + Sec->setBeginSymbol(SectionStartSym); getContext().setGenDwarfFileNumber(getStreamer().EmitDwarfFileDirective( 0, StringRef(), getContext().getMainFileName())); } |