llvm/test/tools/llvm-symbolizer/Inputs/coff-dwarf.cpp
Reid Kleckner dd65b7a9f5 [llvm-symbolizer] Use the export table if no symbols are present
This lets us make guesses about symbols in third party DLLs without
debug info, like MSVCR120.dll or kernel32.dll. dbghelp does the same
thing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250582 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-16 23:43:22 +00:00

20 lines
338 B
C++

// 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;
}