[flang-commits] [flang] [flang][cuda][NFC] Add kernel name in translation error (PR #123987)

via flang-commits flang-commits at lists.llvm.org
Wed Jan 22 11:14:00 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-flang-fir-hlfir

Author: Valentin Clement (バレンタイン クレメン) (clementval)

<details>
<summary>Changes</summary>



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


1 Files Affected:

- (modified) flang/lib/Optimizer/Dialect/CUF/CUFToLLVMIRTranslation.cpp (+2-1) 


``````````diff
diff --git a/flang/lib/Optimizer/Dialect/CUF/CUFToLLVMIRTranslation.cpp b/flang/lib/Optimizer/Dialect/CUF/CUFToLLVMIRTranslation.cpp
index 0c1424d11b515c..7ed7f355959683 100644
--- a/flang/lib/Optimizer/Dialect/CUF/CUFToLLVMIRTranslation.cpp
+++ b/flang/lib/Optimizer/Dialect/CUF/CUFToLLVMIRTranslation.cpp
@@ -71,7 +71,8 @@ LogicalResult registerKernel(cuf::RegisterKernelOp op,
   llvm::Function *fctSym =
       moduleTranslation.lookupFunction(op.getKernelName().str());
   if (!fctSym)
-    return op.emitError() << "Couldn't find kernel name symbol";
+    return op.emitError() << "Couldn't find kernel name symbol: "
+                          << op.getKernelName().str();
   builder.CreateCall(fct, {modulePtr, fctSym,
                            getOrCreateFunctionName(
                                module, builder, op.getKernelModuleName().str(),

``````````

</details>


https://github.com/llvm/llvm-project/pull/123987


More information about the flang-commits mailing list