[ORC] Don't require PageSize or Triple during TargetProcessControl construction
authorLang Hames <lhames@gmail.com>
Sat, 25 Jul 2020 04:17:37 +0000 (21:17 -0700)
committerLang Hames <lhames@gmail.com>
Sat, 25 Jul 2020 22:21:43 +0000 (15:21 -0700)
Subclasses will commonly gather that information from a remote during
construction, in which case they won't have meaningful values to pass to
TargetProcessControl's constructor.

llvm/include/llvm/ExecutionEngine/Orc/TargetProcessControl.h
llvm/lib/ExecutionEngine/Orc/TargetProcessControl.cpp

index 37bfa5a..887ac94 100644 (file)
@@ -152,7 +152,6 @@ public:
   virtual Expected<LookupResult> lookupSymbols(LookupRequest Request) = 0;
 
 protected:
-  TargetProcessControl(Triple TT, unsigned PageSize);
 
   Triple TT;
   unsigned PageSize = 0;
index ab07d3a..3f9a938 100644 (file)
@@ -19,13 +19,12 @@ namespace orc {
 
 TargetProcessControl::MemoryAccess::~MemoryAccess() {}
 
-TargetProcessControl::TargetProcessControl(Triple TT, unsigned PageSize)
-    : TT(std::move(TT)), PageSize(PageSize) {}
-
 TargetProcessControl::~TargetProcessControl() {}
 
-SelfTargetProcessControl::SelfTargetProcessControl(Triple TT, unsigned PageSize)
-    : TargetProcessControl(std::move(TT), PageSize) {
+SelfTargetProcessControl::SelfTargetProcessControl(Triple TT,
+                                                   unsigned PageSize) {
+  this->TT = std::move(TT);
+  this->PageSize = PageSize;
   this->MemMgr = IPMM.get();
   this->MemAccess = this;
   if (this->TT.isOSBinFormatMachO())