mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-19 04:29:45 +00:00
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264515 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3711520788
commit
fa36fcff16
@ -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));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user