[LLVMdev] BasicBlock.h in the binary and in the source differ
Jonathan Roelofs
jonathan at codesourcery.com
Thu Apr 9 09:48:05 PDT 2015
On 4/9/15 10:35 AM, Zhoulai 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?
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
>
> ---------------
> 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 <mailto: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
> <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>
> <mailto: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>
> <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>
> <mailto: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>
> <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>
> <mailto:jonathan at codesourcery.__com
> <mailto:jonathan at codesourcery.com>>
> CodeSourcery / Mentor Embedded
>
>
>
> --
> Jon Roelofs
> jonathan at codesourcery.com <mailto: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
>
--
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded
More information about the llvm-dev
mailing list