[llvm] [YAML] Init local variable which is not set by all branches (PR #123137)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 15 15:12:07 PST 2025
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/123137
None
>From 51bb68829ae7d671978e6b2f05722de171f8152c Mon Sep 17 00:00:00 2001
From: Vitaly Buka <vitalybuka at google.com>
Date: Wed, 15 Jan 2025 15:11:52 -0800
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
=?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Created using spr 1.3.4
---
llvm/lib/ObjectYAML/ELFYAML.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/ObjectYAML/ELFYAML.cpp b/llvm/lib/ObjectYAML/ELFYAML.cpp
index 7e94d01a9715348..83e6cf76dd746fb 100644
--- a/llvm/lib/ObjectYAML/ELFYAML.cpp
+++ b/llvm/lib/ObjectYAML/ELFYAML.cpp
@@ -1588,7 +1588,7 @@ static bool isInteger(StringRef Val) {
void MappingTraits<std::unique_ptr<ELFYAML::Chunk>>::mapping(
IO &IO, std::unique_ptr<ELFYAML::Chunk> &Section) {
- ELFYAML::ELF_SHT Type;
+ ELFYAML::ELF_SHT Type = ELF::ET_NONE;
StringRef TypeStr;
if (IO.outputting()) {
if (auto *S = dyn_cast<ELFYAML::Section>(Section.get()))
More information about the llvm-commits
mailing list