From 51a7a9d712dce44179fa09d15d1cbda9f09fa227 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 3 Apr 2013 23:12:39 +0000 Subject: Make it possible to include llvm-c without including C++ headers. Patch by Filip Pizlo. llvm-svn: 178713 --- llvm/include/llvm-c/TargetMachine.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'llvm/include/llvm-c/TargetMachine.h') 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(const_cast(P)); } } -#endif +#endif /* defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) */ #endif -- cgit v1.2.3