[LLVMdev] BasicBlock.h in the binary and in the source differ

mats petersson mats at planetcatfish.com
Thu Apr 9 09:48:55 PDT 2015


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".

--
Mats

On 9 April 2015 at 17:35, Zhoulai <zell08v at gmail.com> wrote:
> 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:
>
> ---------------
> g++ -fno-rtti -O0 -g
> `$HOME/MyLib/clang+llvm-3.6.0-x86_64-apple-darwin/bin/llvm-config
> --cxxflags` src_llvm/simple_bb_pass.cpp
> `$HOME/MyLib/clang+llvm-3.6.0-x86_64-apple-darwin/bin/llvm-config --ldflags
> --libs --system-libs` -o build/simple_bb_pass
>
> src_llvm/simple_bb_pass.cpp:30:31: error: no member named 'getModule' in
>       'llvm::BasicBlock'
>     const DataLayout &DL = BB.getModule()->getDataLayout();
>                            ~~ ^
> 1 error generated.
> Makefile:131: recipe for target 'build/simple_bb_pass' failed
> make: *** [build/simple_bb_pass] Error 1
>
> Thanks for your ideas.
>
>
> Zhoulai
>
> On Thu, Apr 9, 2015 at 9:21 AM, Jonathan Roelofs <jonathan at codesourcery.com>
> wrote:
>>
>>
>>
>> On 4/9/15 10:17 AM, Zhoulai wrote:
>>>
>>> The source is cloned from
>>> https://github.com/llvm-mirror/llvm
>>
>>
>> Which branch, master or one of the release_* branches?
>>
>> Jon
>>
>>>
>>> Thanks.
>>>
>>> Zhoulai
>>>
>>> On Thu, Apr 9, 2015 at 9:15 AM, Jonathan Roelofs
>>> <jonathan at codesourcery.com <mailto:jonathan at codesourcery.com>> wrote:
>>>
>>>
>>>
>>>     On 4/9/15 9:58 AM, Zhoulai wrote:
>>>
>>>         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
>>>         <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?
>>>
>>>
>>>         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
>>>
>>>
>>>         _________________________________________________
>>>         LLVM Developers mailing list
>>>         LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu>
>>>         http://llvm.cs.uiuc.edu
>>>         http://lists.cs.uiuc.edu/__mailman/listinfo/llvmdev
>>>         <http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev>
>>>
>>>
>>>     --
>>>     Jon Roelofs
>>>     jonathan at codesourcery.com <mailto:jonathan at codesourcery.com>
>>>     CodeSourcery / Mentor Embedded
>>>
>>>
>>
>> --
>> Jon Roelofs
>> jonathan at codesourcery.com
>> CodeSourcery / Mentor Embedded
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



More information about the llvm-dev mailing list