[llvm] [BOLT] Fix setHasSymbolsWithFileName (PR #92625)

Amir Ayupov via llvm-commits llvm-commits at lists.llvm.org
Fri May 17 18:37:18 PDT 2024


https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/92625

The function is used to ignore the parameter and set
`HasSymbolsWithFileName` unconditionally.


>From 808b169ced4c201445d45953a8c46d379ae197e4 Mon Sep 17 00:00:00 2001
From: Amir Ayupov <aaupov at fb.com>
Date: Fri, 17 May 2024 16:45:58 -0700
Subject: [PATCH] [BOLT] Fix setHasSymbolsWithFileName

The function is used to ignore the parameter and set
`HasSymbolsWithFileName` unconditionally.
---
 bolt/include/bolt/Core/BinaryContext.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bolt/include/bolt/Core/BinaryContext.h b/bolt/include/bolt/Core/BinaryContext.h
index 75765819ac464..792c09dd7c467 100644
--- a/bolt/include/bolt/Core/BinaryContext.h
+++ b/bolt/include/bolt/Core/BinaryContext.h
@@ -359,7 +359,7 @@ class BinaryContext {
   void setFileBuildID(StringRef ID) { FileBuildID = std::string(ID); }
 
   bool hasSymbolsWithFileName() const { return HasSymbolsWithFileName; }
-  void setHasSymbolsWithFileName(bool Value) { HasSymbolsWithFileName = true; }
+  void setHasSymbolsWithFileName(bool Value) { HasSymbolsWithFileName = Value; }
 
   /// Return true if relocations against symbol with a given name
   /// must be created.



More information about the llvm-commits mailing list