[llvm] [WIP-LTO] Print conflicting operands between Src and Dest modules (PR #115104)

via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 6 10:51:33 PST 2024


https://github.com/hiraditya updated https://github.com/llvm/llvm-project/pull/115104

>From 26191e9886f17616d35ba0fa196d841d632e53bb Mon Sep 17 00:00:00 2001
From: AdityaK <hiraditya at msn.com>
Date: Tue, 5 Nov 2024 17:13:23 -0800
Subject: [PATCH] Print conflicting operands between Src and Dest modules

---
 llvm/lib/Linker/IRMover.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/llvm/lib/Linker/IRMover.cpp b/llvm/lib/Linker/IRMover.cpp
index 7a5aa0c8047821..570e4d93f3248d 100644
--- a/llvm/lib/Linker/IRMover.cpp
+++ b/llvm/lib/Linker/IRMover.cpp
@@ -1442,9 +1442,10 @@ Error IRLinker::linkModuleFlagsMetadata() {
       // Emit an error if the values differ.
       if (SrcOp->getOperand(2) != DstOp->getOperand(2))
         return stringErr("linking module flags '" + ID->getString() +
-                         "': IDs have conflicting values in '" +
-                         SrcM->getModuleIdentifier() + "' and '" +
-                         DstM.getModuleIdentifier() + "'");
+                 "': IDs have conflicting values: '" + *SrcOp->getOperand(2) +
+                 "' from " + SrcM->getModuleIdentifier() + ", and '" +
+                 *DstOp->getOperand(2) << "' from " 
+                 DstM.getModuleIdentifier());
       continue;
     }
     case Module::Warning: {



More information about the llvm-commits mailing list