Hello, I am writing an extension for Cranelift, for which at one point I need to determine the size of static global data.
When compiling an example codebase, with the following buffer declaration and --emit=llvm-ir enabled, I get the expected IR output:
static BUFFER: [i32; 5] = [1, 2, 3, 4, 0];
gv0 = symbol userextname0 ; DefId(0:4 ~ extension_test_example[f5b4]::BUFFER)
I discovered that the above comment is generated in the codegen_fn_body function, but failed to further narrow it down. Is it possible to determine the exact spot where DefId is converted into a GlobalValueData object?
Hello, I am writing an extension for Cranelift, for which at one point I need to determine the size of static global data.
When compiling an example codebase, with the following buffer declaration and
--emit=llvm-irenabled, I get the expected IR output:I discovered that the above comment is generated in the
codegen_fn_bodyfunction, but failed to further narrow it down. Is it possible to determine the exact spot where DefId is converted into a GlobalValueData object?