Minor changes to the MCJITTest unittests to use the correct API for finalizing
[oota-llvm.git] / unittests / ExecutionEngine / MCJIT / MCJITObjectCacheTest.cpp
index 0061e30e7a541cfa0cc5c58f37020fd93a3a4d55..32fc292496c55afe0e55760c4f674885026dadb5 100644 (file)
@@ -98,14 +98,13 @@ protected:
 
   void compileAndRun(int ExpectedRC = OriginalRC) {
     // This function shouldn't be called until after SetUp.
-    ASSERT_TRUE(0 != TheJIT);
+    ASSERT_TRUE(TheJIT.isValid());
     ASSERT_TRUE(0 != Main);
 
+    // We may be using a null cache, so ensure compilation is valid.
     TheJIT->finalizeObject();
     void *vPtr = TheJIT->getPointerToFunction(Main);
 
-    static_cast<SectionMemoryManager*>(MM)->invalidateInstructionCache();
-
     EXPECT_TRUE(0 != vPtr)
       << "Unable to get pointer to main() from JIT";