Minor changes to the MCJITTest unittests to use the correct API for finalizing
[oota-llvm.git] / unittests / ExecutionEngine / MCJIT / MCJITObjectCacheTest.cpp
index abe8be450ae91e0d1a01aa7039d7c2bf13d8577c..32fc292496c55afe0e55760c4f674885026dadb5 100644 (file)
@@ -101,11 +101,10 @@ protected:
     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";