Discrepancies in LLVM sources

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

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

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@myhost /usr/local/llvm/svn-r139992]# find . -name TargetRegistry.h
./include/llvm/Target/TargetRegistry.h
./include/llvm/Support/TargetRegistry.h

Yuri

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?

The enums in Core.h are for the API in Core.h. Is there some specific
issue you are running into?

> 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@myhost /usr/local/llvm/svn-r139992]# find . -name TargetRegistry.h
./include/llvm/Target/TargetRegistry.h
./include/llvm/Support/TargetRegistry.h

http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/
says it doesn't exist...

-Eli