Index: llvm/trunk/lib/CodeGen/MachineInstr.cpp =================================================================== --- llvm/trunk/lib/CodeGen/MachineInstr.cpp +++ llvm/trunk/lib/CodeGen/MachineInstr.cpp @@ -38,6 +38,7 @@ #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" @@ -757,7 +758,8 @@ if (MRI) return MRI->moveOperands(Dst, Src, NumOps); - // MachineOperand is a trivially copyable type so we can just use memmove. + static_assert(isPodLike::value, + "must be trivially copyable to memmove"); std::memmove(Dst, Src, NumOps * sizeof(MachineOperand)); }