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
diff --git a/include/llvm-c/Target.h b/include/llvm-c/Target.h
index 57abfa0..0327c04 100644
--- a/include/llvm-c/Target.h
+++ b/include/llvm-c/Target.h
@@ -235,7 +235,9 @@
 
 #ifdef __cplusplus
 }
+#endif
 
+#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS)
 namespace llvm {
   class DataLayout;
   class TargetLibraryInfo;
@@ -257,7 +259,6 @@
     return reinterpret_cast<LLVMTargetLibraryInfoRef>(X);
   }
 }
-
-#endif /* defined(__cplusplus) */
+#endif /* defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) */
 
 #endif