projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2476373
)
moveOperands - assert Src/Dst MachineOperands are non-null.
author
Simon Pilgrim
<llvm-dev@redking.me.uk>
Sat, 11 Jan 2020 14:36:46 +0000
(14:36 +0000)
committer
Simon Pilgrim
<llvm-dev@redking.me.uk>
Sat, 11 Jan 2020 14:37:19 +0000
(14:37 +0000)
Fixes static-analyzer warnings.
llvm/lib/CodeGen/MachineInstr.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/CodeGen/MachineInstr.cpp
b/llvm/lib/CodeGen/MachineInstr.cpp
index
c8e3e5b
..
08d786f
100644
(file)
--- a/
llvm/lib/CodeGen/MachineInstr.cpp
+++ b/
llvm/lib/CodeGen/MachineInstr.cpp
@@
-187,8
+187,8
@@
static void moveOperands(MachineOperand *Dst, MachineOperand *Src,
unsigned NumOps, MachineRegisterInfo *MRI) {
if (MRI)
return MRI->moveOperands(Dst, Src, NumOps);
-
// MachineOperand is a trivially copyable type so we can just use memmove.
+ assert(Dst && Src && "Unknown operands");
std::memmove(Dst, Src, NumOps * sizeof(MachineOperand));
}