OrcJITTests//ObjectLinkingLayerTest.cpp: Appease msc18's C2327. It seems definition...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Sun, 10 Jan 2016 15:56:49 +0000 (15:56 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Sun, 10 Jan 2016 15:56:49 +0000 (15:56 +0000)
  llvm\unittests\ExecutionEngine\Orc\ObjectLinkingLayerTest.cpp(115) : error C2327: 'llvm::OrcExecutionTest::TM' : is not a type name, static, or enumerator
  llvm\unittests\ExecutionEngine\Orc\ObjectLinkingLayerTest.cpp(115) : error C2065: 'TM' : undeclared identifier

FYI, "this->TM" was valid even before moving class SectionMemoryManagerWrapper.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257290 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/ExecutionEngine/Orc/ObjectLinkingLayerTest.cpp

index d7c0b74..59ee01f 100644 (file)
@@ -26,6 +26,15 @@ class ObjectLinkingLayerExecutionTest : public testing::Test,
                                         public OrcExecutionTest {
 };
 
+class SectionMemoryManagerWrapper : public SectionMemoryManager {
+public:
+  int FinalizationCount = 0;
+  bool finalizeMemory(std::string *ErrMsg = 0) override {
+    ++FinalizationCount;
+    return SectionMemoryManager::finalizeMemory(ErrMsg);
+  }
+};
+
 TEST(ObjectLinkingLayerTest, TestSetProcessAllSections) {
 
   class SectionMemoryManagerWrapper : public SectionMemoryManager {
@@ -102,15 +111,6 @@ TEST_F(ObjectLinkingLayerExecutionTest, NoDuplicateFinalization) {
   if (!TM)
     return;
 
-  class SectionMemoryManagerWrapper : public SectionMemoryManager {
-  public:
-    int FinalizationCount = 0;
-    bool finalizeMemory(std::string *ErrMsg = 0) override {
-      ++FinalizationCount;
-      return SectionMemoryManager::finalizeMemory(ErrMsg);
-    }
-  };
-
   ObjectLinkingLayer<> ObjLayer;
   SimpleCompiler Compile(*TM);