mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-02 08:26:29 +00:00
20d90ebb0d
Rather than relying on the gmlt-like data emitted into the .o/executable which only contains the simple name of any inlined functions, use the .dwo file if present. Test symbolication with/without a .dwo, and the old test that was testing behavior when no gmlt-like data was present. (I haven't included a test of non-gmlt-like data + no .dwo (that would be akin to symbolication with no debug info) but we could add one for completeness) The test was simplified a bit to be a little clearer (unoptimized, force inline, using a function call as the inlined entity) and regenerated with ToT clang. For the no-gmlt-like-data case, I modified Clang back to its old behavior temporarily & the .dwo file is identical so it is shared between the two executables. llvm-svn: 267227
21 lines
634 B
C++
21 lines
634 B
C++
void f1() {
|
|
}
|
|
|
|
inline __attribute__((always_inline)) void f2() {
|
|
f1();
|
|
}
|
|
|
|
int main() {
|
|
f2();
|
|
}
|
|
|
|
// Build instructions:
|
|
// 1) clang++ -### -gsplit-dwarf split-dwarf-test.cc -o split-dwarf-test
|
|
// 2) Replace the value "-fdebug-compilation-dir" flag to "Output"
|
|
// (this is the temp directory used by lit).
|
|
// 3) Manually run clang-cc1, objcopy and ld invocations.
|
|
// 4) Copy the binary and .dwo file to the Inputs directory. Make sure the
|
|
// .dwo file will be available for symbolizer (use test RUN-lines to copy
|
|
// the .dwo file to a directory
|
|
// <execution_directory>/<directory_provided_in_fdebug_compilation_dir>.
|