llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-transforms

Author: Mircea Trofin (mtrofin)

<details>
<summary>Changes</summary>

`CfiFunctions` contains only pointers to IR objects in the original `Module`. 
When we `promoteInternals`, we try to find such pointers from the first 
(exporting) module in the `CfiFunctions` set. That will always fail in the 
first case, when the exporting module is the merged module. This PR makes it 
more obvious that the `CfiFunctions` set is only relevant for the second 
promotion.

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


1 Files Affected:

- (modified) llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp (+1-1) 


``````````diff
diff --git a/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp 
b/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
index d1dc8164d1b46..60c65bd8bbf48 100644
--- a/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
+++ b/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
@@ -411,7 +411,7 @@ void splitAndWriteThinLTOBitcode(
     return true;
   });
 
-  promoteInternals(*MergedM, M, ModuleId, CfiFunctions);
+  promoteInternals(*MergedM, M, ModuleId, {});
   promoteInternals(M, *MergedM, ModuleId, CfiFunctions);
 
   auto &Ctx = MergedM->getContext();

``````````

</details>


https://github.com/llvm/llvm-project/pull/181080
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to