summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@apple.com>2014-05-15 17:49:20 +0000
committerJuergen Ributzka <juergen@apple.com>2014-05-15 17:49:20 +0000
commit218bad2bc5292bec2a46d59e0f85d4c9fde05bf4 (patch)
tree5f08c8f8b084eef58e5627434499657006d527ee /unittests
parentfd76d8a72dac035a4e1963bc6fe635a3b688cfcd (diff)
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
Diffstat (limited to 'unittests')
-rw-r--r--unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp b/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
index c8e0c882299..3813d59dbd1 100644
--- a/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
+++ b/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
@@ -28,7 +28,6 @@ using namespace llvm;
static bool didCallAllocateCodeSection;
static bool didAllocateCompactUnwindSection;
-static bool didCallPassRunListener;
static uint8_t *roundTripAllocateCodeSection(void *object, uintptr_t size,
unsigned alignment,
@@ -65,12 +64,6 @@ static void roundTripDestroy(void *object) {
delete static_cast<SectionMemoryManager*>(object);
}
-static void passRunListenerCallback(LLVMContextRef C, LLVMPassRef P,
- LLVMModuleRef M, LLVMValueRef F,
- LLVMBasicBlockRef BB) {
- didCallPassRunListener = true;
-}
-
namespace {
// memory manager to test reserve allocation space callback
@@ -149,7 +142,6 @@ protected:
virtual void SetUp() {
didCallAllocateCodeSection = false;
didAllocateCompactUnwindSection = false;
- didCallPassRunListener = false;
Module = 0;
Function = 0;
Engine = 0;
@@ -437,23 +429,3 @@ TEST_F(MCJITCAPITest, reserve_allocation_space) {
EXPECT_TRUE(MM->UsedCodeSize > 0);
EXPECT_TRUE(MM->UsedDataSizeRW > 0);
}
-
-TEST_F(MCJITCAPITest, pass_run_listener) {
- SKIP_UNSUPPORTED_PLATFORM;
-
- buildSimpleFunction();
- buildMCJITOptions();
- buildMCJITEngine();
- LLVMContextRef C = LLVMGetGlobalContext();
- LLVMAddPassRunListener(C, passRunListenerCallback);
- buildAndRunPasses();
-
- union {
- void *raw;
- int (*usable)();
- } functionPointer;
- functionPointer.raw = LLVMGetPointerToGlobal(Engine, Function);
-
- EXPECT_EQ(42, functionPointer.usable());
- EXPECT_TRUE(didCallPassRunListener);
-}