Open shiyuanxiang opened 9 months ago
I met the same problem. But I encouter "expected type" error, seems like the compiler don't know the type
definition
bash-4.2$ clang switch4-dis.ll
switch4-dis.ll:7:19: error: expected type
%tos = ptrtoint ptr %stktop_8 to i64
^
1 error generated.
compile command
gcc helloworld.c
Please share the output of the command gcc -v
.
Thanks!
I met the same problem. But I encouter "expected type" error, seems like the compiler don't know the
type
definitionbash-4.2$ clang switch4-dis.ll switch4-dis.ll:7:19: error: expected type %tos = ptrtoint ptr %stktop_8 to i64 ^ 1 error generated.
Please share the sources of the binary used as input to llvm-mctoll
that resulted in switch-dis.ll
, the compiler version and any additional compiler options used to build the binary.
Thanks!
I met the same problem. But I encouter "expected type" error, seems like the compiler don't know the
type
definitionbash-4.2$ clang switch4-dis.ll switch4-dis.ll:7:19: error: expected type %tos = ptrtoint ptr %stktop_8 to i64 ^ 1 error generated.
Please share the sources of the binary used as input to
llvm-mctoll
that resulted inswitch-dis.ll
, the compiler version and any additional compiler options used to build the binary.Thanks!
I found the problem is that I was using LLVM 13 before, and after I changed to LLVM 16, the opaque pointer could be compiled correctly. Thank you!
source code helloworld.c
compile command
gcc helloworld.c
execute command
llvm-mctoll -d a.out -I /usr/include/stdio.h
generated a.out-dis.ll
execute command
cat a.out-dis.ll
output
execute command
llvm-as a.out-dis.ll -o a.out-dis.bc
errors