Open CarlosAlbertoEnciso opened 4 years ago
This is the output from llvm-diva (Sony's tool under development).
llvm-diva --print=scopes,symbols,types test.o --attribute=level,format
Logical View: [000] {File} 'test.o' -> elf64-x86-64 [001] {CompileUnit} 'test.cpp' [002] {Producer} 'clang version 11.0.0' [002] 2 {Struct} 'S<int, char>' [002] 5 {Variable} extern 'SS' -> 'S<int, char>'
Logical View: [000] {File} 'test.o' -> elf32-littlearm [001] {CompileUnit} 'test.cpp' [002] {Producer} 'GNU C++14 9.2.1 20191025' [002] 2 {Struct} 'S<int, char>' [002] 5 {Variable} extern 'SS' -> 'S<int, char>'
Logical View: [000] {File} 'test.o' -> COFF-x86-64 [001] {CompileUnit} 'test.cpp' [002] {Producer} 'clang version 11.0.0' [002] 2 {Struct} 'S<int,char>' [002] {Variable} extern 'SS' -> 'S<int,char>'
Logical View: [000] {File} 'test.o' -> COFF-i386 [001] {CompileUnit} 'test.cpp' [002] {Producer} 'Microsoft (R) Optimizing Compiler' [002] 5 {Struct} 'S<int,char>' [002] {Variable} extern 'SS' -> 'S<int,char>'
Extended Description
For the given test:
//----------------------------------------------------------
template<class U,class V> struct S { };
S<int, char> SS;
//----------------------------------------------------------
The name generated for the template instance, is not consistent between clang (DWARF) and clang (CodeView), making search or compare difficult.
Clang (DWARF): 'S<int, char>' <-- Added space Clang (CodeView): 'S<int,char>'
GCC (DWARF): 'S<int, char>' MSVC (CodeView): 'S<int,char>'
Clang (DWARF) adds a space between arguments. Clang (CodeView) does not add any spaces.