#include "llvm/Support/DataTypes.h"
-#ifdef __cplusplus
-
+#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS)
/* Need these includes to support the LLVM 'cast' template for the C++ 'wrap'
and 'unwrap' conversion functions. */
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Module.h"
#include "llvm/PassRegistry.h"
+#endif /* defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) */
+#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
+#endif
+#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS)
namespace llvm {
class MemoryBuffer;
class PassManagerBase;
}
}
-#endif /* !defined(__cplusplus) */
+#endif /* defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) */
-#endif /* !defined(LLVM_C_CORE_H) */
+#endif /* defined(LLVM_C_CORE_H) */
#ifdef __cplusplus
}
+#endif
+#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS)
namespace llvm {
struct GenericValue;
class ExecutionEngine;
#undef DEFINE_SIMPLE_CONVERSION_FUNCTIONS
}
-
-#endif /* defined(__cplusplus) */
+#endif /* defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) */
#endif
#include "llvm-c/Core.h"
#include "llvm/Config/llvm-config.h"
-#ifdef __cplusplus
+#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS)
#include "llvm/Object/ObjectFile.h"
+#endif /* defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) */
+#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
+#endif
+#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS)
namespace llvm {
namespace object {
inline ObjectFile *unwrap(LLVMObjectFileRef OF) {
}
}
+#endif /* defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) */
-#endif /* defined(__cplusplus) */
#endif
#ifdef __cplusplus
}
+#endif
+#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS)
namespace llvm {
class DataLayout;
class TargetLibraryInfo;
return reinterpret_cast<LLVMTargetLibraryInfoRef>(X);
}
}
-
-#endif /* defined(__cplusplus) */
+#endif /* defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) */
#endif
#ifdef __cplusplus
}
+#endif
+#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS)
namespace llvm {
class TargetMachine;
class Target;
return reinterpret_cast<LLVMTargetRef>(const_cast<Target*>(P));
}
}
-#endif
+#endif /* defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) */
#endif
typedef struct LLVMOpaquePassManagerBuilder *LLVMPassManagerBuilderRef;
-#ifdef __cplusplus
+#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS)
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
+#endif
+
+#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
+#endif
+#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS)
namespace llvm {
inline PassManagerBuilder *unwrap(LLVMPassManagerBuilderRef P) {
return reinterpret_cast<PassManagerBuilder*>(P);
return reinterpret_cast<LLVMPassManagerBuilderRef>(P);
}
}
-#endif
+#endif /* defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) */
#endif