Revert "[PM] Add pass run listeners to the pass manager."

Revert the current implementation and C API. New implementation and C APIs are
in the works.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208904 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Juergen Ributzka
2014-05-15 17:49:20 +00:00
parent fd76d8a72d
commit 218bad2bc5
11 changed files with 8 additions and 207 deletions

View File

@ -27,7 +27,6 @@
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
#include "llvm/PassManager.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
@ -45,21 +44,6 @@ using namespace llvm;
#define DEBUG_TYPE "ir"
namespace {
struct LLVMPassRunListener : PassRunListener {
LLVMPassRunListenerHandlerTy Callback;
LLVMPassRunListener(LLVMContext *Context, LLVMPassRunListenerHandlerTy Fn)
: PassRunListener(Context), Callback(Fn) {}
void passRun(LLVMContext *C, Pass *P, Module *M, Function *F,
BasicBlock *BB) override {
Callback(wrap(C), wrap(P), wrap(M), wrap(F), wrap(BB));
}
};
// Create wrappers for C Binding types (see CBindingWrapping.h).
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(LLVMPassRunListener, LLVMPassRunListenerRef)
} // end anonymous namespace
void llvm::initializeCore(PassRegistry &Registry) {
initializeDominatorTreeWrapperPassPass(Registry);
initializePrintModulePassWrapperPass(Registry);
@ -150,15 +134,7 @@ LLVMDiagnosticSeverity LLVMGetDiagInfoSeverity(LLVMDiagnosticInfoRef DI){
return severity;
}
LLVMPassRunListenerRef LLVMAddPassRunListener(LLVMContextRef Context,
LLVMPassRunListenerHandlerTy Fn) {
return wrap(new LLVMPassRunListener(unwrap(Context), Fn));
}
void LLVMRemovePassRunListener(LLVMContextRef Context,
LLVMPassRunListenerRef Listener) {
unwrap(Context)->removeRunListener(unwrap(Listener));
}
/*===-- Operations on modules ---------------------------------------------===*/
@ -2671,12 +2647,6 @@ void LLVMDisposeMemoryBuffer(LLVMMemoryBufferRef MemBuf) {
delete unwrap(MemBuf);
}
/*===-- Pass -------------------------------------------------------------===*/
const char *LLVMGetPassName(LLVMPassRef P) {
return unwrap(P)->getPassName();
}
/*===-- Pass Registry -----------------------------------------------------===*/
LLVMPassRegistryRef LLVMGetGlobalPassRegistry(void) {