Skip to content

Conversation

@slydiman
Copy link
Contributor

This change is necessary to build BOLT with MSVC on Windows.

This change is necessary to build BOLT with MSVC on Windows.
@llvmbot
Copy link
Member

llvmbot commented Jul 29, 2025

@llvm/pr-subscribers-bolt

Author: Dmitry Vasilyev (slydiman)

Changes

This change is necessary to build BOLT with MSVC on Windows.


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

1 Files Affected:

  • (modified) bolt/lib/Core/Relocation.cpp (+4-4)
diff --git a/bolt/lib/Core/Relocation.cpp b/bolt/lib/Core/Relocation.cpp
index f099dfa46f3d4..f882627222242 100644
--- a/bolt/lib/Core/Relocation.cpp
+++ b/bolt/lib/Core/Relocation.cpp
@@ -1018,7 +1018,7 @@ void Relocation::print(raw_ostream &OS) const {
     OS << "RType:" << Twine::utohexstr(Type);
     break;
 
-  case Triple::aarch64:
+  case Triple::aarch64: {
     static const char *const AArch64RelocNames[] = {
 #define ELF_RELOC(name, value) #name,
 #include "llvm/BinaryFormat/ELFRelocs/AArch64.def"
@@ -1026,7 +1026,7 @@ void Relocation::print(raw_ostream &OS) const {
     };
     assert(Type < ArrayRef(AArch64RelocNames).size());
     OS << AArch64RelocNames[Type];
-    break;
+  } break;
 
   case Triple::riscv64:
     // RISC-V relocations are not sequentially numbered so we cannot use an
@@ -1043,7 +1043,7 @@ void Relocation::print(raw_ostream &OS) const {
     }
     break;
 
-  case Triple::x86_64:
+  case Triple::x86_64: {
     static const char *const X86RelocNames[] = {
 #define ELF_RELOC(name, value) #name,
 #include "llvm/BinaryFormat/ELFRelocs/x86_64.def"
@@ -1051,7 +1051,7 @@ void Relocation::print(raw_ostream &OS) const {
     };
     assert(Type < ArrayRef(X86RelocNames).size());
     OS << X86RelocNames[Type];
-    break;
+  } break;
   }
   OS << ", 0x" << Twine::utohexstr(Offset);
   if (Symbol) {

@slydiman slydiman merged commit 497d177 into llvm:main Jul 30, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants