summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c/TargetMachine.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm-c/TargetMachine.h')
-rw-r--r--llvm/include/llvm-c/TargetMachine.h4
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
OpenPOWER on IntegriCloud