[LLVMdev] How to identify LLVM version?
Kangkook Jee
aixer77 at gmail.com
Tue May 31 09:56:27 PDT 2011
Hi, all
I'd like to write a code that can build different codes based on LLVM version.
Like code snippets in the below.
#ifdef __LLVM_29__
PHINode *PN = Builder.CreatePHI (Type::getDoubleTy(getGlobalContext()), 2, "iftmp");
#elif __LLVM_28__
PHINode *PN = Builder.CreatePHI (Type::getDoubleTy(getGlobalContext()), "iftmp");
#else
assert ("wrong version");
#endif
I've been trying to find something like these (__LLVM_29__, __LLVM_28__), but I couldn't find them yet.
Thanks for your help.
Regard, Kangkook
More information about the llvm-dev
mailing list