[llvm] r264516 - Revert "NFC: static_assert instead of comment"

JF Bastien via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 26 11:20:02 PDT 2016


Author: jfb
Date: Sat Mar 26 13:20:02 2016
New Revision: 264516

URL: http://llvm.org/viewvc/llvm-project?rev=264516&view=rev
Log:
Revert "NFC: static_assert instead of comment"

This reverts commit fa36fcff16c7d4f78204d6296bf96c3558a4a672.

Causes the following Windows failure:

  C:\Buildbot\Slave\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\lib\CodeGen\MachineInstr.cpp(762):
  error C2338: must be trivially copyable to memmove

Modified:
    llvm/trunk/lib/CodeGen/MachineInstr.cpp

Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=264516&r1=264515&r2=264516&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Sat Mar 26 13:20:02 2016
@@ -38,7 +38,6 @@
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/type_traits.h"
 #include "llvm/Target/TargetInstrInfo.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/TargetRegisterInfo.h"
@@ -758,8 +757,7 @@ static void moveOperands(MachineOperand
   if (MRI)
     return MRI->moveOperands(Dst, Src, NumOps);
 
-  static_assert(isPodLike<MachineOperand>::value,
-                "must be trivially copyable to memmove");
+  // MachineOperand is a trivially copyable type so we can just use memmove.
   std::memmove(Dst, Src, NumOps * sizeof(MachineOperand));
 }
 




More information about the llvm-commits mailing list