[LLVMdev] about getName in llvm

Jingyue Wu jingyue at google.com
Fri Sep 26 11:53:23 PDT 2014


Hi Hui,

1. Although LLVM IR transformations try to preserve variable names in the
source code, these names may be changed (usually suffixed) during
transformation.

2. I don't think DerivedType is used any more. It used to be a superclass
of CompositeType, FunctionType, etc.

Jingyue

On Fri Sep 26 2014 at 11:33:01 AM Hui Zhang <wayne.huizhang at gmail.com>
wrote:

> Hello,
>
> I'm new to llvm and I'm looking at some pass code. I have a question:
>
> what does the Value::getName() exactly return ?  I'm looking at some
> global varibles, why it prints out something like a type:
> llvm.gdb.derivedtype6, .str..... instead of the name of the variables that
> I declared ? I compiled the code with -g
>
> besides, I've read through your programming guidance, but still not quite
> sure about the difference and relationship between the derived type and
> composite type, can you explain that to me with a simple example ?
>
> thanks !
> --
> Best regards
>
>
> Hui Zhang
>  _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140926/8d70fa53/attachment.html>


More information about the llvm-dev mailing list