[llvm] [BOLT] Minor code refactoring. NFC (PR #170746)

Maksim Panchenko via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 4 13:17:33 PST 2025


https://github.com/maksfb created https://github.com/llvm/llvm-project/pull/170746

None

>From d51d752b034626000e85a3fe3215876ff9392af5 Mon Sep 17 00:00:00 2001
From: Maksim Panchenko <maks at fb.com>
Date: Thu, 4 Dec 2025 13:16:25 -0800
Subject: [PATCH] [BOLT] Minor code refactoring. NFC

---
 bolt/lib/Core/BinaryFunction.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/bolt/lib/Core/BinaryFunction.cpp b/bolt/lib/Core/BinaryFunction.cpp
index a5fdf79a737f5..8ec312e8bf01d 100644
--- a/bolt/lib/Core/BinaryFunction.cpp
+++ b/bolt/lib/Core/BinaryFunction.cpp
@@ -1408,9 +1408,7 @@ Error BinaryFunction::disassemble() {
           // A recursive call. Calls to internal blocks are handled by
           // ValidateInternalCalls pass.
           TargetSymbol = getSymbol();
-        }
-
-        if (!TargetSymbol) {
+        } else {
           // Create either local label or external symbol.
           if (containsAddress(TargetAddress)) {
             TargetSymbol = getOrCreateLocalLabel(TargetAddress);



More information about the llvm-commits mailing list