summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerge Guelton <sguelton@redhat.com>2019-09-19 00:54:40 +0000
committerSerge Guelton <sguelton@redhat.com>2019-09-19 00:54:40 +0000
commita1445cd0340006d7635101c4c2b27ae51328642c (patch)
tree6ba5868e1b697d4c41cb9ffd9b57857163295193
parent61892451b9351427f6107e91902c1d83ec60487c (diff)
downloadclang-a1445cd0340006d7635101c4c2b27ae51328642c.tar.gz
Initialize all fields in ABIArgInfo.
Due to usage of an uninitialized fields, we end up with a Conditional jump or move depends on uninitialised value Fixes https://bugs.llvm.org/show_bug.cgi?id=40547 Commited on behalf of Martin Liska <mliska@suse.cz> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372281 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/CodeGen/CGFunctionInfo.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/clang/CodeGen/CGFunctionInfo.h b/include/clang/CodeGen/CGFunctionInfo.h
index 1f81072e23..5069d9af42 100644
--- a/include/clang/CodeGen/CGFunctionInfo.h
+++ b/include/clang/CodeGen/CGFunctionInfo.h
@@ -109,14 +109,12 @@ private:
UnpaddedCoerceAndExpandType = T;
}
- ABIArgInfo(Kind K)
- : TheKind(K), PaddingInReg(false), InReg(false) {
- }
-
public:
- ABIArgInfo()
+ ABIArgInfo(Kind K = Direct)
: TypeData(nullptr), PaddingType(nullptr), DirectOffset(0),
- TheKind(Direct), PaddingInReg(false), InReg(false) {}
+ TheKind(K), PaddingInReg(false), InAllocaSRet(false),
+ IndirectByVal(false), IndirectRealign(false), SRetAfterThis(false),
+ InReg(false), CanBeFlattened(false), SignExt(false) {}
static ABIArgInfo getDirect(llvm::Type *T = nullptr, unsigned Offset = 0,
llvm::Type *Padding = nullptr,