Make it possible to include llvm-c without including C++ headers. Patch by Filip Pizlo.

llvm-svn: 178713
This commit is contained in:
Evan Cheng
2013-04-03 23:12:39 +00:00
parent c2d5bf5c53
commit 51a7a9d712
6 changed files with 29 additions and 13 deletions

View File

@@ -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