llvm-gcc

We are trying to compile a .c file using llvm-gcc --emit-llvm .

The produced output has a variable name different from its name in the .c file. We have tried it on different llvm-gcc versions and different optimization levels.

Is there any reason that this happens.

Aparna

Is it a static variable inside a function?

Also I don't think there is any guaranteee about LLVM variable name
mapping, you should look at llvm.dbg.variable to find out the original
variable name.

Best regards,
--Edwin

This is the name of a structure in the source code.

2009/10/30 Török Edwin <edwintorok@gmail.com>

struct names get “struct.” prepended to the name to give it the struct namespace. struct names are in a different namespace to typedefs and variable names in C

2009/10/31 aparna kotha <kotha.aparna@gmail.com>