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 | 51a7a9d712dce44179fa09d15d1cbda9f09fa227 (patch) | |
tree | 5249102f7f46c0ae6407d28084086b8d396de2ee /llvm/include/llvm-c/TargetMachine.h | |
parent | c2d5bf5c53b0e4f29bfa75416d3b0a6fe54a9a44 (diff) | |
download | bcm5719-llvm-51a7a9d712dce44179fa09d15d1cbda9f09fa227.tar.gz bcm5719-llvm-51a7a9d712dce44179fa09d15d1cbda9f09fa227.zip |
Make it possible to include llvm-c without including C++ headers. Patch by Filip Pizlo.
llvm-svn: 178713
Diffstat (limited to 'llvm/include/llvm-c/TargetMachine.h')
-rw-r--r-- | llvm/include/llvm-c/TargetMachine.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/include/llvm-c/TargetMachine.h b/llvm/include/llvm-c/TargetMachine.h index 691abdfcb47..e6f477af787 100644 --- a/llvm/include/llvm-c/TargetMachine.h +++ b/llvm/include/llvm-c/TargetMachine.h @@ -119,7 +119,9 @@ LLVMBool LLVMTargetMachineEmitToFile(LLVMTargetMachineRef T, LLVMModuleRef M, #ifdef __cplusplus } +#endif +#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) namespace llvm { class TargetMachine; class Target; @@ -138,6 +140,6 @@ namespace llvm { return reinterpret_cast<LLVMTargetRef>(const_cast<Target*>(P)); } } -#endif +#endif /* defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) */ #endif |