diff options
author | Evan Cheng <evan.cheng@apple.com> | 2013-04-03 23:12:39 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2013-04-03 23:12:39 +0000 |
commit | 7d2166a643a7c16b9b0c87441b662f66e79b131f (patch) | |
tree | c271913ddc310eaae3b62a087dd476c2144de93e /include/llvm-c/Transforms | |
parent | 9bede89bbe04e49953ce373620355d2de4b0c084 (diff) | |
download | external_llvm-7d2166a643a7c16b9b0c87441b662f66e79b131f.zip external_llvm-7d2166a643a7c16b9b0c87441b662f66e79b131f.tar.gz external_llvm-7d2166a643a7c16b9b0c87441b662f66e79b131f.tar.bz2 |
Make it possible to include llvm-c without including C++ headers. Patch by Filip Pizlo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178713 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm-c/Transforms')
-rw-r--r-- | include/llvm-c/Transforms/PassManagerBuilder.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/llvm-c/Transforms/PassManagerBuilder.h b/include/llvm-c/Transforms/PassManagerBuilder.h index 82e513d..b39dd24 100644 --- a/include/llvm-c/Transforms/PassManagerBuilder.h +++ b/include/llvm-c/Transforms/PassManagerBuilder.h @@ -18,8 +18,11 @@ typedef struct LLVMOpaquePassManagerBuilder *LLVMPassManagerBuilderRef; -#ifdef __cplusplus +#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) #include "llvm/Transforms/IPO/PassManagerBuilder.h" +#endif + +#ifdef __cplusplus extern "C" { #endif @@ -86,7 +89,9 @@ void LLVMPassManagerBuilderPopulateLTOPassManager(LLVMPassManagerBuilderRef PMB, #ifdef __cplusplus } +#endif +#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) namespace llvm { inline PassManagerBuilder *unwrap(LLVMPassManagerBuilderRef P) { return reinterpret_cast<PassManagerBuilder*>(P); @@ -96,6 +101,6 @@ namespace llvm { return reinterpret_cast<LLVMPassManagerBuilderRef>(P); } } -#endif +#endif /* defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) */ #endif |