Open makise-homura opened 3 years ago
Simple reproduction example (decls.cc
):
namespace { const struct { const char * a; const char * b; } c[] = { { "x", "y" } }; };
int main() { return c[0].a[0]; }
Build:
clang++-10 -S -emit-llvm -g -o decls.ll decls.cc
./llvm-cbe decls.ll
gcc-10 -c decls.cbe.c -o decls
Say, we have LLVM 10.0.0, and just have built
llvm-cbe
in current directory.Trying to build
main.cc
fromplzip-1.9
withlzlib-1.12
:I have the following output then:
Interestingly, after some analysis of
main.cbe.c
, i found out that_OC_str_OC_84
,_OC_str_OC_85
, and_OC_str_OC_86
are declared in lines 722, 723. 724 ofmain.cbe.c
, just after being used in line 721: