[llvm-dev] Overriding macro values defined in source code

Sudhindra kulkarni via llvm-dev llvm-dev at lists.llvm.org
Tue Apr 30 02:33:43 PDT 2019


Hi Team,
                 Consider the below C code,
#define AVAL 5
void func()
{
int a=5;
if(a==AVAL)
{
//Do something
}
else
{
//Do something else
}

}
My question is
Is it possible to override the value of AVAL through the -D option?
For eg is it possible to set the value of AVAL to 2 through -D in clang ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190430/8abf28d9/attachment.html>


More information about the llvm-dev mailing list