Skip to content

Conversation

@vitalybuka
Copy link
Collaborator

Reverts #123137

It's a bug according to #123137 (review)

@vitalybuka vitalybuka added skip-precommit-approval PR for CI feedback, not intended for review and removed objectyaml labels Jan 16, 2025
@vitalybuka vitalybuka merged commit 51f6438 into main Jan 16, 2025
7 of 9 checks passed
@vitalybuka vitalybuka deleted the revert-123137-users/vitalybuka/spr/yaml-init-local-variable-which-is-not-set-by-all-branches branch January 16, 2025 20:27
@llvmbot
Copy link
Member

llvmbot commented Jan 16, 2025

@llvm/pr-subscribers-objectyaml

Author: Vitaly Buka (vitalybuka)

Changes

Reverts llvm/llvm-project#123137

It's a bug according to #123137 (review)


Full diff: https://github.com/llvm/llvm-project/pull/123238.diff

1 Files Affected:

  • (modified) llvm/lib/ObjectYAML/ELFYAML.cpp (+1-1)
diff --git a/llvm/lib/ObjectYAML/ELFYAML.cpp b/llvm/lib/ObjectYAML/ELFYAML.cpp
index 83e6cf76dd746f..7e94d01a971534 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 = ELF::ET_NONE;
+  ELFYAML::ELF_SHT Type;
   StringRef TypeStr;
   if (IO.outputting()) {
     if (auto *S = dyn_cast<ELFYAML::Section>(Section.get()))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-precommit-approval PR for CI feedback, not intended for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants