mirror of
https://github.com/intel/llvm.git
synced 2026-02-05 13:21:04 +08:00
This was removed in https://github.com/llvm/llvm-project/pull/135343 in favour of making it a format variable, which we do here. This follows the precedent of the `[opt]` and `[artificial]` markers. Before: ``` thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.2 * frame #0: 0x000000010000037c a.out`inlined1() at inline.cpp:4:3 frame #1: 0x000000010000037c a.out`regular() at inline.cpp:6:17 frame #2: 0x00000001000003b8 a.out`inlined2() at inline.cpp:7:43 frame #3: 0x00000001000003b4 a.out`main at inline.cpp:10:3 frame #4: 0x0000000186345be4 dyld`start + 7040 ``` After (note the `[inlined]` markers): ``` thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.2 * frame #0: 0x000000010000037c a.out`inlined1() at inline.cpp:4:3 [inlined] frame #1: 0x000000010000037c a.out`regular() at inline.cpp:6:17 frame #2: 0x00000001000003b8 a.out`inlined2() at inline.cpp:7:43 [inlined] frame #3: 0x00000001000003b4 a.out`main at inline.cpp:10:3 frame #4: 0x0000000186345be4 dyld`start + 7040 ``` rdar://152642178
35 lines
755 B
Plaintext
35 lines
755 B
Plaintext
# Test the ${function.is-inlined} frame-format variable.
|
|
|
|
# RUN: split-file %s %t
|
|
# RUN: %clang_host -g -gdwarf %t/main.cpp -o %t.out
|
|
# RUN: %lldb -x -b -s %t/commands.input %t.out -o exit 2>&1 \
|
|
# RUN: | FileCheck %s
|
|
|
|
#--- main.cpp
|
|
|
|
void regular();
|
|
|
|
[[clang::always_inline]] void inlined1() {
|
|
regular();
|
|
}
|
|
void regular() {inlined1();}
|
|
[[clang::always_inline]] void inlined2() {regular();}
|
|
|
|
int main() {
|
|
inlined2();
|
|
return 0;
|
|
}
|
|
|
|
#--- commands.input
|
|
|
|
settings set frame-format "frame '${function.name}{${function.is-inlined} (Inlined)}'\n"
|
|
breakpoint set -n inlined1
|
|
run
|
|
bt
|
|
|
|
# CHECK: (lldb) bt
|
|
# CHECK: frame 'inlined1() (Inlined)'
|
|
# CHECK-NEXT: frame 'regular()'
|
|
# CHECK-NEXT: frame 'inlined2() (Inlined)'
|
|
# CHECK-NEXT: frame 'main'
|