[PATCH] D11084: Unbreak WebAssembly build

JF Bastien jfb at chromium.org
Thu Jul 9 14:00:25 PDT 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL241859: Unbreak WebAssembly build (authored by jfb).

Changed prior to commit:
  http://reviews.llvm.org/D11084?vs=29383&id=29389#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D11084

Files:
  llvm/trunk/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.cpp
  llvm/trunk/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.h
  llvm/trunk/lib/Target/WebAssembly/WebAssemblySubtarget.cpp
  llvm/trunk/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h

Index: llvm/trunk/lib/Target/WebAssembly/WebAssemblySubtarget.cpp
===================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblySubtarget.cpp
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblySubtarget.cpp
@@ -42,7 +42,7 @@
                                            const TargetMachine &TM)
     : WebAssemblyGenSubtargetInfo(TT, CPU, FS), HasSIMD128(false),
       CPUString(CPU), TargetTriple(TT), FrameLowering(),
-      InstrInfo(initializeSubtargetDependencies(FS)),
-      TSInfo(TM.getDataLayout()), TLInfo(TM, *this) {}
+      InstrInfo(initializeSubtargetDependencies(FS)), TSInfo(),
+      TLInfo(TM, *this) {}
 
 bool WebAssemblySubtarget::enableMachineScheduler() const { return true; }
Index: llvm/trunk/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.h
===================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.h
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.h
@@ -22,7 +22,6 @@
 
 class WebAssemblySelectionDAGInfo final : public TargetSelectionDAGInfo {
 public:
-  explicit WebAssemblySelectionDAGInfo(const DataLayout *DL);
   ~WebAssemblySelectionDAGInfo() override;
 };
 
Index: llvm/trunk/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.cpp
===================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.cpp
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.cpp
@@ -17,7 +17,4 @@
 
 #define DEBUG_TYPE "wasm-selectiondag-info"
 
-WebAssemblySelectionDAGInfo::WebAssemblySelectionDAGInfo(const DataLayout *DL)
-    : TargetSelectionDAGInfo(DL) {}
-
 WebAssemblySelectionDAGInfo::~WebAssemblySelectionDAGInfo() {}
Index: llvm/trunk/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h
===================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h
@@ -31,39 +31,23 @@
   typedef TargetTransformInfo TTI;
   friend BaseT;
 
-  const WebAssemblyTargetMachine *TM;
   const WebAssemblySubtarget *ST;
   const WebAssemblyTargetLowering *TLI;
 
   const WebAssemblySubtarget *getST() const { return ST; }
   const WebAssemblyTargetLowering *getTLI() const { return TLI; }
 
 public:
   WebAssemblyTTIImpl(const WebAssemblyTargetMachine *TM, Function &F)
-      : BaseT(TM), TM(TM), ST(TM->getSubtargetImpl(F)),
+      : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)),
         TLI(ST->getTargetLowering()) {}
 
   // Provide value semantics. MSVC requires that we spell all of these out.
   WebAssemblyTTIImpl(const WebAssemblyTTIImpl &Arg)
-      : BaseT(static_cast<const BaseT &>(Arg)), TM(Arg.TM), ST(Arg.ST),
-        TLI(Arg.TLI) {}
+      : BaseT(static_cast<const BaseT &>(Arg)), ST(Arg.ST), TLI(Arg.TLI) {}
   WebAssemblyTTIImpl(WebAssemblyTTIImpl &&Arg)
-      : BaseT(std::move(static_cast<BaseT &>(Arg))), TM(std::move(Arg.TM)),
-        ST(std::move(Arg.ST)), TLI(std::move(Arg.TLI)) {}
-  WebAssemblyTTIImpl &operator=(const WebAssemblyTTIImpl &RHS) {
-    BaseT::operator=(static_cast<const BaseT &>(RHS));
-    TM = RHS.TM;
-    ST = RHS.ST;
-    TLI = RHS.TLI;
-    return *this;
-  }
-  WebAssemblyTTIImpl &operator=(WebAssemblyTTIImpl &&RHS) {
-    BaseT::operator=(std::move(static_cast<BaseT &>(RHS)));
-    TM = std::move(RHS.TM);
-    ST = std::move(RHS.ST);
-    TLI = std::move(RHS.TLI);
-    return *this;
-  }
+      : BaseT(std::move(static_cast<BaseT &>(Arg))), ST(std::move(Arg.ST)),
+        TLI(std::move(Arg.TLI)) {}
 
   /// \name Scalar TTI Implementations
   /// @{


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11084.29389.patch
Type: text/x-patch
Size: 3735 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150709/44270149/attachment.bin>


More information about the llvm-commits mailing list