From 689f7733173c4a7757f10bc7442905c18274f288 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 28 Aug 2018 23:25:59 +0000 Subject: [PATCH] [codeview] Clean up machinery for deferring .cv_loc emission Now that we create the label at the point of the directive, we don't need to set the "current CV location", and then later when we emit the next instruction, create a label for it and emit it. DWARF still defers the labels used in .debug_loc until the next instruction or value, for reasons unknown. llvm-svn: 340883 --- llvm/include/llvm/MC/MCCodeView.h | 70 +++++++---------------------- llvm/include/llvm/MC/MCContext.h | 4 -- llvm/include/llvm/MC/MCStreamer.h | 3 ++ llvm/lib/MC/MCAsmStreamer.cpp | 17 +++---- llvm/lib/MC/MCCodeView.cpp | 67 ++++++++++----------------- llvm/lib/MC/MCContext.cpp | 5 --- llvm/lib/MC/MCObjectStreamer.cpp | 20 ++++----- llvm/lib/MC/MCStreamer.cpp | 20 ++++++--- llvm/test/DebugInfo/COFF/asm.ll | 4 +- llvm/test/DebugInfo/COFF/inlining-header.ll | 2 +- llvm/test/DebugInfo/COFF/inlining.ll | 2 +- llvm/test/DebugInfo/COFF/local-variables.ll | 2 +- llvm/test/DebugInfo/COFF/multifile.ll | 4 +- llvm/test/DebugInfo/COFF/multifunction.ll | 4 +- llvm/test/DebugInfo/COFF/simple.ll | 4 +- 15 files changed, 84 insertions(+), 144 deletions(-) diff --git a/llvm/include/llvm/MC/MCCodeView.h b/llvm/include/llvm/MC/MCCodeView.h index 1d9e3c6..2678cf4 100644 --- a/llvm/include/llvm/MC/MCCodeView.h +++ b/llvm/include/llvm/MC/MCCodeView.h @@ -30,6 +30,7 @@ class CodeViewContext; /// Instances of this class represent the information from a /// .cv_loc directive. class MCCVLoc { + const MCSymbol *Label = nullptr; uint32_t FunctionId; uint32_t FileNum; uint32_t Line; @@ -39,15 +40,17 @@ class MCCVLoc { private: // CodeViewContext manages these friend class CodeViewContext; - MCCVLoc(unsigned functionid, unsigned fileNum, unsigned line, unsigned column, - bool prologueend, bool isstmt) - : FunctionId(functionid), FileNum(fileNum), Line(line), Column(column), - PrologueEnd(prologueend), IsStmt(isstmt) {} + MCCVLoc(const MCSymbol *Label, unsigned functionid, unsigned fileNum, + unsigned line, unsigned column, bool prologueend, bool isstmt) + : Label(Label), FunctionId(functionid), FileNum(fileNum), Line(line), + Column(column), PrologueEnd(prologueend), IsStmt(isstmt) {} // Allow the default copy constructor and assignment operator to be used // for an MCCVLoc object. public: + const MCSymbol *getLabel() const { return Label; } + unsigned getFunctionId() const { return FunctionId; } /// Get the FileNum of this MCCVLoc. @@ -62,6 +65,8 @@ public: bool isPrologueEnd() const { return PrologueEnd; } bool isStmt() const { return IsStmt; } + void setLabel(const MCSymbol *L) { Label = L; } + void setFunctionId(unsigned FID) { FunctionId = FID; } /// Set the FileNum of this MCCVLoc. @@ -80,31 +85,6 @@ public: void setIsStmt(bool IS) { IsStmt = IS; } }; -/// Instances of this class represent the line information for -/// the CodeView line table entries. Which is created after a machine -/// instruction is assembled and uses an address from a temporary label -/// created at the current address in the current section and the info from -/// the last .cv_loc directive seen as stored in the context. -class MCCVLineEntry : public MCCVLoc { - const MCSymbol *Label; - -private: - // Allow the default copy constructor and assignment operator to be used - // for an MCCVLineEntry object. - -public: - // Constructor to create an MCCVLineEntry given a symbol and the dwarf loc. - MCCVLineEntry(const MCSymbol *Label, const MCCVLoc loc) - : MCCVLoc(loc), Label(Label) {} - - const MCSymbol *getLabel() const { return Label; } - - // This is called when an instruction is assembled into the specified - // section and if there is information from the last .cv_loc directive that - // has yet to have a line entry made for it is made. - static void Make(MCObjectStreamer *MCOS); -}; - /// Information describing a function or inlined call site introduced by /// .cv_func_id or .cv_inline_site_id. Accumulates information from .cv_loc /// directives used with this function's id or the id of an inlined call site @@ -183,32 +163,20 @@ public: /// and sets CVLocSeen. When the next instruction is assembled an entry /// in the line number table with this information and the address of the /// instruction will be created. - void setCurrentCVLoc(unsigned FunctionId, unsigned FileNo, unsigned Line, - unsigned Column, bool PrologueEnd, bool IsStmt) { - CurrentCVLoc.setFunctionId(FunctionId); - CurrentCVLoc.setFileNum(FileNo); - CurrentCVLoc.setLine(Line); - CurrentCVLoc.setColumn(Column); - CurrentCVLoc.setPrologueEnd(PrologueEnd); - CurrentCVLoc.setIsStmt(IsStmt); - CVLocSeen = true; - } - - bool getCVLocSeen() { return CVLocSeen; } - void clearCVLocSeen() { CVLocSeen = false; } - - const MCCVLoc &getCurrentCVLoc() { return CurrentCVLoc; } + void recordCVLoc(MCContext &Ctx, const MCSymbol *Label, unsigned FunctionId, + unsigned FileNo, unsigned Line, unsigned Column, + bool PrologueEnd, bool IsStmt); bool isValidCVFileNumber(unsigned FileNumber); /// Add a line entry. - void addLineEntry(const MCCVLineEntry &LineEntry); + void addLineEntry(const MCCVLoc &LineEntry); - std::vector getFunctionLineEntries(unsigned FuncId); + std::vector getFunctionLineEntries(unsigned FuncId); std::pair getLineExtent(unsigned FuncId); - ArrayRef getLinesForExtent(size_t L, size_t R); + ArrayRef getLinesForExtent(size_t L, size_t R); /// Emits a line table substream. void emitLineTableForFunction(MCObjectStreamer &OS, unsigned FuncId, @@ -247,10 +215,6 @@ public: std::pair addToStringTable(StringRef S); private: - /// The current CodeView line information from the last .cv_loc directive. - MCCVLoc CurrentCVLoc = MCCVLoc(0, 0, 0, 0, false, true); - bool CVLocSeen = false; - /// Map from string to string table offset. StringMap StringTable; @@ -286,8 +250,8 @@ private: /// id. std::map> MCCVLineStartStop; - /// A collection of MCCVLineEntry for each section. - std::vector MCCVLines; + /// A collection of MCCVLoc for each section. + std::vector MCCVLines; /// All known functions and inlined call sites, indexed by function id. std::vector Functions; diff --git a/llvm/include/llvm/MC/MCContext.h b/llvm/include/llvm/MC/MCContext.h index a712e2d..3b8ac8b 100644 --- a/llvm/include/llvm/MC/MCContext.h +++ b/llvm/include/llvm/MC/MCContext.h @@ -298,10 +298,6 @@ namespace llvm { CodeViewContext &getCVContext(); - /// Clear the current cv_loc, if there is one. Avoids lazily creating a - /// CodeViewContext if none is needed. - void clearCVLocSeen(); - void setAllowTemporaryLabels(bool Value) { AllowTemporaryLabels = Value; } void setUseNamesOnTempLabels(bool Value) { UseNamesOnTempLabels = Value; } diff --git a/llvm/include/llvm/MC/MCStreamer.h b/llvm/include/llvm/MC/MCStreamer.h index e4d0dc0..91fb4e5 100644 --- a/llvm/include/llvm/MC/MCStreamer.h +++ b/llvm/include/llvm/MC/MCStreamer.h @@ -231,6 +231,9 @@ protected: virtual void EmitRawTextImpl(StringRef String); + /// Returns true if the the .cv_loc directive is in the right section. + bool checkCVLocSection(unsigned FuncId, unsigned FileNo, SMLoc Loc); + public: MCStreamer(const MCStreamer &) = delete; MCStreamer &operator=(const MCStreamer &) = delete; diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp index ae02f50..c4744ac 100644 --- a/llvm/lib/MC/MCAsmStreamer.cpp +++ b/llvm/lib/MC/MCAsmStreamer.cpp @@ -1298,20 +1298,17 @@ void MCAsmStreamer::EmitCVLocDirective(unsigned FunctionId, unsigned FileNo, unsigned Line, unsigned Column, bool PrologueEnd, bool IsStmt, StringRef FileName, SMLoc Loc) { + // Validate the directive. + if (!checkCVLocSection(FunctionId, FileNo, Loc)) + return; + OS << "\t.cv_loc\t" << FunctionId << " " << FileNo << " " << Line << " " << Column; if (PrologueEnd) OS << " prologue_end"; - unsigned OldIsStmt = getContext().getCVContext().getCurrentCVLoc().isStmt(); - if (IsStmt != OldIsStmt) { - OS << " is_stmt "; - - if (IsStmt) - OS << "1"; - else - OS << "0"; - } + if (IsStmt) + OS << " is_stmt 1"; if (IsVerboseAsm) { OS.PadToColumn(MAI->getCommentColumn()); @@ -1319,8 +1316,6 @@ void MCAsmStreamer::EmitCVLocDirective(unsigned FunctionId, unsigned FileNo, << Column; } EmitEOL(); - this->MCStreamer::EmitCVLocDirective(FunctionId, FileNo, Line, Column, - PrologueEnd, IsStmt, FileName, Loc); } void MCAsmStreamer::EmitCVLinetableDirective(unsigned FunctionId, diff --git a/llvm/lib/MC/MCCodeView.cpp b/llvm/lib/MC/MCCodeView.cpp index 155fd7e..234b43e 100644 --- a/llvm/lib/MC/MCCodeView.cpp +++ b/llvm/lib/MC/MCCodeView.cpp @@ -128,6 +128,14 @@ bool CodeViewContext::recordInlinedCallSiteId(unsigned FuncId, unsigned IAFunc, return true; } +void CodeViewContext::recordCVLoc(MCContext &Ctx, const MCSymbol *Label, + unsigned FunctionId, unsigned FileNo, + unsigned Line, unsigned Column, + bool PrologueEnd, bool IsStmt) { + addLineEntry(MCCVLoc{ + Label, FunctionId, FileNo, Line, Column, PrologueEnd, IsStmt}); +} + MCDataFragment *CodeViewContext::getStringTableFragment() { if (!StrTabFragment) { StrTabFragment = new MCDataFragment(); @@ -255,7 +263,7 @@ void CodeViewContext::emitFileChecksumOffset(MCObjectStreamer &OS, OS.EmitValueImpl(SRE, 4); } -void CodeViewContext::addLineEntry(const MCCVLineEntry &LineEntry) { +void CodeViewContext::addLineEntry(const MCCVLoc &LineEntry) { size_t Offset = MCCVLines.size(); auto I = MCCVLineStartStop.insert( {LineEntry.getFunctionId(), {Offset, Offset + 1}}); @@ -264,9 +272,9 @@ void CodeViewContext::addLineEntry(const MCCVLineEntry &LineEntry) { MCCVLines.push_back(LineEntry); } -std::vector +std::vector CodeViewContext::getFunctionLineEntries(unsigned FuncId) { - std::vector FilteredLines; + std::vector FilteredLines; auto I = MCCVLineStartStop.find(FuncId); if (I != MCCVLineStartStop.end()) { MCCVFunctionInfo *SiteInfo = getCVFunctionInfo(FuncId); @@ -289,9 +297,9 @@ CodeViewContext::getFunctionLineEntries(unsigned FuncId) { FilteredLines.back().getFileNum() != IA.File || FilteredLines.back().getLine() != IA.Line || FilteredLines.back().getColumn() != IA.Col) { - FilteredLines.push_back(MCCVLineEntry( + FilteredLines.push_back(MCCVLoc( MCCVLines[Idx].getLabel(), - MCCVLoc(FuncId, IA.File, IA.Line, IA.Col, false, false))); + FuncId, IA.File, IA.Line, IA.Col, false, false)); } } } @@ -308,7 +316,7 @@ std::pair CodeViewContext::getLineExtent(unsigned FuncId) { return I->second; } -ArrayRef CodeViewContext::getLinesForExtent(size_t L, size_t R) { +ArrayRef CodeViewContext::getLinesForExtent(size_t L, size_t R) { if (R <= L) return None; if (L >= MCCVLines.size()) @@ -331,8 +339,8 @@ void CodeViewContext::emitLineTableForFunction(MCObjectStreamer &OS, OS.EmitCOFFSectionIndex(FuncBegin); // Actual line info. - std::vector Locs = getFunctionLineEntries(FuncId); - bool HaveColumns = any_of(Locs, [](const MCCVLineEntry &LineEntry) { + std::vector Locs = getFunctionLineEntries(FuncId); + bool HaveColumns = any_of(Locs, [](const MCCVLoc &LineEntry) { return LineEntry.getColumn() != 0; }); OS.EmitIntValue(HaveColumns ? int(LF_HaveColumns) : 0, 2); @@ -342,7 +350,7 @@ void CodeViewContext::emitLineTableForFunction(MCObjectStreamer &OS, // Emit a file segment for the run of locations that share a file id. unsigned CurFileNum = I->getFileNum(); auto FileSegEnd = - std::find_if(I, E, [CurFileNum](const MCCVLineEntry &Loc) { + std::find_if(I, E, [CurFileNum](const MCCVLoc &Loc) { return Loc.getFileNum() != CurFileNum; }); unsigned EntryCount = FileSegEnd - I; @@ -468,14 +476,14 @@ void CodeViewContext::encodeInlineLineTable(MCAsmLayout &Layout, if (LocBegin >= LocEnd) return; - ArrayRef Locs = getLinesForExtent(LocBegin, LocEnd); + ArrayRef Locs = getLinesForExtent(LocBegin, LocEnd); if (Locs.empty()) return; // Check that the locations are all in the same section. #ifndef NDEBUG const MCSection *FirstSec = &Locs.front().getLabel()->getSection(); - for (const MCCVLineEntry &Loc : Locs) { + for (const MCCVLoc &Loc : Locs) { if (&Loc.getLabel()->getSection() != FirstSec) { errs() << ".cv_loc " << Loc.getFunctionId() << ' ' << Loc.getFileNum() << ' ' << Loc.getLine() << ' ' << Loc.getColumn() @@ -488,7 +496,8 @@ void CodeViewContext::encodeInlineLineTable(MCAsmLayout &Layout, // Make an artificial start location using the function start and the inlinee // lines start location information. All deltas start relative to this // location. - MCCVLineEntry StartLoc(Frag.getFnStartSym(), MCCVLoc(Locs.front())); + MCCVLoc StartLoc = Locs.front(); + StartLoc.setLabel(Frag.getFnStartSym()); StartLoc.setFileNum(Frag.StartFileId); StartLoc.setLine(Frag.StartLineNum); bool HaveOpenRange = false; @@ -500,7 +509,7 @@ void CodeViewContext::encodeInlineLineTable(MCAsmLayout &Layout, SmallVectorImpl &Buffer = Frag.getContents(); Buffer.clear(); // Clear old contents if we went through relaxation. - for (const MCCVLineEntry &Loc : Locs) { + for (const MCCVLoc &Loc : Locs) { // Exit early if our line table would produce an oversized InlineSiteSym // record. Account for the ChangeCodeLength annotation emitted after the // loop ends. @@ -585,10 +594,10 @@ void CodeViewContext::encodeInlineLineTable(MCAsmLayout &Layout, unsigned EndSymLength = computeLabelDiff(Layout, LastLabel, Frag.getFnEndSym()); unsigned LocAfterLength = ~0U; - ArrayRef LocAfter = getLinesForExtent(LocEnd, LocEnd + 1); + ArrayRef LocAfter = getLinesForExtent(LocEnd, LocEnd + 1); if (!LocAfter.empty()) { // Only try to compute this difference if we're in the same section. - const MCCVLineEntry &Loc = LocAfter[0]; + const MCCVLoc &Loc = LocAfter[0]; if (&Loc.getLabel()->getSection() == &LastLabel->getSection()) LocAfterLength = computeLabelDiff(Layout, LastLabel, Loc.getLabel()); } @@ -686,31 +695,3 @@ void CodeViewContext::encodeDefRange(MCAsmLayout &Layout, } } } - -// -// This is called when an instruction is assembled into the specified section -// and if there is information from the last .cv_loc directive that has yet to have -// a line entry made for it is made. -// -void MCCVLineEntry::Make(MCObjectStreamer *MCOS) { - CodeViewContext &CVC = MCOS->getContext().getCVContext(); - if (!CVC.getCVLocSeen()) - return; - - // Create a symbol at in the current section for use in the line entry. - MCSymbol *LineSym = MCOS->getContext().createTempSymbol(); - // Set the value of the symbol to use for the MCCVLineEntry. - MCOS->EmitLabel(LineSym); - - // Get the current .loc info saved in the context. - const MCCVLoc &CVLoc = CVC.getCurrentCVLoc(); - - // Create a (local) line entry with the symbol and the current .loc info. - MCCVLineEntry LineEntry(LineSym, CVLoc); - - // clear CVLocSeen saying the current .loc info is now used. - CVC.clearCVLocSeen(); - - // Add the line entry to this section's entries. - CVC.addLineEntry(LineEntry); -} diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp index 606da25..341a1a4 100644 --- a/llvm/lib/MC/MCContext.cpp +++ b/llvm/lib/MC/MCContext.cpp @@ -605,11 +605,6 @@ CodeViewContext &MCContext::getCVContext() { return *CVContext.get(); } -void MCContext::clearCVLocSeen() { - if (CVContext) - CVContext->clearCVLocSeen(); -} - //===----------------------------------------------------------------------===// // Error Reporting //===----------------------------------------------------------------------===// diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp index 9a55ac0..019b934 100644 --- a/llvm/lib/MC/MCObjectStreamer.cpp +++ b/llvm/lib/MC/MCObjectStreamer.cpp @@ -173,7 +173,6 @@ void MCObjectStreamer::EmitValueImpl(const MCExpr *Value, unsigned Size, MCDataFragment *DF = getOrCreateDataFragment(); flushPendingLabels(DF, DF->getContents().size()); - MCCVLineEntry::Make(this); MCDwarfLineEntry::Make(this, getCurrentSectionOnly()); // Avoid fixups when possible. @@ -270,7 +269,6 @@ bool MCObjectStreamer::changeSectionImpl(MCSection *Section, const MCExpr *Subsection) { assert(Section && "Cannot switch to a null section!"); flushPendingLabels(nullptr); - getContext().clearCVLocSeen(); getContext().clearDwarfLocSeen(); bool Created = getAssembler().registerSection(*Section); @@ -311,7 +309,6 @@ void MCObjectStreamer::EmitInstructionImpl(const MCInst &Inst, // Now that a machine instruction has been assembled into this section, make // a line entry for any .loc directive that has been seen. - MCCVLineEntry::Make(this); MCDwarfLineEntry::Make(this, getCurrentSectionOnly()); // If this instruction doesn't need relaxation, just emit it as data. @@ -446,12 +443,16 @@ void MCObjectStreamer::EmitCVLocDirective(unsigned FunctionId, unsigned FileNo, unsigned Line, unsigned Column, bool PrologueEnd, bool IsStmt, StringRef FileName, SMLoc Loc) { - // Unlike dwarf locations, we don't save the MCCVLineEntry until the next - // instruction. We create the label exactly where the directive appears in the - // assembly. - this->MCStreamer::EmitCVLocDirective(FunctionId, FileNo, Line, Column, - PrologueEnd, IsStmt, FileName, Loc); - MCCVLineEntry::Make(this); + // Validate the directive. + if (!checkCVLocSection(FunctionId, FileNo, Loc)) + return; + + // Emit a label at the current position and record it in the CodeViewContext. + MCSymbol *LineSym = getContext().createTempSymbol(); + EmitLabel(LineSym); + getContext().getCVContext().recordCVLoc(getContext(), LineSym, FunctionId, + FileNo, Line, Column, PrologueEnd, + IsStmt); } void MCObjectStreamer::EmitCVLinetableDirective(unsigned FunctionId, @@ -491,7 +492,6 @@ void MCObjectStreamer::EmitCVFileChecksumOffsetDirective(unsigned FileNo) { } void MCObjectStreamer::EmitBytes(StringRef Data) { - MCCVLineEntry::Make(this); MCDwarfLineEntry::Make(this, getCurrentSectionOnly()); MCDataFragment *DF = getOrCreateDataFragment(); flushPendingLabels(DF, DF->getContents().size()); diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp index 21a9c36..372bb2c 100644 --- a/llvm/lib/MC/MCStreamer.cpp +++ b/llvm/lib/MC/MCStreamer.cpp @@ -270,22 +270,28 @@ bool MCStreamer::EmitCVInlineSiteIdDirective(unsigned FunctionId, void MCStreamer::EmitCVLocDirective(unsigned FunctionId, unsigned FileNo, unsigned Line, unsigned Column, bool PrologueEnd, bool IsStmt, - StringRef FileName, SMLoc Loc) { + StringRef FileName, SMLoc Loc) {} + +bool MCStreamer::checkCVLocSection(unsigned FunctionId, unsigned FileNo, + SMLoc Loc) { CodeViewContext &CVC = getContext().getCVContext(); MCCVFunctionInfo *FI = CVC.getCVFunctionInfo(FunctionId); - if (!FI) - return getContext().reportError( + if (!FI) { + getContext().reportError( Loc, "function id not introduced by .cv_func_id or .cv_inline_site_id"); + return false; + } // Track the section if (FI->Section == nullptr) FI->Section = getCurrentSectionOnly(); - else if (FI->Section != getCurrentSectionOnly()) - return getContext().reportError( + else if (FI->Section != getCurrentSectionOnly()) { + getContext().reportError( Loc, "all .cv_loc directives for a function must be in the same section"); - - CVC.setCurrentCVLoc(FunctionId, FileNo, Line, Column, PrologueEnd, IsStmt); + return false; + } + return true; } void MCStreamer::EmitCVLinetableDirective(unsigned FunctionId, diff --git a/llvm/test/DebugInfo/COFF/asm.ll b/llvm/test/DebugInfo/COFF/asm.ll index 4daf30e..fa2a258 100644 --- a/llvm/test/DebugInfo/COFF/asm.ll +++ b/llvm/test/DebugInfo/COFF/asm.ll @@ -14,7 +14,7 @@ ; X86-LABEL: _f: ; X86: .cv_file 1 "D:\\asm.c" -; X86: .cv_loc 0 1 4 0 is_stmt 0 +; X86: .cv_loc 0 1 4 0 ; X86: .cv_loc 0 1 5 0 ; X86: calll _g ; X86: .cv_loc 0 1 6 0 @@ -71,7 +71,7 @@ ; X64-LABEL: f: ; X64: .cv_file 1 "D:\\asm.c" -; X64: .cv_loc 0 1 3 0 is_stmt 0 +; X64: .cv_loc 0 1 3 0 ; X64: subq $40, %rsp ; X64: .cv_loc 0 1 4 0 ; X64: .cv_loc 0 1 5 0 diff --git a/llvm/test/DebugInfo/COFF/inlining-header.ll b/llvm/test/DebugInfo/COFF/inlining-header.ll index bd9bd96..4fdbfde 100644 --- a/llvm/test/DebugInfo/COFF/inlining-header.ll +++ b/llvm/test/DebugInfo/COFF/inlining-header.ll @@ -28,7 +28,7 @@ ; ASM: .cv_func_id 0 ; ASM: # %bb.0: # %entry ; ASM: .cv_file 1 "D:\\src\\llvm\\build\\t.cpp" -; ASM: .cv_loc 0 1 9 5 is_stmt 0 # t.cpp:9:5 +; ASM: .cv_loc 0 1 9 5 # t.cpp:9:5 ; ASM: incl "?x@@3HC" ; ASM: .cv_inline_site_id 1 within 0 inlined_at 1 10 3 ; ASM: .cv_loc 1 1 4 5 # t.cpp:4:5 diff --git a/llvm/test/DebugInfo/COFF/inlining.ll b/llvm/test/DebugInfo/COFF/inlining.ll index c61b78f..c399aca 100644 --- a/llvm/test/DebugInfo/COFF/inlining.ll +++ b/llvm/test/DebugInfo/COFF/inlining.ll @@ -22,7 +22,7 @@ ; 17: } ; ASM: .cv_func_id 0 -; ASM: .cv_loc 0 1 13 0 is_stmt 0 # t.cpp:13:0 +; ASM: .cv_loc 0 1 13 0 # t.cpp:13:0 ; ASM: .cv_loc 0 1 14 5 # t.cpp:14:5 ; ASM: addl $6, "?x@@3HC" ; ASM: .cv_inline_site_id 1 within 0 inlined_at 1 15 3 diff --git a/llvm/test/DebugInfo/COFF/local-variables.ll b/llvm/test/DebugInfo/COFF/local-variables.ll index b549b1a..683b438 100644 --- a/llvm/test/DebugInfo/COFF/local-variables.ll +++ b/llvm/test/DebugInfo/COFF/local-variables.ll @@ -24,7 +24,7 @@ ; ASM: f: # @f ; ASM: .cv_func_id 0 ; ASM: .cv_file 1 "D:\\src\\llvm\\build\\t.cpp" -; ASM: .cv_loc 0 1 7 0 is_stmt 0 # t.cpp:7:0 +; ASM: .cv_loc 0 1 7 0 # t.cpp:7:0 ; ASM: .seh_proc f ; ASM: # %bb.0: # %entry ; ASM: subq $56, %rsp diff --git a/llvm/test/DebugInfo/COFF/multifile.ll b/llvm/test/DebugInfo/COFF/multifile.ll index 46c92a7..ea6e758 100644 --- a/llvm/test/DebugInfo/COFF/multifile.ll +++ b/llvm/test/DebugInfo/COFF/multifile.ll @@ -19,7 +19,7 @@ ; X86-LABEL: _f: ; X86: # %bb. ; X86: .cv_file 1 "D:\\one.c" "70B51F534D80639D033AE92C6A856AF6" 1 -; X86: .cv_loc 0 1 1 0 is_stmt 0 # one.c:1:0 +; X86: .cv_loc 0 1 1 0 # one.c:1:0 ; X86: calll _g ; X86: .cv_file 2 "D:\\two.c" "70B51F534D80639D033AE92C6A856AF6" 1 ; X86: .cv_loc 0 2 2 0 # two.c:2:0 @@ -105,7 +105,7 @@ ; X64-LABEL: f: ; X64-NEXT: .L{{.*}}:{{$}} ; X64: .cv_file 1 "D:\\input.c" "70B51F534D80639D033AE92C6A856AF6" 1 -; X64: .cv_loc 0 1 3 0 is_stmt 0 # input.c:3:0 +; X64: .cv_loc 0 1 3 0 # input.c:3:0 ; X64: # %bb. ; X64: subq $40, %rsp ; X64: .cv_file 2 "D:\\one.c" "70B51F534D80639D033AE92C6A856AF6" 1 diff --git a/llvm/test/DebugInfo/COFF/multifunction.ll b/llvm/test/DebugInfo/COFF/multifunction.ll index db1e289..c675eda 100644 --- a/llvm/test/DebugInfo/COFF/multifunction.ll +++ b/llvm/test/DebugInfo/COFF/multifunction.ll @@ -25,7 +25,7 @@ ; X86-LABEL: _x: ; X86: # %bb. ; X86: .cv_file 1 "D:\\source.c" -; X86: .cv_loc 0 1 4 42 is_stmt 0 # source.c:4:42 +; X86: .cv_loc 0 1 4 42 # source.c:4:42 ; X86: calll _z ; X86: .cv_loc 0 1 5 43 # source.c:5:43 ; X86: ret @@ -286,7 +286,7 @@ ; X64-LABEL: x: ; X64-NEXT: .L{{.*}}: ; X64: .cv_file 1 "D:\\source.c" -; X64: .cv_loc 0 1 3 0 is_stmt 0 # source.c:3:0 +; X64: .cv_loc 0 1 3 0 # source.c:3:0 ; X64: # %bb. ; X64: subq $40, %rsp ; X64: .cv_loc 0 1 4 42 # source.c:4:42 diff --git a/llvm/test/DebugInfo/COFF/simple.ll b/llvm/test/DebugInfo/COFF/simple.ll index f9c6645..175be1a 100644 --- a/llvm/test/DebugInfo/COFF/simple.ll +++ b/llvm/test/DebugInfo/COFF/simple.ll @@ -22,7 +22,7 @@ ; X86-LABEL: _f: ; X86: # %bb. ; X86: .cv_file 1 "D:\\test.c" "F310AB26998CA831CBDF169E4EECACFA" 1 -; X86: .cv_loc 0 1 4 2 is_stmt 0 # test.c:4:2 +; X86: .cv_loc 0 1 4 2 # test.c:4:2 ; X86: calll _g ; X86: .cv_loc 0 1 5 0 # test.c:5:0 ; X86: ret @@ -134,7 +134,7 @@ ; X64-LABEL: f: ; X64-NEXT: .L{{.*}}:{{$}} ; X64: .cv_file 1 "D:\\test.c" "F310AB26998CA831CBDF169E4EECACFA" 1 -; X64: .cv_loc 0 1 3 0 is_stmt 0 # test.c:3:0 +; X64: .cv_loc 0 1 3 0 # test.c:3:0 ; X64: # %bb. ; X64: subq $40, %rsp ; X64: .cv_loc 0 1 4 2 # test.c:4:2 -- 2.7.4