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:
466678b
)
[CodeGen] Disable default copy assignment operator for struct VectorInfo
author
Bing1 Yu
<bing1.yu@intel.com>
Wed, 7 Jun 2023 06:32:36 +0000
(14:32 +0800)
committer
Bing1 Yu
<bing1.yu@intel.com>
Wed, 7 Jun 2023 06:32:56 +0000
(14:32 +0800)
struct VectorInfo manages resources such as dynamically allocated memory, it's generally a good practice to either implement a custom copy constructor or disable the default one
Reviewed By: kazu
Differential Revision: https://reviews.llvm.org/D152230
llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
b/llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
index
4154cd8
..
d0ad6e4
100644
(file)
--- a/
llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
+++ b/
llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
@@
-678,6
+678,8
@@
public:
EI = new ElementInfo[VTy->getNumElements()];
}
+ VectorInfo &operator=(const VectorInfo &other) = delete;
+
virtual ~VectorInfo() { delete[] EI; }
unsigned getDimension() const { return VTy->getNumElements(); }