summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/ConstantsContext.h
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-09-25 13:38:54 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-09-25 13:38:54 +0000
commit367df1ebbc9e2a9d7922cf81630552dcd0323734 (patch)
treeda4a40b9222010670307b6297c38a9f6e5ba9f8e /llvm/lib/IR/ConstantsContext.h
parent148fd9f9c16ab8220649f90eb420631149015d54 (diff)
downloadbcm5719-llvm-367df1ebbc9e2a9d7922cf81630552dcd0323734.tar.gz
bcm5719-llvm-367df1ebbc9e2a9d7922cf81630552dcd0323734.zip
Add missing ExplicitTy default initialization to ConstantExprKeyType constructors.
Fixes cppcheck uninitialized variable warnings llvm-svn: 372871
Diffstat (limited to 'llvm/lib/IR/ConstantsContext.h')
-rw-r--r--llvm/lib/IR/ConstantsContext.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/IR/ConstantsContext.h b/llvm/lib/IR/ConstantsContext.h
index 7614dab9f15..75c6f83d59f 100644
--- a/llvm/lib/IR/ConstantsContext.h
+++ b/llvm/lib/IR/ConstantsContext.h
@@ -480,14 +480,16 @@ struct ConstantExprKeyType {
: Opcode(CE->getOpcode()),
SubclassOptionalData(CE->getRawSubclassOptionalData()),
SubclassData(CE->isCompare() ? CE->getPredicate() : 0), Ops(Operands),
- Indexes(CE->hasIndices() ? CE->getIndices() : ArrayRef<unsigned>()) {}
+ Indexes(CE->hasIndices() ? CE->getIndices() : ArrayRef<unsigned>()),
+ ExplicitTy(nullptr) {}
ConstantExprKeyType(const ConstantExpr *CE,
SmallVectorImpl<Constant *> &Storage)
: Opcode(CE->getOpcode()),
SubclassOptionalData(CE->getRawSubclassOptionalData()),
SubclassData(CE->isCompare() ? CE->getPredicate() : 0),
- Indexes(CE->hasIndices() ? CE->getIndices() : ArrayRef<unsigned>()) {
+ Indexes(CE->hasIndices() ? CE->getIndices() : ArrayRef<unsigned>()),
+ ExplicitTy(nullptr) {
assert(Storage.empty() && "Expected empty storage");
for (unsigned I = 0, E = CE->getNumOperands(); I != E; ++I)
Storage.push_back(CE->getOperand(I));
OpenPOWER on IntegriCloud