Reputation: 113
I am writing an llvm tool that uses the generated llvm IR bit code. and for va_arg clang expands it into
getelementptr instruction
with fixed positions and memory layout
instead of using
va_arg instruction
is there any compiler flag to disable this expansion ?
Upvotes: 0
Views: 164
Reputation: 34411
AFAIK, no, because variable argument handling is platform-specific.
Moreover, I tried to use VA instructions from LLVM IR and sometimes it was resulting in wrong machine code. There are a lot of intricacies there, and that's why IR VA instructions are going to be deprecated.
Upvotes: 1