Skip to content

Revert "[YAML] Init local var not set by some branches" #123238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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.

2 participants