clang/0001-Fix-uninitialized-value-in-ABIArgInfo.patch

38 lines
1.4 KiB
Diff
Raw Normal View History

2019-08-07 16:22:09 +00:00
From bae24f2020f7dc9db372c7e3f38d77fc5fa320d0 Mon Sep 17 00:00:00 2001
2019-02-01 06:43:22 +00:00
From: serge-sans-paille <sguelton@redhat.com>
Date: Fri, 1 Feb 2019 06:39:13 +0000
Subject: [PATCH] Fix uninitialized value in ABIArgInfo
GCC-9 takes advantage of this uninitialized values to optimize stuff,
which ends up in failing validation when compiling clang.
---
2019-08-07 16:22:09 +00:00
clang/include/clang/CodeGen/CGFunctionInfo.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
2019-02-01 06:43:22 +00:00
2019-08-07 16:22:09 +00:00
diff --git a/clang/include/clang/CodeGen/CGFunctionInfo.h b/clang/include/clang/CodeGen/CGFunctionInfo.h
index 1f81072..caf7105 100644
--- a/clang/include/clang/CodeGen/CGFunctionInfo.h
+++ b/clang/include/clang/CodeGen/CGFunctionInfo.h
@@ -110,13 +110,13 @@ private:
2019-02-01 06:43:22 +00:00
}
ABIArgInfo(Kind K)
2019-08-07 16:22:09 +00:00
- : TheKind(K), PaddingInReg(false), InReg(false) {
2019-02-01 06:43:22 +00:00
- }
+ : TypeData(nullptr), PaddingType(nullptr), DirectOffset(0),
+ TheKind(K), PaddingInReg(false), InAllocaSRet(false), IndirectByVal(false),
+ IndirectRealign(false), SRetAfterThis(false), InReg(false),
2019-08-07 16:22:09 +00:00
+ CanBeFlattened(false), SignExt(false) {}
2019-02-01 06:43:22 +00:00
public:
- ABIArgInfo()
- : TypeData(nullptr), PaddingType(nullptr), DirectOffset(0),
2019-08-07 16:22:09 +00:00
- TheKind(Direct), PaddingInReg(false), InReg(false) {}
2019-02-01 06:43:22 +00:00
+ ABIArgInfo() : ABIArgInfo(Direct) {}
static ABIArgInfo getDirect(llvm::Type *T = nullptr, unsigned Offset = 0,
llvm::Type *Padding = nullptr,
--
2019-08-07 16:22:09 +00:00
1.8.3.1
2019-02-01 06:43:22 +00:00