diff options
author | Serge Guelton <sguelton@redhat.com> | 2019-09-19 00:54:40 +0000 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2019-11-27 11:28:33 -0800 |
commit | 7fc9f129f80f192bd5ed73e9b94ffc59803c17fc (patch) | |
tree | a617e36acfafb0ef760a782eaad2cbcf23894860 | |
parent | 28f6aac1c102f7d8ba8afce900079e42e67bedca (diff) | |
download | llvm-7fc9f129f80f192bd5ed73e9b94ffc59803c17fc.zip llvm-7fc9f129f80f192bd5ed73e9b94ffc59803c17fc.tar.gz llvm-7fc9f129f80f192bd5ed73e9b94ffc59803c17fc.tar.bz2 |
Merging r372281:
------------------------------------------------------------------------
r372281 | serge_sans_paille | 2019-09-18 17:54:40 -0700 (Wed, 18 Sep 2019) | 8 lines
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>
------------------------------------------------------------------------
-rw-r--r-- | clang/include/clang/CodeGen/CGFunctionInfo.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/include/clang/CodeGen/CGFunctionInfo.h b/clang/include/clang/CodeGen/CGFunctionInfo.h index 1f81072..5069d9a 100644 --- a/clang/include/clang/CodeGen/CGFunctionInfo.h +++ b/clang/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, |