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/Object.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/Object.h')
-rw-r--r-- | llvm/include/llvm-c/Object.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/include/llvm-c/Object.h b/llvm/include/llvm-c/Object.h index e2dad62b4e0..b6fe17a159f 100644 --- a/llvm/include/llvm-c/Object.h +++ b/llvm/include/llvm-c/Object.h @@ -22,9 +22,11 @@ #include "llvm-c/Core.h" #include "llvm/Config/llvm-config.h" -#ifdef __cplusplus +#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) #include "llvm/Object/ObjectFile.h" +#endif /* defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) */ +#ifdef __cplusplus extern "C" { #endif @@ -99,7 +101,9 @@ const char *LLVMGetRelocationValueString(LLVMRelocationIteratorRef RI); #ifdef __cplusplus } +#endif +#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) namespace llvm { namespace object { inline ObjectFile *unwrap(LLVMObjectFileRef OF) { @@ -142,8 +146,8 @@ namespace llvm { } } +#endif /* defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) */ -#endif /* defined(__cplusplus) */ #endif |