[llvm] r259601 - [codeview] Improve readability of codeview assembly output
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 2 15:18:23 PST 2016
Author: majnemer
Date: Tue Feb 2 17:18:23 2016
New Revision: 259601
URL: http://llvm.org/viewvc/llvm-project?rev=259601&view=rev
Log:
[codeview] Improve readability of codeview assembly output
Strictly speaking, this is not an improvement in functionality per se
but a usability improvement to those debugging codeview.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
llvm/trunk/test/DebugInfo/COFF/asm.ll
llvm/trunk/test/DebugInfo/COFF/inlining.ll
llvm/trunk/test/DebugInfo/COFF/multifile.ll
llvm/trunk/test/DebugInfo/COFF/multifunction.ll
llvm/trunk/test/DebugInfo/COFF/simple.ll
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp?rev=259601&r1=259600&r2=259601&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp Tue Feb 2 17:18:23 2016
@@ -182,6 +182,7 @@ void CodeViewDebug::endModule() {
assert(Asm != nullptr);
Asm->OutStreamer->SwitchSection(
Asm->getObjFileLowering().getCOFFDebugSymbolsSection());
+ Asm->OutStreamer->AddComment("Debug section magic");
Asm->EmitInt32(COFF::DEBUG_SECTION_MAGIC);
// The COFF .debug$S section consists of several subsections, each starting
@@ -207,14 +208,11 @@ void CodeViewDebug::endModule() {
clear();
}
-template <typename T> static void emitRecord(MCStreamer &OS, const T &Rec) {
- OS.EmitBytes(StringRef(reinterpret_cast<const char *>(&Rec), sizeof(Rec)));
-}
-
void CodeViewDebug::emitTypeInformation() {
// Start the .debug$T section with 0x4.
Asm->OutStreamer->SwitchSection(
Asm->getObjFileLowering().getCOFFDebugTypesSection());
+ Asm->OutStreamer->AddComment("Debug section magic");
Asm->EmitInt32(COFF::DEBUG_SECTION_MAGIC);
NamedMDNode *CU_Nodes =
@@ -226,34 +224,49 @@ void CodeViewDebug::emitTypeInformation(
// frame info. All functions are assigned a simple 'void ()' type. Emit that
// type here.
TypeIndex ArgListIdx = getNextTypeIndex();
+ Asm->OutStreamer->AddComment("Type record length");
Asm->EmitInt16(2 + sizeof(ArgList));
+ Asm->OutStreamer->AddComment("Leaf type: LF_ARGLIST");
Asm->EmitInt16(LF_ARGLIST);
+ Asm->OutStreamer->AddComment("Number of arguments");
Asm->EmitInt32(0);
TypeIndex VoidProcIdx = getNextTypeIndex();
+ Asm->OutStreamer->AddComment("Type record length");
Asm->EmitInt16(2 + sizeof(ProcedureType));
+ Asm->OutStreamer->AddComment("Leaf type: LF_PROCEDURE");
Asm->EmitInt16(LF_PROCEDURE);
- ProcedureType Proc{}; // Zero initialize.
- Proc.ReturnType = TypeIndex::Void();
- Proc.CallConv = CallingConvention::NearC;
- Proc.Options = FunctionOptions::None;
- Proc.NumParameters = 0;
- Proc.ArgListType = ArgListIdx;
- emitRecord(*Asm->OutStreamer, Proc);
+ Asm->OutStreamer->AddComment("Return type index");
+ Asm->EmitInt32(TypeIndex::Void().getIndex());
+ Asm->OutStreamer->AddComment("Calling convention");
+ Asm->EmitInt8(char(CallingConvention::NearC));
+ Asm->OutStreamer->AddComment("Function options");
+ Asm->EmitInt8(char(FunctionOptions::None));
+ Asm->OutStreamer->AddComment("# of parameters");
+ Asm->EmitInt16(0);
+ Asm->OutStreamer->AddComment("Argument list type index");
+ Asm->EmitInt32(ArgListIdx.getIndex());
for (MDNode *N : CU_Nodes->operands()) {
auto *CUNode = cast<DICompileUnit>(N);
for (auto *SP : CUNode->getSubprograms()) {
StringRef DisplayName = SP->getDisplayName();
+ Asm->OutStreamer->AddComment("Type record length");
Asm->EmitInt16(2 + sizeof(FuncId) + DisplayName.size() + 1);
+ Asm->OutStreamer->AddComment("Leaf type: LF_FUNC_ID");
Asm->EmitInt16(LF_FUNC_ID);
- FuncId Func{}; // Zero initialize.
- Func.ParentScope = TypeIndex();
- Func.FunctionType = VoidProcIdx;
- emitRecord(*Asm->OutStreamer, Func);
- Asm->OutStreamer->EmitBytes(DisplayName);
- Asm->EmitInt8(0);
+ Asm->OutStreamer->AddComment("Scope type index");
+ Asm->EmitInt32(TypeIndex().getIndex());
+ Asm->OutStreamer->AddComment("Function type");
+ Asm->EmitInt32(VoidProcIdx.getIndex());
+ {
+ SmallString<32> NullTerminatedString(DisplayName);
+ if (NullTerminatedString.empty() || NullTerminatedString.back() != '\0')
+ NullTerminatedString.push_back('\0');
+ Asm->OutStreamer->AddComment("Function name");
+ Asm->OutStreamer->EmitBytes(NullTerminatedString);
+ }
TypeIndex FuncIdIdx = getNextTypeIndex();
SubprogramToFuncId.insert(std::make_pair(SP, FuncIdIdx));
@@ -271,23 +284,30 @@ void CodeViewDebug::emitInlineeLinesSubs
OS.AddComment("Inlinee lines subsection");
OS.EmitIntValue(unsigned(ModuleSubstreamKind::InlineeLines), 4);
+ OS.AddComment("Subsection size");
OS.emitAbsoluteSymbolDiff(InlineEnd, InlineBegin, 4);
OS.EmitLabel(InlineBegin);
// We don't provide any extra file info.
// FIXME: Find out if debuggers use this info.
+ OS.AddComment("Inlinee lines signature");
OS.EmitIntValue(unsigned(InlineeLinesSignature::Normal), 4);
for (const DISubprogram *SP : InlinedSubprograms) {
+ OS.AddBlankLine();
TypeIndex TypeId = SubprogramToFuncId[SP];
unsigned FileId = maybeRecordFile(SP->getFile());
OS.AddComment("Inlined function " + SP->getDisplayName() + " starts at " +
SP->getFilename() + Twine(':') + Twine(SP->getLine()));
+ OS.AddBlankLine();
// The filechecksum table uses 8 byte entries for now, and file ids start at
// 1.
unsigned FileOffset = (FileId - 1) * 8;
+ OS.AddComment("Type index of inlined function");
OS.EmitIntValue(TypeId.getIndex(), 4);
+ OS.AddComment("Offset into filechecksum table");
OS.EmitIntValue(FileOffset, 4);
+ OS.AddComment("Starting line number");
OS.EmitIntValue(SP->getLine(), 4);
}
@@ -330,14 +350,18 @@ void CodeViewDebug::emitInlinedCallSite(
TypeIndex InlineeIdx = SubprogramToFuncId[Site.Inlinee];
// SymbolRecord
+ Asm->OutStreamer->AddComment("Record length");
EmitLabelDiff(OS, InlineBegin, InlineEnd, 2); // RecordLength
OS.EmitLabel(InlineBegin);
+ Asm->OutStreamer->AddComment("Record kind: S_INLINESITE");
Asm->EmitInt16(SymbolRecordKind::S_INLINESITE); // RecordKind
- InlineSiteSym SiteBytes{};
- SiteBytes.Inlinee = InlineeIdx;
- Asm->OutStreamer->EmitBytes(
- StringRef(reinterpret_cast<const char *>(&SiteBytes), sizeof(SiteBytes)));
+ Asm->OutStreamer->AddComment("PtrParent");
+ Asm->OutStreamer->EmitIntValue(0, 4);
+ Asm->OutStreamer->AddComment("PtrEnd");
+ Asm->OutStreamer->EmitIntValue(0, 4);
+ Asm->OutStreamer->AddComment("Inlinee type index");
+ Asm->EmitInt32(InlineeIdx.getIndex());
unsigned FileId = maybeRecordFile(Site.Inlinee->getFile());
unsigned StartLineNum = Site.Inlinee->getLine();
@@ -358,7 +382,9 @@ void CodeViewDebug::emitInlinedCallSite(
}
// Close the scope.
+ Asm->OutStreamer->AddComment("Record length");
Asm->EmitInt16(2); // RecordLength
+ Asm->OutStreamer->AddComment("Record kind: S_INLINESITE_END");
Asm->EmitInt16(SymbolRecordKind::S_INLINESITE_END); // RecordKind
}
@@ -382,30 +408,51 @@ void CodeViewDebug::emitDebugInfoForFunc
*SymbolsEnd = Asm->MMI->getContext().createTempSymbol();
Asm->OutStreamer->AddComment("Symbol subsection for " + Twine(FuncName));
Asm->EmitInt32(unsigned(ModuleSubstreamKind::Symbols));
+ Asm->OutStreamer->AddComment("Subsection size");
EmitLabelDiff(*Asm->OutStreamer, SymbolsBegin, SymbolsEnd);
Asm->OutStreamer->EmitLabel(SymbolsBegin);
{
- MCSymbol *ProcSegmentBegin = Asm->MMI->getContext().createTempSymbol(),
- *ProcSegmentEnd = Asm->MMI->getContext().createTempSymbol();
- EmitLabelDiff(*Asm->OutStreamer, ProcSegmentBegin, ProcSegmentEnd, 2);
- Asm->OutStreamer->EmitLabel(ProcSegmentBegin);
+ MCSymbol *ProcRecordBegin = Asm->MMI->getContext().createTempSymbol(),
+ *ProcRecordEnd = Asm->MMI->getContext().createTempSymbol();
+ Asm->OutStreamer->AddComment("Record length");
+ EmitLabelDiff(*Asm->OutStreamer, ProcRecordBegin, ProcRecordEnd, 2);
+ Asm->OutStreamer->EmitLabel(ProcRecordBegin);
+ Asm->OutStreamer->AddComment("Record kind: S_GPROC32_ID");
Asm->EmitInt16(unsigned(SymbolRecordKind::S_GPROC32_ID));
- // Some bytes of this segment don't seem to be required for basic debugging,
- // so just fill them with zeroes.
- Asm->OutStreamer->EmitFill(12, 0);
+ // These fields are filled in by tools like CVPACK which run after the fact.
+ Asm->OutStreamer->AddComment("PtrParent");
+ Asm->OutStreamer->EmitIntValue(0, 4);
+ Asm->OutStreamer->AddComment("PtrEnd");
+ Asm->OutStreamer->EmitIntValue(0, 4);
+ Asm->OutStreamer->AddComment("PtrNext");
+ Asm->OutStreamer->EmitIntValue(0, 4);
// This is the important bit that tells the debugger where the function
// code is located and what's its size:
+ Asm->OutStreamer->AddComment("Code size");
EmitLabelDiff(*Asm->OutStreamer, Fn, FI.End);
- Asm->OutStreamer->EmitFill(12, 0);
+ Asm->OutStreamer->AddComment("Offset after prologue");
+ Asm->OutStreamer->EmitIntValue(0, 4);
+ Asm->OutStreamer->AddComment("Offset before epilogue");
+ Asm->OutStreamer->EmitIntValue(0, 4);
+ Asm->OutStreamer->AddComment("Function type index");
+ Asm->OutStreamer->EmitIntValue(0, 4);
+ Asm->OutStreamer->AddComment("Function section relative address");
Asm->OutStreamer->EmitCOFFSecRel32(Fn);
+ Asm->OutStreamer->AddComment("Function section index");
Asm->OutStreamer->EmitCOFFSectionIndex(Fn);
+ Asm->OutStreamer->AddComment("Flags");
Asm->EmitInt8(0);
// Emit the function display name as a null-terminated string.
- Asm->OutStreamer->EmitBytes(FuncName);
- Asm->EmitInt8(0);
- Asm->OutStreamer->EmitLabel(ProcSegmentEnd);
+ Asm->OutStreamer->AddComment("Function name");
+ {
+ SmallString<32> NullTerminatedString(FuncName);
+ if (NullTerminatedString.empty() || NullTerminatedString.back() != '\0')
+ NullTerminatedString.push_back('\0');
+ Asm->OutStreamer->EmitBytes(NullTerminatedString);
+ }
+ Asm->OutStreamer->EmitLabel(ProcRecordEnd);
// Emit inlined call site information. Only emit functions inlined directly
// into the parent function. We'll emit the other sites recursively as part
@@ -417,7 +464,9 @@ void CodeViewDebug::emitDebugInfoForFunc
}
// We're done with this function.
+ Asm->OutStreamer->AddComment("Record length");
Asm->EmitInt16(0x0002);
+ Asm->OutStreamer->AddComment("Record kind: S_PROC_ID_END");
Asm->EmitInt16(unsigned(SymbolRecordKind::S_PROC_ID_END));
}
Asm->OutStreamer->EmitLabel(SymbolsEnd);
Modified: llvm/trunk/test/DebugInfo/COFF/asm.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/asm.ll?rev=259601&r1=259600&r2=259601&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/COFF/asm.ll (original)
+++ llvm/trunk/test/DebugInfo/COFF/asm.ll Tue Feb 2 17:18:23 2016
@@ -25,19 +25,22 @@
; X86-NEXT: .long 4
; Symbol subsection
; X86-NEXT: .long 241
-; X86-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]]
+; X86-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
; X86-NEXT: [[F1_START]]:
-; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]]
+; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
; X86-NEXT: [[PROC_SEGMENT_START]]:
; X86-NEXT: .short 4423
-; X86-NEXT: .zero 12
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
; X86-NEXT: .long [[END_OF_F]]-_f
-; X86-NEXT: .zero 12
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
; X86-NEXT: .secrel32 _f
; X86-NEXT: .secidx _f
; X86-NEXT: .byte 0
-; X86-NEXT: .byte 102
-; X86-NEXT: .byte 0
+; X86-NEXT: .asciz "f"
; X86-NEXT: [[PROC_SEGMENT_END]]:
; X86-NEXT: .short 2
; X86-NEXT: .short 4431
@@ -113,19 +116,22 @@
; X64-NEXT: .long 4
; Symbol subsection
; X64-NEXT: .long 241
-; X64-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]]
+; X64-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
; X64-NEXT: [[F1_START]]:
-; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]]
+; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
; X64-NEXT: [[PROC_SEGMENT_START]]:
; X64-NEXT: .short 4423
-; X64-NEXT: .zero 12
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
; X64-NEXT: .long [[END_OF_F]]-f
-; X64-NEXT: .zero 12
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
; X64-NEXT: .secrel32 f
; X64-NEXT: .secidx f
; X64-NEXT: .byte 0
-; X64-NEXT: .byte 102
-; X64-NEXT: .byte 0
+; X64-NEXT: .asciz "f"
; X64-NEXT: [[PROC_SEGMENT_END]]:
; X64-NEXT: .short 2
; X64-NEXT: .short 4431
Modified: llvm/trunk/test/DebugInfo/COFF/inlining.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/inlining.ll?rev=259601&r1=259600&r2=259601&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/COFF/inlining.ll (original)
+++ llvm/trunk/test/DebugInfo/COFF/inlining.ll Tue Feb 2 17:18:23 2016
@@ -41,13 +41,15 @@
; ASM: .section .debug$S,"dr"
; ASM: .long 246 # Inlinee lines subsection
-; ASM: .long [[inline_end:.*]]-[[inline_beg:.*]]
+; ASM: .long [[inline_end:.*]]-[[inline_beg:.*]] #
; ASM: [[inline_beg]]:
; ASM: .long 0
-; ASM: .long 4099 # Inlined function bar starts at t.cpp:8
+; ASM: # Inlined function bar starts at t.cpp:8
+; ASM: .long 4099
; ASM: .long 0
; ASM: .long 8
-; ASM: .long 4100 # Inlined function foo starts at t.cpp:2
+; ASM: # Inlined function foo starts at t.cpp:2
+; ASM: .long 4100
; ASM: .long 0
; ASM: .long 2
; ASM: [[inline_end]]:
@@ -55,10 +57,14 @@
; ASM: .long 241 # Symbol subsection for baz
; ASM: .long Ltmp3-Ltmp2
; ASM: .short 4429
-; ASM: .asciz
+; ASM: .long
+; ASM: .long
+; ASM: .long
; ASM: .cv_inline_linetable 1 1 8 Lfunc_begin0 Lfunc_end0 contains 2
; ASM: .short 4429
-; ASM: .asciz
+; ASM: .long
+; ASM: .long
+; ASM: .long
; ASM: .cv_inline_linetable 2 1 2 Lfunc_begin0 Lfunc_end0
; ASM: .short 4430
; ASM: .short 4430
Modified: llvm/trunk/test/DebugInfo/COFF/multifile.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/multifile.ll?rev=259601&r1=259600&r2=259601&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/COFF/multifile.ll (original)
+++ llvm/trunk/test/DebugInfo/COFF/multifile.ll Tue Feb 2 17:18:23 2016
@@ -34,19 +34,22 @@
; X86-NEXT: .long 4
; Symbol subsection
; X86-NEXT: .long 241
-; X86-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]]
+; X86-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
; X86-NEXT: [[F1_START]]:
-; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]]
+; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
; X86-NEXT: [[PROC_SEGMENT_START]]:
; X86-NEXT: .short 4423
-; X86-NEXT: .zero 12
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
; X86-NEXT: .long [[END_OF_F]]-_f
-; X86-NEXT: .zero 12
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
; X86-NEXT: .secrel32 _f
; X86-NEXT: .secidx _f
; X86-NEXT: .byte 0
-; X86-NEXT: .byte 102
-; X86-NEXT: .byte 0
+; X86-NEXT: .asciz "f"
; X86-NEXT: [[PROC_SEGMENT_END]]:
; X86-NEXT: .short 2
; X86-NEXT: .short 4431
@@ -137,19 +140,22 @@
; X64-NEXT: .long 4
; Symbol subsection
; X64-NEXT: .long 241
-; X64-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]]
+; X64-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
; X64-NEXT: [[F1_START]]:
-; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]]
+; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
; X64-NEXT: [[PROC_SEGMENT_START]]:
; X64-NEXT: .short 4423
-; X64-NEXT: .zero 12
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
; X64-NEXT: .long [[END_OF_F]]-f
-; X64-NEXT: .zero 12
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
; X64-NEXT: .secrel32 f
; X64-NEXT: .secidx f
; X64-NEXT: .byte 0
-; X64-NEXT: .byte 102
-; X64-NEXT: .byte 0
+; X64-NEXT: .asciz "f"
; X64-NEXT: [[PROC_SEGMENT_END]]:
; X64-NEXT: .short 2
; X64-NEXT: .short 4431
Modified: llvm/trunk/test/DebugInfo/COFF/multifunction.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/multifunction.ll?rev=259601&r1=259600&r2=259601&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/COFF/multifunction.ll (original)
+++ llvm/trunk/test/DebugInfo/COFF/multifunction.ll Tue Feb 2 17:18:23 2016
@@ -55,19 +55,22 @@
; X86-NEXT: .long 4
; Symbol subsection for x
; X86-NEXT: .long 241
-; X86-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]]
+; X86-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
; X86-NEXT: [[F1_START]]:
-; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]]
+; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
; X86-NEXT: [[PROC_SEGMENT_START]]:
; X86-NEXT: .short 4423
-; X86-NEXT: .zero 12
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
; X86-NEXT: .long [[END_OF_X]]-_x
-; X86-NEXT: .zero 12
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
; X86-NEXT: .secrel32 _x
; X86-NEXT: .secidx _x
; X86-NEXT: .byte 0
-; X86-NEXT: .byte 120
-; X86-NEXT: .byte 0
+; X86-NEXT: .asciz "x"
; X86-NEXT: [[PROC_SEGMENT_END]]:
; X86-NEXT: .short 2
; X86-NEXT: .short 4431
@@ -77,19 +80,22 @@
; X86: .cv_linetable 0, _x, [[END_OF_X]]
; Symbol subsection for y
; X86-NEXT: .long 241
-; X86-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]]
+; X86-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
; X86-NEXT: [[F1_START]]:
-; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]]
+; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
; X86-NEXT: [[PROC_SEGMENT_START]]:
; X86-NEXT: .short 4423
-; X86-NEXT: .zero 12
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
; X86-NEXT: .long [[END_OF_Y]]-_y
-; X86-NEXT: .zero 12
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
; X86-NEXT: .secrel32 _y
; X86-NEXT: .secidx _y
; X86-NEXT: .byte 0
-; X86-NEXT: .byte 121
-; X86-NEXT: .byte 0
+; X86-NEXT: .asciz "y"
; X86-NEXT: [[PROC_SEGMENT_END]]:
; X86-NEXT: .short 2
; X86-NEXT: .short 4431
@@ -99,19 +105,22 @@
; X86: .cv_linetable 1, _y, [[END_OF_Y]]
; Symbol subsection for f
; X86-NEXT: .long 241
-; X86-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]]
+; X86-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
; X86-NEXT: [[F1_START]]:
-; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]]
+; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
; X86-NEXT: [[PROC_SEGMENT_START]]:
; X86-NEXT: .short 4423
-; X86-NEXT: .zero 12
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
; X86-NEXT: .long [[END_OF_F]]-_f
-; X86-NEXT: .zero 12
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
; X86-NEXT: .secrel32 _f
; X86-NEXT: .secidx _f
; X86-NEXT: .byte 0
-; X86-NEXT: .byte 102
-; X86-NEXT: .byte 0
+; X86-NEXT: .asciz "f"
; X86-NEXT: [[PROC_SEGMENT_END]]:
; X86-NEXT: .short 2
; X86-NEXT: .short 4431
@@ -306,19 +315,22 @@
; X64-NEXT: .long 4
; Symbol subsection for x
; X64-NEXT: .long 241
-; X64-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]]
+; X64-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
; X64-NEXT: [[F1_START]]:
-; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]]
+; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
; X64-NEXT: [[PROC_SEGMENT_START]]:
; X64-NEXT: .short 4423
-; X64-NEXT: .zero 12
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
; X64-NEXT: .long [[END_OF_X]]-x
-; X64-NEXT: .zero 12
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
; X64-NEXT: .secrel32 x
; X64-NEXT: .secidx x
; X64-NEXT: .byte 0
-; X64-NEXT: .byte 120
-; X64-NEXT: .byte 0
+; X64-NEXT: .asciz "x"
; X64-NEXT: [[PROC_SEGMENT_END]]:
; X64-NEXT: .short 2
; X64-NEXT: .short 4431
@@ -328,19 +340,22 @@
; X64: .cv_linetable 0, x, [[END_OF_X]]
; Symbol subsection for y
; X64-NEXT: .long 241
-; X64-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]]
+; X64-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
; X64-NEXT: [[F1_START]]:
-; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]]
+; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
; X64-NEXT: [[PROC_SEGMENT_START]]:
; X64-NEXT: .short 4423
-; X64-NEXT: .zero 12
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
; X64-NEXT: .long [[END_OF_Y]]-y
-; X64-NEXT: .zero 12
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
; X64-NEXT: .secrel32 y
; X64-NEXT: .secidx y
; X64-NEXT: .byte 0
-; X64-NEXT: .byte 121
-; X64-NEXT: .byte 0
+; X64-NEXT: .asciz "y"
; X64-NEXT: [[PROC_SEGMENT_END]]:
; X64-NEXT: .short 2
; X64-NEXT: .short 4431
@@ -350,19 +365,22 @@
; X64: .cv_linetable 1, y, [[END_OF_Y]]
; Symbol subsection for f
; X64-NEXT: .long 241
-; X64-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]]
+; X64-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
; X64-NEXT: [[F1_START]]:
-; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]]
+; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
; X64-NEXT: [[PROC_SEGMENT_START]]:
; X64-NEXT: .short 4423
-; X64-NEXT: .zero 12
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
; X64-NEXT: .long [[END_OF_F]]-f
-; X64-NEXT: .zero 12
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
; X64-NEXT: .secrel32 f
; X64-NEXT: .secidx f
; X64-NEXT: .byte 0
-; X64-NEXT: .byte 102
-; X64-NEXT: .byte 0
+; X64-NEXT: .asciz "f"
; X64-NEXT: [[PROC_SEGMENT_END]]:
; X64-NEXT: .short 2
; X64-NEXT: .short 4431
Modified: llvm/trunk/test/DebugInfo/COFF/simple.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/COFF/simple.ll?rev=259601&r1=259600&r2=259601&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/COFF/simple.ll (original)
+++ llvm/trunk/test/DebugInfo/COFF/simple.ll Tue Feb 2 17:18:23 2016
@@ -24,19 +24,22 @@
; X86-NEXT: .long 4
; Symbol subsection
; X86-NEXT: .long 241
-; X86-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]]
+; X86-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
; X86-NEXT: [[F1_START]]:
-; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]]
+; X86-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
; X86-NEXT: [[PROC_SEGMENT_START]]:
; X86-NEXT: .short 4423
-; X86-NEXT: .zero 12
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
; X86-NEXT: .long [[END_OF_F]]-_f
-; X86-NEXT: .zero 12
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
+; X86-NEXT: .long 0
; X86-NEXT: .secrel32 _f
; X86-NEXT: .secidx _f
; X86-NEXT: .byte 0
-; X86-NEXT: .byte 102
-; X86-NEXT: .byte 0
+; X86-NEXT: .asciz "f"
; X86-NEXT: [[PROC_SEGMENT_END]]:
; X86-NEXT: .short 2
; X86-NEXT: .short 4431
@@ -109,19 +112,22 @@
; X64-NEXT: .long 4
; Symbol subsection
; X64-NEXT: .long 241
-; X64-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]]
+; X64-NEXT: .long [[F1_END:.*]]-[[F1_START:.*]] #
; X64-NEXT: [[F1_START]]:
-; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]]
+; X64-NEXT: .short [[PROC_SEGMENT_END:.*]]-[[PROC_SEGMENT_START:.*]] #
; X64-NEXT: [[PROC_SEGMENT_START]]:
; X64-NEXT: .short 4423
-; X64-NEXT: .zero 12
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
; X64-NEXT: .long [[END_OF_F]]-f
-; X64-NEXT: .zero 12
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
+; X64-NEXT: .long 0
; X64-NEXT: .secrel32 f
; X64-NEXT: .secidx f
; X64-NEXT: .byte 0
-; X64-NEXT: .byte 102
-; X64-NEXT: .byte 0
+; X64-NEXT: .asciz "f"
; X64-NEXT: [[PROC_SEGMENT_END]]:
; X64-NEXT: .short 2
; X64-NEXT: .short 4431
More information about the llvm-commits
mailing list