Looks like constants in include/llvm-c/Core.h aren't in sync with enums. For example, LLVMAdd is 8 in Core.h and llvm::Instruction::LLVMAdd evaluates to 9 in C++. Same for Cast Operators section and possibly in other places. Also, llvm/Support/TargetRegistry.h and llvm/Target/TargetRegistry.h define two different version of some classes, particularly llvm::Target. Fields with the same names have different offsets. Are they intended to be different, and if yes, why? All based on rev.139973. Also I got dropped from the mailing list on 9/15 -- no messages after 9/15 10:20 AM. Was there the known malfunction of the mailing list? Yuri
On Sat, Sep 17, 2011 at 9:14 PM, Yuri <yuri at rawbw.com> wrote:> Looks like constants in include/llvm-c/Core.h aren't in sync with enums. > For example, LLVMAdd is 8 in Core.h and llvm::Instruction::LLVMAdd > evaluates to 9 in C++. > Same for Cast Operators section and possibly in other places.Yes; we don't make any sort of guarantee about that, and such a guarantee is not necessary for correctness.> Also, llvm/Support/TargetRegistry.h and llvm/Target/TargetRegistry.h > define two different version of some classes, particularly llvm::Target. > Fields with the same names have different offsets. > Are they intended to be different, and if yes, why?llvm/Target/TargetRegistry.h does not exist on trunk.> All based on rev.139973. > > Also I got dropped from the mailing list on 9/15 -- no messages after > 9/15 10:20 AM. Was there the known malfunction of the mailing list?Strange; list appears to be working fine to me. -Eli
On 09/17/2011 21:53, Eli Friedman wrote:> Yes; we don't make any sort of guarantee about that, and such a > guarantee is not necessary for correctness.Aren't values in Core.h supposed to be used by users of API and they should match enums, or what they are for then? What are they matched against?>> > Also, llvm/Support/TargetRegistry.h and llvm/Target/TargetRegistry.h >> > define two different version of some classes, particularly llvm::Target. >> > Fields with the same names have different offsets. >> > Are they intended to be different, and if yes, why? > llvm/Target/TargetRegistry.h does not exist on trunk.r139992 (trunk from 2 hours ago) installs both: [root at myhost /usr/local/llvm/svn-r139992]# find . -name TargetRegistry.h ./include/llvm/Target/TargetRegistry.h ./include/llvm/Support/TargetRegistry.h Yuri
Possibly Parallel Threads
- [LLVMdev] Discrepancies in LLVM sources
- [LLVMdev] Discrepancies in LLVM sources
- [LLVMdev] Fwd: Re: How to identify LLVM version? [updated patch]
- [LLVMdev] How is variable info retrieved in debugging for executables generated by llvm backend?
- [LLVMdev] Non-standard labels