[LLVMdev] [llvm-c] LLVMAttribute possible bug

Moritz Maxeiner moritzmaxeiner at googlemail.com
Sun Feb 17 04:30:42 PST 2013


While writing bindings to LLVM for another language via the c api I 
noticed that
LLVMAlignment and LLVMStackAlignment do not use 1<<x like all the others,
but 31<<x and 7<x respectively (see below, or here: 
http://llvm.org/docs/doxygen/html/Core_8h_source.html#l00148).
It's likely this is as it is intended, but it does look out-of-place 
enough that
I thought it might be a typo and I would like to know. Also, 1<<27 and 1<<28
get skipped over from LLVMStackAlignment to LLVMReturnsTwice:

LLVMZExtAttribute        = 1<<0,
LLVMSExtAttribute        = 1<<1,
LLVMNoReturnAttribute    = 1<<2,
LLVMInRegAttribute       = 1<<3,
LLVMStructRetAttribute   = 1<<4,
LLVMNoUnwindAttribute    = 1<<5,
LLVMNoAliasAttribute     = 1<<6,
LLVMByValAttribute       = 1<<7,
LLVMNestAttribute        = 1<<8,
LLVMReadNoneAttribute    = 1<<9,
LLVMReadOnlyAttribute    = 1<<10,
LLVMNoInlineAttribute    = 1<<11,
LLVMAlwaysInlineAttribute     = 1<<12,
LLVMOptimizeForSizeAttribute  = 1<<13,
LLVMStackProtectAttribute     = 1<<14,
LLVMStackProtectReqAttribute  = 1<<15,
*LLVMAlignment**  = 31<<16,*
LLVMNoCaptureAttribute   = 1<<21,
LLVMNoRedZoneAttribute   = 1<<22,
LLVMNoImplicitFloatAttribute  = 1<<23,
LLVMNakedAttribute       = 1<<24,
LLVMInlineHintAttribute  = 1<<25,
*LLVMStackAlignment**  = 7<<26,*
*LLVMReturnsTwice**  = 1 << 29,*
LLVMUWTable  = 1 << 30,



http://llvm.org/docs/doxygen/html/Core_8h_source.html#l00148
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130217/1681af15/attachment.html>


More information about the llvm-dev mailing list