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

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


Author: Valentin Clement (バレンタイン クレメン)
Date: 2025-01-22T13:09:56-08:00
New Revision: c6e7b4a61ab8718d9ac9d1d32f7d2d0cd0b19a7f

URL: https://github.com/llvm/llvm-project/commit/c6e7b4a61ab8718d9ac9d1d32f7d2d0cd0b19a7f
DIFF: https://github.com/llvm/llvm-project/commit/c6e7b4a61ab8718d9ac9d1d32f7d2d0cd0b19a7f.diff

LOG: [flang][cuda][NFC] Add kernel name in translation error (#123987)

Added: 
    

Modified: 
    flang/lib/Optimizer/Dialect/CUF/CUFToLLVMIRTranslation.cpp

Removed: 
    


################################################################################
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(),


        


More information about the flang-commits mailing list