Ala'a .H
Ala'a .H

Reputation: 113

Clang LLVM disable va_arg expansion

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

Answers (1)

arrowd
arrowd

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

Related Questions