mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-28 09:31:03 +00:00
Tidy some #includes and forward-declarations, and move the C binding code
out of PassManager.cpp and into Core.cpp with the rest of the C binding code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110494 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
634bab148c
commit
11112e0d7b
@ -54,6 +54,7 @@ namespace llvm {
|
|||||||
class Mangler;
|
class Mangler;
|
||||||
class TargetLoweringObjectFile;
|
class TargetLoweringObjectFile;
|
||||||
class TargetData;
|
class TargetData;
|
||||||
|
class TargetMachine;
|
||||||
class Twine;
|
class Twine;
|
||||||
class Type;
|
class Type;
|
||||||
|
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
class Pass;
|
class Pass;
|
||||||
class ModulePass;
|
|
||||||
class Module;
|
class Module;
|
||||||
|
|
||||||
class PassManagerImpl;
|
class PassManagerImpl;
|
||||||
|
@ -26,8 +26,6 @@
|
|||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
class TargetMachine;
|
|
||||||
|
|
||||||
//===---------------------------------------------------------------------------
|
//===---------------------------------------------------------------------------
|
||||||
/// PassInfo class - An instance of this class exists for every pass known by
|
/// PassInfo class - An instance of this class exists for every pass known by
|
||||||
/// the system, and can be obtained from a live Pass by calling its
|
/// the system, and can be obtained from a live Pass by calling its
|
||||||
|
@ -39,6 +39,7 @@ namespace llvm {
|
|||||||
class raw_ostream;
|
class raw_ostream;
|
||||||
class SectionKind;
|
class SectionKind;
|
||||||
class MCContext;
|
class MCContext;
|
||||||
|
class TargetMachine;
|
||||||
|
|
||||||
typedef std::vector<ELFSym*>::iterator ELFSymIter;
|
typedef std::vector<ELFSym*>::iterator ELFSymIter;
|
||||||
typedef std::vector<ELFSection*>::iterator ELFSectionIter;
|
typedef std::vector<ELFSection*>::iterator ELFSectionIter;
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "llvm/TypeSymbolTable.h"
|
#include "llvm/TypeSymbolTable.h"
|
||||||
#include "llvm/InlineAsm.h"
|
#include "llvm/InlineAsm.h"
|
||||||
#include "llvm/IntrinsicInst.h"
|
#include "llvm/IntrinsicInst.h"
|
||||||
|
#include "llvm/PassManager.h"
|
||||||
#include "llvm/Support/CallSite.h"
|
#include "llvm/Support/CallSite.h"
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
#include "llvm/Support/ErrorHandling.h"
|
#include "llvm/Support/ErrorHandling.h"
|
||||||
@ -2231,3 +2232,39 @@ LLVMBool LLVMCreateMemoryBufferWithSTDIN(LLVMMemoryBufferRef *OutMemBuf,
|
|||||||
void LLVMDisposeMemoryBuffer(LLVMMemoryBufferRef MemBuf) {
|
void LLVMDisposeMemoryBuffer(LLVMMemoryBufferRef MemBuf) {
|
||||||
delete unwrap(MemBuf);
|
delete unwrap(MemBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*===-- Pass Manager ------------------------------------------------------===*/
|
||||||
|
|
||||||
|
LLVMPassManagerRef LLVMCreatePassManager() {
|
||||||
|
return wrap(new PassManager());
|
||||||
|
}
|
||||||
|
|
||||||
|
LLVMPassManagerRef LLVMCreateFunctionPassManagerForModule(LLVMModuleRef M) {
|
||||||
|
return wrap(new FunctionPassManager(unwrap(M)));
|
||||||
|
}
|
||||||
|
|
||||||
|
LLVMPassManagerRef LLVMCreateFunctionPassManager(LLVMModuleProviderRef P) {
|
||||||
|
return LLVMCreateFunctionPassManagerForModule(
|
||||||
|
reinterpret_cast<LLVMModuleRef>(P));
|
||||||
|
}
|
||||||
|
|
||||||
|
LLVMBool LLVMRunPassManager(LLVMPassManagerRef PM, LLVMModuleRef M) {
|
||||||
|
return unwrap<PassManager>(PM)->run(*unwrap(M));
|
||||||
|
}
|
||||||
|
|
||||||
|
LLVMBool LLVMInitializeFunctionPassManager(LLVMPassManagerRef FPM) {
|
||||||
|
return unwrap<FunctionPassManager>(FPM)->doInitialization();
|
||||||
|
}
|
||||||
|
|
||||||
|
LLVMBool LLVMRunFunctionPassManager(LLVMPassManagerRef FPM, LLVMValueRef F) {
|
||||||
|
return unwrap<FunctionPassManager>(FPM)->run(*unwrap<Function>(F));
|
||||||
|
}
|
||||||
|
|
||||||
|
LLVMBool LLVMFinalizeFunctionPassManager(LLVMPassManagerRef FPM) {
|
||||||
|
return unwrap<FunctionPassManager>(FPM)->doFinalization();
|
||||||
|
}
|
||||||
|
|
||||||
|
void LLVMDisposePassManager(LLVMPassManagerRef PM) {
|
||||||
|
delete unwrap(PM);
|
||||||
|
}
|
||||||
|
@ -17,19 +17,14 @@
|
|||||||
#include "llvm/PassManager.h"
|
#include "llvm/PassManager.h"
|
||||||
#include "llvm/PassRegistry.h"
|
#include "llvm/PassRegistry.h"
|
||||||
#include "llvm/Module.h"
|
#include "llvm/Module.h"
|
||||||
#include "llvm/ADT/STLExtras.h"
|
|
||||||
#include "llvm/ADT/StringMap.h"
|
#include "llvm/ADT/StringMap.h"
|
||||||
#include "llvm/Assembly/PrintModulePass.h"
|
#include "llvm/Assembly/PrintModulePass.h"
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
#include "llvm/Support/ManagedStatic.h"
|
|
||||||
#include "llvm/Support/PassNameParser.h"
|
#include "llvm/Support/PassNameParser.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
#include "llvm/System/Atomic.h"
|
#include "llvm/System/Atomic.h"
|
||||||
#include "llvm/System/Mutex.h"
|
#include "llvm/System/Mutex.h"
|
||||||
#include "llvm/System/Threading.h"
|
#include "llvm/System/Threading.h"
|
||||||
#include <algorithm>
|
|
||||||
#include <map>
|
|
||||||
#include <set>
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
#include "llvm/System/Mutex.h"
|
#include "llvm/System/Mutex.h"
|
||||||
#include "llvm/System/Threading.h"
|
#include "llvm/System/Threading.h"
|
||||||
#include "llvm-c/Core.h"
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <map>
|
#include <map>
|
||||||
@ -1814,38 +1813,3 @@ void BasicBlockPass::assignPassManager(PMStack &PMS,
|
|||||||
}
|
}
|
||||||
|
|
||||||
PassManagerBase::~PassManagerBase() {}
|
PassManagerBase::~PassManagerBase() {}
|
||||||
|
|
||||||
/*===-- C Bindings --------------------------------------------------------===*/
|
|
||||||
|
|
||||||
LLVMPassManagerRef LLVMCreatePassManager() {
|
|
||||||
return wrap(new PassManager());
|
|
||||||
}
|
|
||||||
|
|
||||||
LLVMPassManagerRef LLVMCreateFunctionPassManagerForModule(LLVMModuleRef M) {
|
|
||||||
return wrap(new FunctionPassManager(unwrap(M)));
|
|
||||||
}
|
|
||||||
|
|
||||||
LLVMPassManagerRef LLVMCreateFunctionPassManager(LLVMModuleProviderRef P) {
|
|
||||||
return LLVMCreateFunctionPassManagerForModule(
|
|
||||||
reinterpret_cast<LLVMModuleRef>(P));
|
|
||||||
}
|
|
||||||
|
|
||||||
LLVMBool LLVMRunPassManager(LLVMPassManagerRef PM, LLVMModuleRef M) {
|
|
||||||
return unwrap<PassManager>(PM)->run(*unwrap(M));
|
|
||||||
}
|
|
||||||
|
|
||||||
LLVMBool LLVMInitializeFunctionPassManager(LLVMPassManagerRef FPM) {
|
|
||||||
return unwrap<FunctionPassManager>(FPM)->doInitialization();
|
|
||||||
}
|
|
||||||
|
|
||||||
LLVMBool LLVMRunFunctionPassManager(LLVMPassManagerRef FPM, LLVMValueRef F) {
|
|
||||||
return unwrap<FunctionPassManager>(FPM)->run(*unwrap<Function>(F));
|
|
||||||
}
|
|
||||||
|
|
||||||
LLVMBool LLVMFinalizeFunctionPassManager(LLVMPassManagerRef FPM) {
|
|
||||||
return unwrap<FunctionPassManager>(FPM)->doFinalization();
|
|
||||||
}
|
|
||||||
|
|
||||||
void LLVMDisposePassManager(LLVMPassManagerRef PM) {
|
|
||||||
delete unwrap(PM);
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user