BasicBlock.h in the binary and in the source differ

Hi, I am using LLVM to develop a tool, using Mac OS 10.9. I have download llvm source and binary from

http://llvm.org/releases/download.html

I just find the BasicBlock.h file of the binary package

clang+llvm-3.6.0-x86_64-apple-darwin/include/llvm/IR/BasicBlock.h

is slightly different from that of the source

llvm/include/llvm/IR/BasicBlock.h

In particular, llvm:: getModule(…) is included in the latter BasicBlock.h but not in the former BasicBlock.h. Am I misunderstanding something or is it an inconsistency LLVM developers will fix?

Thanks in advance.

Zhoulai

What version is your source? Header files like this are updated quite
frequently, so unless you are actually using the very same version, it
may simply be that "version X has that function, and version Y
doesn't" (based on X != Y).

Hi, I am using LLVM to develop a tool, using Mac OS 10.9. I have
download llvm source and binary from

http://llvm.org/releases/download.html

I just find the BasicBlock.h file of the binary package

         clang+llvm-3.6.0-x86_64-apple-darwin/include/llvm/IR/BasicBlock.h

is slightly different from that of the source

        llvm/include/llvm/IR/BasicBlock.h

Where specifically did you download the source from?

The source is cloned from
https://github.com/llvm-mirror/llvm

Thanks.

The source is cloned from
https://github.com/llvm-mirror/llvm

Which branch, master or one of the release_* branches?

Jon

Sorry. ‘master’ branch of most recent release. Actually I use
git clone http://llvm.org/git/llvm.git.

Maybe the issue comes from the binary package?

At line 122 of the BasicBlock.h from <http://llvm.org/releases/download.html>
const DataLayout *getDataLayout() const;

vs.

Line 118 of the source BasicBlock.h from the above repo:
const Module *getModule() const;

For information, I am concerned with the inconsistency because of this error message when building the project at https://github.com/eliben/llvm-clang-samples:

Sorry. 'master' branch of most recent release. Actually I use
git clone http://llvm.org/git/llvm.git.

Maybe the issue comes from the binary package?

No. 'master' is the top of the development tree. You should be comparing against the release_36 branch.

Differences between 'master' and the releases & release branches are *expected*.

At line 122 of the BasicBlock.h from
<http://llvm.org/releases/download.html>
   const DataLayout *getDataLayout() const;

vs.

Line 118 of the source BasicBlock.h from the above repo:
   const Module *getModule() const;

For information, I am concerned with the inconsistency because of this
error message when building the project at
https://github.com/eliben/llvm-clang-samples:

You'll have to speak with Eli about what version of llvm/clang his samples are supposed to work with. I don't happen to know off the top of my head.

Cheers,

Jon

Looks like natural evolution to me - I'm pretty sure there was a
commit of that kind not that long ago.

One of the "positive" things with LLVM/Clang is that there is no
desire to keep interfaces stable. Sure that has the drawback that
sometimes you have to change your code that uses the interfaces, but
it also allows improvements that would be very hard to achieve if you
retain "must be backwards and forwards compatible for at least X units
of time".