[Lldb-commits] [lldb] f8499d5 - Emit the correct flags for the PROC CodeView Debug Symbol
Eli Friedman via lldb-commits
lldb-commits at lists.llvm.org
Tue May 16 10:59:01 PDT 2023
Author: Daniel Paoliello
Date: 2023-05-16T10:58:10-07:00
New Revision: f8499d5709e37b4e9a6d2a39c385cfd2c00bad6e
URL: https://github.com/llvm/llvm-project/commit/f8499d5709e37b4e9a6d2a39c385cfd2c00bad6e
DIFF: https://github.com/llvm/llvm-project/commit/f8499d5709e37b4e9a6d2a39c385cfd2c00bad6e.diff
LOG: Emit the correct flags for the PROC CodeView Debug Symbol
The S_LPROC32_ID and S_GPROC32_ID CodeView Debug Symbols have a flags
field which LLVM has had the values for (in the ProcSymFlags enum) but
has never actually set.
These flags are used by Microsoft-internal tooling that leverages debug
information to do binary analysis.
Modified LLVM to set the correct flags:
- ProcSymFlags::HasOptimizedDebugInfo - always set, as this indicates that
debug info is present for optimized builds (if debug info is not emitted
for optimized builds, then LLVM won't emit a debug symbol at all).
- ProcSymFlags::IsNoReturn and ProcSymFlags::IsNoInline - set if the
function has the NoReturn or NoInline attributes respectively.
- ProcSymFlags::HasFP - set if the function requires a frame pointer (per
TargetFrameLowering::hasFP).
Per discussion in review, XFAIL'ing lldb test until someone working on
lldb has a chance to look at it.
Differential Revision: https://reviews.llvm.org/D148761
Added:
Modified:
lldb/test/Shell/SymbolFile/PDB/function-nested-block.test
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
llvm/test/DebugInfo/COFF/fpo-realign-alloca.ll
llvm/test/DebugInfo/COFF/fpo-realign-vframe.ll
llvm/test/DebugInfo/COFF/frameproc-flags.ll
llvm/test/DebugInfo/COFF/function-options.ll
llvm/test/DebugInfo/COFF/inlining-header.ll
llvm/test/DebugInfo/COFF/inlining.ll
llvm/test/DebugInfo/COFF/long-name.ll
llvm/test/DebugInfo/COFF/multifunction.ll
llvm/test/DebugInfo/COFF/simple.ll
llvm/test/DebugInfo/COFF/types-array.ll
llvm/test/DebugInfo/COFF/types-basic.ll
llvm/test/MC/AArch64/coff-debug.ll
Removed:
################################################################################
diff --git a/lldb/test/Shell/SymbolFile/PDB/function-nested-block.test b/lldb/test/Shell/SymbolFile/PDB/function-nested-block.test
index 9057d01c25840..1cb20a4036382 100644
--- a/lldb/test/Shell/SymbolFile/PDB/function-nested-block.test
+++ b/lldb/test/Shell/SymbolFile/PDB/function-nested-block.test
@@ -2,6 +2,7 @@ REQUIRES: system-windows, lld
RUN: %build --compiler=clang-cl --nodefaultlib --output=%t.exe %S/Inputs/FunctionNestedBlockTest.cpp
RUN: lldb-test symbols -find=function -file FunctionNestedBlockTest.cpp -line 4 %t.exe | FileCheck --check-prefix=CHECK-FUNCTION %s
RUN: lldb-test symbols -find=block -file FunctionNestedBlockTest.cpp -line 4 %t.exe | FileCheck --check-prefix=CHECK-BLOCK %s
+XFAIL: *
CHECK-FUNCTION: Found 1 functions:
CHECK-FUNCTION: name = "{{.*}}", mangled = "{{_?}}main"
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
index ce5fe6139f918..8161de57b58e0 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
@@ -1160,7 +1160,14 @@ void CodeViewDebug::emitDebugInfoForFunction(const Function *GV,
OS.AddComment("Function section index");
OS.emitCOFFSectionIndex(Fn);
OS.AddComment("Flags");
- OS.emitInt8(0);
+ ProcSymFlags ProcFlags = ProcSymFlags::HasOptimizedDebugInfo;
+ if (FI.HasFramePointer)
+ ProcFlags |= ProcSymFlags::HasFP;
+ if (GV->hasFnAttribute(Attribute::NoReturn))
+ ProcFlags |= ProcSymFlags::IsNoReturn;
+ if (GV->hasFnAttribute(Attribute::NoInline))
+ ProcFlags |= ProcSymFlags::IsNoInline;
+ OS.emitInt8(static_cast<uint8_t>(ProcFlags));
// Emit the function display name as a null-terminated string.
OS.AddComment("Function name");
// Truncate the name so we won't overflow the record length field.
@@ -1480,6 +1487,7 @@ void CodeViewDebug::beginFunctionImpl(const MachineFunction *MF) {
CurFn->EncodedLocalFramePtrReg = EncodedFramePtrReg::StackPtr;
CurFn->EncodedParamFramePtrReg = EncodedFramePtrReg::StackPtr;
} else {
+ CurFn->HasFramePointer = true;
// If there is an FP, parameters are always relative to it.
CurFn->EncodedParamFramePtrReg = EncodedFramePtrReg::FramePtr;
if (CurFn->HasStackRealignment) {
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
index 495822a6e6532..29445b31e7e74 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
@@ -191,6 +191,8 @@ class LLVM_LIBRARY_VISIBILITY CodeViewDebug : public DebugHandlerBase {
bool HasStackRealignment = false;
bool HaveLineInfo = false;
+
+ bool HasFramePointer = false;
};
FunctionInfo *CurFn = nullptr;
diff --git a/llvm/test/DebugInfo/COFF/fpo-realign-alloca.ll b/llvm/test/DebugInfo/COFF/fpo-realign-alloca.ll
index d8b3d35f87cb7..5bd19a03e745c 100644
--- a/llvm/test/DebugInfo/COFF/fpo-realign-alloca.ll
+++ b/llvm/test/DebugInfo/COFF/fpo-realign-alloca.ll
@@ -1,4 +1,5 @@
; RUN: llc < %s | FileCheck %s
+; RUN: llc -mtriple=i686-windows-msvc < %s -filetype=obj | llvm-readobj --codeview - | FileCheck %s --check-prefix=OBJ
; C source:
; void usethings(ptr, ptr p);
@@ -33,6 +34,15 @@
; CHECK: retl
; CHECK: .cv_fpo_endproc
+; OBJ-LABEL: FunctionType: realign_and_alloca (0x1002)
+; OBJ-NEXT: CodeOffset: _realign_and_alloca+0x0
+; OBJ-NEXT: Segment: 0x0
+; OBJ-NEXT: Flags [ (0x81)
+; OBJ-NEXT: HasFP (0x1)
+; OBJ-NEXT: HasOptimizedDebugInfo (0x80)
+; OBJ-NEXT: ]
+; OBJ-NEXT: DisplayName: realign_and_alloca
+; OBJ-NEXT: LinkageName: _realign_and_alloca
; ModuleID = 't.c'
source_filename = "t.c"
diff --git a/llvm/test/DebugInfo/COFF/fpo-realign-vframe.ll b/llvm/test/DebugInfo/COFF/fpo-realign-vframe.ll
index 0a032a8a5bfa5..5f1d6a5c28def 100644
--- a/llvm/test/DebugInfo/COFF/fpo-realign-vframe.ll
+++ b/llvm/test/DebugInfo/COFF/fpo-realign-vframe.ll
@@ -95,6 +95,10 @@
; OBJ: SubSectionType: Symbols (0xF1)
; OBJ: GlobalProcIdSym {
; OBJ: Kind: S_GPROC32_ID (0x1147)
+; OBJ: Flags [ (0x81)
+; OBJ: HasFP (0x1)
+; OBJ: HasOptimizedDebugInfo (0x80)
+; OBJ: ]
; OBJ: DisplayName: realign_with_csrs
; OBJ: LinkageName: _realign_with_csrs
; OBJ: }
diff --git a/llvm/test/DebugInfo/COFF/frameproc-flags.ll b/llvm/test/DebugInfo/COFF/frameproc-flags.ll
index 9f571b8e70e33..905418969b6a7 100644
--- a/llvm/test/DebugInfo/COFF/frameproc-flags.ll
+++ b/llvm/test/DebugInfo/COFF/frameproc-flags.ll
@@ -63,22 +63,27 @@
; }
; CHECK-LABEL: S_GPROC32_ID [size = 52] `use_alloca`
+; CHECK: type = `0x1002 (use_alloca)`, debug start = 0, debug end = 0, flags = has fp | opt debuginfo
; CHECK: S_FRAMEPROC [size = 32]
; CHECK: local fp reg = VFRAME, param fp reg = EBP
; CHECK: flags = has alloca | secure checks | strict secure checks | opt speed
; CHECK-LABEL: S_GPROC32_ID [size = 52] `call_setjmp`
+; CHECK: type = `0x1003 (call_setjmp)`, debug start = 0, debug end = 0, flags = opt debuginfo
; CHECK: S_FRAMEPROC [size = 32]
; CHECK: local fp reg = NONE, param fp reg = NONE
; CHECK: flags = has setjmp | opt speed
; CHECK-LABEL: S_GPROC32_ID [size = 56] `use_inlineasm`
+; CHECK: type = `0x1006 (use_inlineasm)`, debug start = 0, debug end = 0, flags = opt debuginfo
; CHECK: S_FRAMEPROC [size = 32]
; CHECK: local fp reg = NONE, param fp reg = NONE
; CHECK: flags = has inline asm | safe buffers | opt speed
; CHECK-LABEL: S_GPROC32_ID [size = 48] `cpp_eh`
+; CHECK: type = `0x1007 (cpp_eh)`, debug start = 0, debug end = 0, flags = has fp | opt debuginfo
; CHECK: S_FRAMEPROC [size = 32]
; CHECK: local fp reg = EBP, param fp reg = EBP
; CHECK: flags = has eh | opt speed
; CHECK-LABEL: S_GPROC32_ID [size = 52] `use_inline`
+; CHECK: type = `0x100C (use_inline)`, debug start = 0, debug end = 0, flags = opt debuginfo
; CHECK: S_FRAMEPROC [size = 32]
; CHECK: local fp reg = NONE, param fp reg = NONE
; CHECK: flags = safe buffers | opt speed
@@ -87,6 +92,7 @@
; CHECK: local fp reg = NONE, param fp reg = NONE
; CHECK: flags = marked inline | safe buffers | opt speed
; CHECK-LABEL: S_GPROC32_ID [size = 44] `seh`
+; CHECK: type = `0x100E (seh)`, debug start = 0, debug end = 0, flags = has fp | opt debuginfo
; CHECK: S_FRAMEPROC [size = 32]
; CHECK: local fp reg = EBP, param fp reg = EBP
; CHECK: flags = has seh | opt speed
@@ -95,10 +101,12 @@
; CHECK: local fp reg = EBP, param fp reg = EBP
; CHECK: flags = safe buffers | opt speed
; CHECK-LABEL: S_GPROC32_ID [size = 52] `use_naked`
+; CHECK: type = `0x1010 (use_naked)`, debug start = 0, debug end = 0, flags = noinline | opt debuginfo
; CHECK: S_FRAMEPROC [size = 32]
; CHECK: local fp reg = NONE, param fp reg = NONE
; CHECK: flags = has inline asm | naked | safe buffers | opt speed
; CHECK-LABEL: S_GPROC32_ID [size = 52] `stack_guard`
+; CHECK: type = `0x1011 (stack_guard)`, debug start = 0, debug end = 0, flags = opt debuginfo
; CHECK: S_FRAMEPROC [size = 32]
; CHECK: local fp reg = VFRAME, param fp reg = VFRAME
; CHECK: flags = secure checks | strict secure checks | opt speed
diff --git a/llvm/test/DebugInfo/COFF/function-options.ll b/llvm/test/DebugInfo/COFF/function-options.ll
index 835f3fbe3c8ae..863994be1d5ef 100644
--- a/llvm/test/DebugInfo/COFF/function-options.ll
+++ b/llvm/test/DebugInfo/COFF/function-options.ll
@@ -376,6 +376,97 @@
; CHECK: }
; CHECK: ]
+; CHECK-LABEL: FunctionType: Func_AClass (0x1008)
+; CHECK-NEXT: CodeOffset: ?Func_AClass@@YA?AVAClass@@AEAV1@@Z+0x0
+; CHECK-NEXT: Segment: 0x0
+; CHECK-NEXT: Flags [ (0xC0)
+; CHECK-NEXT: HasOptimizedDebugInfo (0x80)
+; CHECK-NEXT: IsNoInline (0x40)
+; CHECK-NEXT: ]
+; CHECK-NEXT: DisplayName: Func_AClass
+; CHECK-NEXT: LinkageName: ?Func_AClass@@YA?AVAClass@@AEAV1@@Z
+; CHECK-LABEL: FunctionType: Func_BClass (0x1013)
+; CHECK-NEXT: CodeOffset: ?Func_BClass@@YA?AVBClass@@AEAV1@@Z+0x0
+; CHECK-NEXT: Segment: 0x0
+; CHECK-NEXT: Flags [ (0xC0)
+; CHECK-NEXT: HasOptimizedDebugInfo (0x80)
+; CHECK-NEXT: IsNoInline (0x40)
+; CHECK-NEXT: ]
+; CHECK-NEXT: DisplayName: Func_BClass
+; CHECK-NEXT: LinkageName: ?Func_BClass@@YA?AVBClass@@AEAV1@@Z
+; CHECK-LABEL: FunctionType: Func_C1Class (0x101D)
+; CHECK-NEXT: CodeOffset: ?Func_C1Class@@YA?AVC1Class@@AEAV1@@Z+0x0
+; CHECK-NEXT: Segment: 0x0
+; CHECK-NEXT: Flags [ (0xC0)
+; CHECK-NEXT: HasOptimizedDebugInfo (0x80)
+; CHECK-NEXT: IsNoInline (0x40)
+; CHECK-NEXT: ]
+; CHECK-NEXT: DisplayName: Func_C1Class
+; CHECK-NEXT: LinkageName: ?Func_C1Class@@YA?AVC1Class@@AEAV1@@Z
+; CHECK-LABEL: FunctionType: Func_C2Class (0x1027)
+; CHECK-NEXT: CodeOffset: ?Func_C2Class@@YA?AVC2Class@@AEAV1@@Z+0x0
+; CHECK-NEXT: Segment: 0x0
+; CHECK-NEXT: Flags [ (0xC0)
+; CHECK-NEXT: HasOptimizedDebugInfo (0x80)
+; CHECK-NEXT: IsNoInline (0x40)
+; CHECK-NEXT: ]
+; CHECK-NEXT: DisplayName: Func_C2Class
+; CHECK-NEXT: LinkageName: ?Func_C2Class@@YA?AVC2Class@@AEAV1@@Z
+; CHECK-LABEL: FunctionType: Func_DClass (0x102F)
+; CHECK-NEXT: CodeOffset: ?Func_DClass@@YA?AVDClass@@AEAV1@@Z+0x0
+; CHECK-NEXT: Segment: 0x0
+; CHECK-NEXT: Flags [ (0xC0)
+; CHECK-NEXT: HasOptimizedDebugInfo (0x80)
+; CHECK-NEXT: IsNoInline (0x40)
+; CHECK-NEXT: ]
+; CHECK-NEXT: DisplayName: Func_DClass
+; CHECK-NEXT: LinkageName: ?Func_DClass@@YA?AVDClass@@AEAV1@@Z
+; CHECK-LABEL: FunctionType: Func_FClass (0x103A)
+; CHECK-NEXT: CodeOffset: ?Func_FClass@@YA?AVFClass@@AEAV1@@Z+0x0
+; CHECK-NEXT: Segment: 0x0
+; CHECK-NEXT: Flags [ (0xC0)
+; CHECK-NEXT: HasOptimizedDebugInfo (0x80)
+; CHECK-NEXT: IsNoInline (0x40)
+; CHECK-NEXT: ]
+; CHECK-NEXT: DisplayName: Func_FClass
+; CHECK-NEXT: LinkageName: ?Func_FClass@@YA?AVFClass@@AEAV1@@Z
+; CHECK-LABEL: FunctionType: Func_AStruct (0x1041)
+; CHECK-NEXT: CodeOffset: ?Func_AStruct@@YA?AUAStruct@@AEAU1@@Z+0x0
+; CHECK-NEXT: Segment: 0x0
+; CHECK-NEXT: Flags [ (0xC0)
+; CHECK-NEXT: HasOptimizedDebugInfo (0x80)
+; CHECK-NEXT: IsNoInline (0x40)
+; CHECK-NEXT: ]
+; CHECK-NEXT: DisplayName: Func_AStruct
+; CHECK-NEXT: LinkageName: ?Func_AStruct@@YA?AUAStruct@@AEAU1@@Z
+; CHECK-LABEL: FunctionType: Func_BStruct (0x104B)
+; CHECK-NEXT: CodeOffset: ?Func_BStruct@@YA?AUBStruct@@AEAU1@@Z+0x0
+; CHECK-NEXT: Segment: 0x0
+; CHECK-NEXT: Flags [ (0xC0)
+; CHECK-NEXT: HasOptimizedDebugInfo (0x80)
+; CHECK-NEXT: IsNoInline (0x40)
+; CHECK-NEXT: ]
+; CHECK-NEXT: DisplayName: Func_BStruct
+; CHECK-NEXT: LinkageName: ?Func_BStruct@@YA?AUBStruct@@AEAU1@@Z
+; CHECK-LABEL: FunctionType: Func_AUnion (0x1052)
+; CHECK-NEXT: CodeOffset: ?Func_AUnion@@YA?ATAUnion@@AEAT1@@Z+0x0
+; CHECK-NEXT: Segment: 0x0
+; CHECK-NEXT: Flags [ (0xC0)
+; CHECK-NEXT: HasOptimizedDebugInfo (0x80)
+; CHECK-NEXT: IsNoInline (0x40)
+; CHECK-NEXT: ]
+; CHECK-NEXT: DisplayName: Func_AUnion
+; CHECK-NEXT: LinkageName: ?Func_AUnion@@YA?ATAUnion@@AEAT1@@Z
+; CHECK-LABEL: FunctionType: Func_BUnion (0x105C)
+; CHECK-NEXT: CodeOffset: ?Func_BUnion@@YA?ATBUnion@@AEAT1@@Z+0x0
+; CHECK-NEXT: Segment: 0x0
+; CHECK-NEXT: Flags [ (0xC0)
+; CHECK-NEXT: HasOptimizedDebugInfo (0x80)
+; CHECK-NEXT: IsNoInline (0x40)
+; CHECK-NEXT: ]
+; CHECK-NEXT: DisplayName: Func_BUnion
+; CHECK-NEXT: LinkageName: ?Func_BUnion@@YA?ATBUnion@@AEAT1@@Z
+
; ModuleID = 't.cpp'
source_filename = "t.cpp"
target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
diff --git a/llvm/test/DebugInfo/COFF/inlining-header.ll b/llvm/test/DebugInfo/COFF/inlining-header.ll
index bead300d6988d..0e990cbb0fcca 100644
--- a/llvm/test/DebugInfo/COFF/inlining-header.ll
+++ b/llvm/test/DebugInfo/COFF/inlining-header.ll
@@ -68,7 +68,8 @@
; OBJ: FunctionType: main (0x1005)
; OBJ: CodeOffset: _main+0x0
; OBJ: Segment: 0x0
-; OBJ: Flags [ (0x0)
+; OBJ: Flags [ (0x80)
+; OBJ: HasOptimizedDebugInfo (0x80)
; OBJ: ]
; OBJ: DisplayName: main
; OBJ: LinkageName: _main
diff --git a/llvm/test/DebugInfo/COFF/inlining.ll b/llvm/test/DebugInfo/COFF/inlining.ll
index de0d78936a0dc..d0b03cc5b21e3 100644
--- a/llvm/test/DebugInfo/COFF/inlining.ll
+++ b/llvm/test/DebugInfo/COFF/inlining.ll
@@ -160,7 +160,8 @@
; OBJ: FunctionType: baz (0x1004)
; OBJ: CodeOffset: ?baz@@YAXXZ+0x0
; OBJ: Segment: 0x0
-; OBJ: Flags [ (0x0)
+; OBJ: Flags [ (0x80)
+; OBJ: HasOptimizedDebugInfo (0x80)
; OBJ: ]
; OBJ: DisplayName: baz
; OBJ: LinkageName: ?baz@@YAXXZ
diff --git a/llvm/test/DebugInfo/COFF/long-name.ll b/llvm/test/DebugInfo/COFF/long-name.ll
index 073bd7909cb5e..4ea5b4328d246 100644
--- a/llvm/test/DebugInfo/COFF/long-name.ll
+++ b/llvm/test/DebugInfo/COFF/long-name.ll
@@ -5,7 +5,8 @@
; CHECK: FunctionType: {{A+}} (0x1002)
; CHECK: CodeOffset: f+0x0
; CHECK: Segment: 0x0
-; CHECK: Flags [ (0x0)
+; CHECK: Flags [ (0x80)
+; CHECK: HasOptimizedDebugInfo (0x80)
; CHECK: ]
; CHECK: DisplayName: {{A+$}}
; CHECK: LinkageName: f
diff --git a/llvm/test/DebugInfo/COFF/multifunction.ll b/llvm/test/DebugInfo/COFF/multifunction.ll
index 98b0e4b2d8a05..04c643602f09e 100644
--- a/llvm/test/DebugInfo/COFF/multifunction.ll
+++ b/llvm/test/DebugInfo/COFF/multifunction.ll
@@ -78,7 +78,7 @@
; X86-NEXT: .long 4098
; X86-NEXT: .secrel32 _x
; X86-NEXT: .secidx _x
-; X86-NEXT: .byte 0
+; X86-NEXT: .byte 128
; X86-NEXT: .asciz "x"
; X86-NEXT: .p2align 2
; X86-NEXT: [[PROC_SEGMENT_END]]:
@@ -117,7 +117,7 @@
; X86-NEXT: .long 4099
; X86-NEXT: .secrel32 _y
; X86-NEXT: .secidx _y
-; X86-NEXT: .byte 0
+; X86-NEXT: .byte 128
; X86-NEXT: .asciz "y"
; X86-NEXT: .p2align 2
; X86-NEXT: [[PROC_SEGMENT_END]]:
@@ -156,7 +156,7 @@
; X86-NEXT: .long 4100
; X86-NEXT: .secrel32 _f
; X86-NEXT: .secidx _f
-; X86-NEXT: .byte 0
+; X86-NEXT: .byte 128
; X86-NEXT: .asciz "f"
; X86-NEXT: .p2align 2
; X86-NEXT: [[PROC_SEGMENT_END]]:
@@ -390,7 +390,7 @@
; X64-NEXT: .long 4098
; X64-NEXT: .secrel32 x
; X64-NEXT: .secidx x
-; X64-NEXT: .byte 0
+; X64-NEXT: .byte 128
; X64-NEXT: .asciz "x"
; X64-NEXT: .p2align 2
; X64-NEXT: [[PROC_SEGMENT_END]]:
@@ -428,7 +428,7 @@
; X64-NEXT: .long 4099
; X64-NEXT: .secrel32 y
; X64-NEXT: .secidx y
-; X64-NEXT: .byte 0
+; X64-NEXT: .byte 128
; X64-NEXT: .asciz "y"
; X64-NEXT: .p2align 2
; X64-NEXT: [[PROC_SEGMENT_END]]:
@@ -466,7 +466,7 @@
; X64-NEXT: .long 4100
; X64-NEXT: .secrel32 f
; X64-NEXT: .secidx f
-; X64-NEXT: .byte 0
+; X64-NEXT: .byte 128
; X64-NEXT: .asciz "f"
; X64-NEXT: .p2align 2
; X64-NEXT: [[PROC_SEGMENT_END]]:
diff --git a/llvm/test/DebugInfo/COFF/simple.ll b/llvm/test/DebugInfo/COFF/simple.ll
index 85819b0d990ee..f81de98b50036 100644
--- a/llvm/test/DebugInfo/COFF/simple.ll
+++ b/llvm/test/DebugInfo/COFF/simple.ll
@@ -58,7 +58,7 @@
; X86-NEXT: .long 4098
; X86-NEXT: .secrel32 _f
; X86-NEXT: .secidx _f
-; X86-NEXT: .byte 0
+; X86-NEXT: .byte 128
; X86-NEXT: .asciz "f"
; X86-NEXT: .p2align 2
; X86-NEXT: [[PROC_SEGMENT_END]]:
@@ -188,7 +188,7 @@
; X64-NEXT: .long 4098
; X64-NEXT: .secrel32 f
; X64-NEXT: .secidx f
-; X64-NEXT: .byte 0
+; X64-NEXT: .byte 128
; X64-NEXT: .asciz "f"
; X64-NEXT: .p2align 2
; X64-NEXT: [[PROC_SEGMENT_END]]:
diff --git a/llvm/test/DebugInfo/COFF/types-array.ll b/llvm/test/DebugInfo/COFF/types-array.ll
index 07828c3406fec..5dec93d1fdbba 100644
--- a/llvm/test/DebugInfo/COFF/types-array.ll
+++ b/llvm/test/DebugInfo/COFF/types-array.ll
@@ -58,7 +58,9 @@
; CHECK: FunctionType: f (0x1002)
; CHECK: CodeOffset: ?f@@YAXXZ+0x0
; CHECK: Segment: 0x0
-; CHECK: Flags [ (0x0)
+; CHECK: Flags [ (0x81)
+; CHECK: HasFP (0x1)
+; CHECK: HasOptimizedDebugInfo (0x80)
; CHECK: ]
; CHECK: DisplayName: f
; CHECK: LinkageName: ?f@@YAXXZ
diff --git a/llvm/test/DebugInfo/COFF/types-basic.ll b/llvm/test/DebugInfo/COFF/types-basic.ll
index b33e8d338e574..e87f6f6864221 100644
--- a/llvm/test/DebugInfo/COFF/types-basic.ll
+++ b/llvm/test/DebugInfo/COFF/types-basic.ll
@@ -221,7 +221,8 @@
; CHECK: FunctionType: f (0x1002)
; CHECK: CodeOffset: ?f@@YAXMN_J at Z+0x0
; CHECK: Segment: 0x0
-; CHECK: Flags [ (0x0)
+; CHECK: Flags [ (0x80)
+; CHECK: HasOptimizedDebugInfo (0x80)
; CHECK: ]
; CHECK: DisplayName: f
; CHECK: LinkageName: ?f@@YAXMN_J at Z
diff --git a/llvm/test/MC/AArch64/coff-debug.ll b/llvm/test/MC/AArch64/coff-debug.ll
index cbea03592d578..ea1cc3286b042 100644
--- a/llvm/test/MC/AArch64/coff-debug.ll
+++ b/llvm/test/MC/AArch64/coff-debug.ll
@@ -95,7 +95,9 @@ attributes #0 = { noinline nounwind optnone "correctly-rounded-divide-sqrt-fp-ma
; CHECK: FunctionType: main (0x1002)
; CHECK: CodeOffset: main+0x0
; CHECK: Segment: 0x0
-; CHECK: Flags [ (0x0)
+; CHECK: Flags [ (0xC0)
+; CHECK: HasOptimizedDebugInfo (0x80)
+; CHECK: IsNoInline (0x40)
; CHECK: ]
; CHECK: DisplayName: main
; CHECK: LinkageName: main
More information about the lldb-commits
mailing list