https://github.com/david-salinas updated 
https://github.com/llvm/llvm-project/pull/169551

>From 6bfbc089ad15e794249703bef3449e01c15e6ff8 Mon Sep 17 00:00:00 2001
From: david-salinas <[email protected]>
Date: Tue, 25 Nov 2025 19:02:20 +0000
Subject: [PATCH 1/2] hipcc/ld.lld unable to link separable compilation when
 dynamic library is fully specified

---
 clang/lib/Driver/ToolChains/HIPUtility.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/clang/lib/Driver/ToolChains/HIPUtility.cpp 
b/clang/lib/Driver/ToolChains/HIPUtility.cpp
index 1af2ae6470f1e..82d84dac9a907 100644
--- a/clang/lib/Driver/ToolChains/HIPUtility.cpp
+++ b/clang/lib/Driver/ToolChains/HIPUtility.cpp
@@ -241,15 +241,16 @@ class HIPUndefinedFatBinSymbols {
 
       bool isUndefined =
           FlagOrErr.get() & llvm::object::SymbolRef::SF_Undefined;
+      bool isHidden = FlagOrErr.get() & llvm::object::SymbolRef::SF_Hidden;
       bool isFatBinSymbol = Name.starts_with(FatBinPrefix);
       bool isGPUBinHandleSymbol = Name.starts_with(GPUBinHandlePrefix);
 
       // Handling for defined symbols
       if (!isUndefined) {
-        if (isFatBinSymbol) {
+        if ((isFatBinSymbol) && (!isHidden)) {
           DefinedFatBinSymbols.insert(Name.str());
           FatBinSymbols.erase(Name.str());
-        } else if (isGPUBinHandleSymbol) {
+        } else if ((isGPUBinHandleSymbol) && (!isHidden)) {
           DefinedGPUBinHandleSymbols.insert(Name.str());
           GPUBinHandleSymbols.erase(Name.str());
         }

>From a49c2854834c1ac1add67b6d8981073040347558 Mon Sep 17 00:00:00 2001
From: david-salinas <[email protected]>
Date: Wed, 26 Nov 2025 19:19:31 +0000
Subject: [PATCH 2/2] remove redundant parenthesis

---
 clang/lib/Driver/ToolChains/HIPUtility.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/lib/Driver/ToolChains/HIPUtility.cpp 
b/clang/lib/Driver/ToolChains/HIPUtility.cpp
index 82d84dac9a907..8e95d37cb63c1 100644
--- a/clang/lib/Driver/ToolChains/HIPUtility.cpp
+++ b/clang/lib/Driver/ToolChains/HIPUtility.cpp
@@ -247,10 +247,10 @@ class HIPUndefinedFatBinSymbols {
 
       // Handling for defined symbols
       if (!isUndefined) {
-        if ((isFatBinSymbol) && (!isHidden)) {
+        if (isFatBinSymbol && !isHidden) {
           DefinedFatBinSymbols.insert(Name.str());
           FatBinSymbols.erase(Name.str());
-        } else if ((isGPUBinHandleSymbol) && (!isHidden)) {
+        } else if (isGPUBinHandleSymbol && !isHidden) {
           DefinedGPUBinHandleSymbols.insert(Name.str());
           GPUBinHandleSymbols.erase(Name.str());
         }

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to