aboutsummaryrefslogtreecommitdiff
path: root/include/llvm-c/TargetMachine.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2013-04-03 23:12:39 +0000
committerEvan Cheng <evan.cheng@apple.com>2013-04-03 23:12:39 +0000
commit7d2166a643a7c16b9b0c87441b662f66e79b131f (patch)
treec271913ddc310eaae3b62a087dd476c2144de93e /include/llvm-c/TargetMachine.h
parent9bede89bbe04e49953ce373620355d2de4b0c084 (diff)
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/TargetMachine.h')
-rw-r--r--include/llvm-c/TargetMachine.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm-c/TargetMachine.h b/include/llvm-c/TargetMachine.h
index 691abdfcb4..e6f477af78 100644
--- a/include/llvm-c/TargetMachine.h
+++ b/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