summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorJF Bastien <jfb@google.com>2016-03-26 18:14:27 +0000
committerJF Bastien <jfb@google.com>2016-03-26 18:14:27 +0000
commitd4ff3360ae972da790834818b6b63f54037334d4 (patch)
tree3148e1ce09d6cc7ddd2968b97cac42160e6e61ce /llvm/lib/CodeGen/MachineInstr.cpp
parent6462d8c1d91052aff56c60939e48564af9084ea6 (diff)
downloadbcm5719-llvm-d4ff3360ae972da790834818b6b63f54037334d4.tar.gz
bcm5719-llvm-d4ff3360ae972da790834818b6b63f54037334d4.zip
NFC: static_assert instead of comment
Summary: isPodLike is as close as we have for is_trivially_copyable. Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18483 llvm-svn: 264515
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index bc99a069192..99646d96196 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/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 @@ static void moveOperands(MachineOperand *Dst, MachineOperand *Src,
if (MRI)
return MRI->moveOperands(Dst, Src, NumOps);
- // MachineOperand is a trivially copyable type so we can just use memmove.
+ static_assert(isPodLike<MachineOperand>::value,
+ "must be trivially copyable to memmove");
std::memmove(Dst, Src, NumOps * sizeof(MachineOperand));
}
OpenPOWER on IntegriCloud