[llvm] r341494 - Remove some unnecessary constructor arguments.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 5 13:57:41 PDT 2018


Author: lhames
Date: Wed Sep  5 13:57:41 2018
New Revision: 341494

URL: http://llvm.org/viewvc/llvm-project?rev=341494&view=rev
Log:
Remove some unnecessary constructor arguments.

ExecutionSession defaults to creating a new shared pool if none is provided,
so explicitly passing one in is unnecessary.

Modified:
    llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayer2Test.cpp
    llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp

Modified: llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayer2Test.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayer2Test.cpp?rev=341494&r1=341493&r2=341494&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayer2Test.cpp (original)
+++ llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayer2Test.cpp Wed Sep  5 13:57:41 2018
@@ -67,7 +67,7 @@ static bool testSetProcessAllSections(st
   bool DebugSectionSeen = false;
   auto MM = std::make_shared<MemoryManagerWrapper>(DebugSectionSeen);
 
-  ExecutionSession ES(std::make_shared<SymbolStringPool>());
+  ExecutionSession ES;
   auto &JD = ES.createJITDylib("main");
   auto Foo = ES.getSymbolStringPool().intern("foo");
 
@@ -261,7 +261,7 @@ TEST(RTDyldObjectLinkingLayer2Test, NoDu
     return;
 
   LLVMContext Context;
-  ExecutionSession ES(std::make_shared<SymbolStringPool>());
+  ExecutionSession ES;
   auto &JD = ES.createJITDylib("main");
 
   auto Foo = ES.getSymbolStringPool().intern("foo");
@@ -338,7 +338,7 @@ TEST(RTDyldObjectLinkingLayer2Test, NoPr
   if (!TM)
     return;
 
-  ExecutionSession ES(std::make_shared<SymbolStringPool>());
+  ExecutionSession ES;
   auto &JD = ES.createJITDylib("main");
 
   auto Foo = ES.getSymbolStringPool().intern("foo");
@@ -392,7 +392,7 @@ TEST(RTDyldObjectLinkingLayer2Test, NoPr
 }
 
 TEST(RTDyldObjectLinkingLayer2Test, TestNotifyLoadedSignature) {
-  ExecutionSession ES(std::make_shared<SymbolStringPool>());
+  ExecutionSession ES;
   RTDyldObjectLinkingLayer2 ObjLayer(
       ES,
       [](VModuleKey) -> std::shared_ptr<RuntimeDyld::MemoryManager> {

Modified: llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp?rev=341494&r1=341493&r2=341494&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp (original)
+++ llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp Wed Sep  5 13:57:41 2018
@@ -67,7 +67,7 @@ TEST(RTDyldObjectLinkingLayerTest, TestS
   bool DebugSectionSeen = false;
   auto MM = std::make_shared<MemoryManagerWrapper>(DebugSectionSeen);
 
-  ExecutionSession ES(std::make_shared<SymbolStringPool>());
+  ExecutionSession ES;
 
   RTDyldObjectLinkingLayer ObjLayer(ES, [&MM](VModuleKey) {
     return RTDyldObjectLinkingLayer::Resources{
@@ -123,7 +123,7 @@ TEST_F(RTDyldObjectLinkingLayerExecution
   if (!SupportsJIT)
     return;
 
-  ExecutionSession ES(std::make_shared<SymbolStringPool>());
+  ExecutionSession ES;
 
   auto MM = std::make_shared<SectionMemoryManagerWrapper>();
 
@@ -207,7 +207,7 @@ TEST_F(RTDyldObjectLinkingLayerExecution
   if (!SupportsJIT)
     return;
 
-  ExecutionSession ES(std::make_shared<SymbolStringPool>());
+  ExecutionSession ES;
 
   auto MM = std::make_shared<SectionMemoryManagerWrapper>();
 
@@ -268,7 +268,7 @@ TEST_F(RTDyldObjectLinkingLayerExecution
 }
 
 TEST_F(RTDyldObjectLinkingLayerExecutionTest, TestNotifyLoadedSignature) {
-  ExecutionSession ES(std::make_shared<SymbolStringPool>());
+  ExecutionSession ES;
   RTDyldObjectLinkingLayer ObjLayer(
       ES,
       [](VModuleKey) {




More information about the llvm-commits mailing list