projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65b2f40
)
Leak fix: delete old objects before reallocation in an assignment operator!
author
Vikram S. Adve
<vadve@cs.uiuc.edu>
Wed, 2 Jul 2003 01:25:44 +0000
(
01:25
+0000)
committer
Vikram S. Adve
<vadve@cs.uiuc.edu>
Wed, 2 Jul 2003 01:25:44 +0000
(
01:25
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7055
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/CodeGen/MachineInstr.h
patch
|
blob
|
history
diff --git
a/include/llvm/CodeGen/MachineInstr.h
b/include/llvm/CodeGen/MachineInstr.h
index 721b513c747d0d5b4bd6d0186ae9e7ca459a569e..9bc59f3ff4137fcfeb0f7ad38ec4f56cd5dd3101 100644
(file)
--- a/
include/llvm/CodeGen/MachineInstr.h
+++ b/
include/llvm/CodeGen/MachineInstr.h
@@
-190,6
+190,8
@@
public:
}
const MachineOperand &operator=(const MachineOperand &MO) {
+ if (isExternalSymbol()) // if old operand had a symbol name,
+ delete SymbolName; // release old memory
immedVal = MO.immedVal;
flags = MO.flags;
opType = MO.opType;