[Mlir-commits] [mlir] [mlir][llvm] Handle debug record import edge cases (PR #168774)

Henrich Lauko llvmlistbot at llvm.org
Thu Nov 20 08:00:22 PST 2025


================
@@ -3171,26 +3196,26 @@ ModuleImport::processDebugIntrinsic(llvm::DbgVariableIntrinsic *dbgIntr,
   return success();
 }
 
-LogicalResult ModuleImport::processDebugRecord(llvm::DbgRecord &debugRecord,
-                                               DominanceInfo &domInfo) {
-  Location loc = translateLoc(debugRecord.getDebugLoc());
-  auto emitUnsupportedWarning = [&]() {
-    if (!emitExpensiveWarnings)
-      return success();
-    std::string options;
-    llvm::raw_string_ostream optionsStream(options);
-    debugRecord.print(optionsStream);
-    emitWarning(loc) << "unhandled debug record " << optionsStream.str();
+LogicalResult
+ModuleImport::emitUnsupportedDebugRecordWarning(llvm::DbgRecord &debugRecord,
----------------
xlauko wrote:

Does this need to be method? Also it is a bit inconsistent with:
`emitUnsupportedWarning` which is inline lambda.

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


More information about the Mlir-commits mailing list