llvm-for-llvmta/test/tools/llvm-symbolizer/Inputs/coff-dwarf.cpp

20 lines
338 B
C++
Raw Permalink Normal View History

2022-04-25 10:02:23 +02:00
// To generate the corresponding EXE, run:
// clang-cl -MD -O2 -gdwarf -c coff-dwarf.cpp && lld-link -debug coff-dwarf.obj
extern "C" int puts(const char *str);
void __declspec(noinline) foo() {
puts("foo1");
puts("foo2");
}
// LLVM should inline this into main.
static void bar() {
foo();
}
int main() {
bar();
return 0;
}