Revert r178713

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178769 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2013-04-04 17:40:53 +00:00
parent ed89568948
commit 9313da5a90
6 changed files with 14 additions and 30 deletions

View File

@@ -17,15 +17,14 @@
#include "llvm/Support/DataTypes.h" #include "llvm/Support/DataTypes.h"
#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) #ifdef __cplusplus
/* Need these includes to support the LLVM 'cast' template for the C++ 'wrap' /* Need these includes to support the LLVM 'cast' template for the C++ 'wrap'
and 'unwrap' conversion functions. */ and 'unwrap' conversion functions. */
#include "llvm/IR/IRBuilder.h" #include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Module.h" #include "llvm/IR/Module.h"
#include "llvm/PassRegistry.h" #include "llvm/PassRegistry.h"
#endif /* defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) */
#ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@@ -2670,9 +2669,7 @@ LLVMBool LLVMIsMultithreaded();
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif
#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS)
namespace llvm { namespace llvm {
class MemoryBuffer; class MemoryBuffer;
class PassManagerBase; class PassManagerBase;
@@ -2766,6 +2763,6 @@ namespace llvm {
} }
} }
#endif /* defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) */ #endif /* !defined(__cplusplus) */
#endif /* defined(LLVM_C_CORE_H) */ #endif /* !defined(LLVM_C_CORE_H) */

View File

@@ -138,9 +138,7 @@ void *LLVMGetPointerToGlobal(LLVMExecutionEngineRef EE, LLVMValueRef Global);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif
#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS)
namespace llvm { namespace llvm {
struct GenericValue; struct GenericValue;
class ExecutionEngine; class ExecutionEngine;
@@ -159,6 +157,7 @@ namespace llvm {
#undef DEFINE_SIMPLE_CONVERSION_FUNCTIONS #undef DEFINE_SIMPLE_CONVERSION_FUNCTIONS
} }
#endif /* defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) */
#endif /* defined(__cplusplus) */
#endif #endif

View File

@@ -22,11 +22,9 @@
#include "llvm-c/Core.h" #include "llvm-c/Core.h"
#include "llvm/Config/llvm-config.h" #include "llvm/Config/llvm-config.h"
#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 #ifdef __cplusplus
#include "llvm/Object/ObjectFile.h"
extern "C" { extern "C" {
#endif #endif
@@ -101,9 +99,7 @@ const char *LLVMGetRelocationValueString(LLVMRelocationIteratorRef RI);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif
#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS)
namespace llvm { namespace llvm {
namespace object { namespace object {
inline ObjectFile *unwrap(LLVMObjectFileRef OF) { inline ObjectFile *unwrap(LLVMObjectFileRef OF) {
@@ -146,8 +142,8 @@ namespace llvm {
} }
} }
#endif /* defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) */
#endif /* defined(__cplusplus) */
#endif #endif

View File

@@ -235,9 +235,7 @@ void LLVMDisposeTargetData(LLVMTargetDataRef);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif
#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS)
namespace llvm { namespace llvm {
class DataLayout; class DataLayout;
class TargetLibraryInfo; class TargetLibraryInfo;
@@ -259,6 +257,7 @@ namespace llvm {
return reinterpret_cast<LLVMTargetLibraryInfoRef>(X); return reinterpret_cast<LLVMTargetLibraryInfoRef>(X);
} }
} }
#endif /* defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) */
#endif /* defined(__cplusplus) */
#endif #endif

View File

@@ -119,9 +119,7 @@ LLVMBool LLVMTargetMachineEmitToFile(LLVMTargetMachineRef T, LLVMModuleRef M,
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif
#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS)
namespace llvm { namespace llvm {
class TargetMachine; class TargetMachine;
class Target; class Target;
@@ -140,6 +138,6 @@ namespace llvm {
return reinterpret_cast<LLVMTargetRef>(const_cast<Target*>(P)); return reinterpret_cast<LLVMTargetRef>(const_cast<Target*>(P));
} }
} }
#endif /* defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) */ #endif
#endif #endif

View File

@@ -18,11 +18,8 @@
typedef struct LLVMOpaquePassManagerBuilder *LLVMPassManagerBuilderRef; typedef struct LLVMOpaquePassManagerBuilder *LLVMPassManagerBuilderRef;
#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS)
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
#endif
#ifdef __cplusplus #ifdef __cplusplus
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
extern "C" { extern "C" {
#endif #endif
@@ -89,9 +86,7 @@ void LLVMPassManagerBuilderPopulateLTOPassManager(LLVMPassManagerBuilderRef PMB,
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif
#if defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS)
namespace llvm { namespace llvm {
inline PassManagerBuilder *unwrap(LLVMPassManagerBuilderRef P) { inline PassManagerBuilder *unwrap(LLVMPassManagerBuilderRef P) {
return reinterpret_cast<PassManagerBuilder*>(P); return reinterpret_cast<PassManagerBuilder*>(P);
@@ -101,6 +96,6 @@ namespace llvm {
return reinterpret_cast<LLVMPassManagerBuilderRef>(P); return reinterpret_cast<LLVMPassManagerBuilderRef>(P);
} }
} }
#endif /* defined(__cplusplus) && !defined(LLVM_DO_NOT_INCLUDE_CPP_HEADERS) */ #endif
#endif #endif