[Mlir-commits] [mlir] [MLIR][LLVM] Fuse Scope into CallsiteLoc Callee (PR #74546)

Christian Ulmann llvmlistbot at llvm.org
Tue Dec 5 22:49:27 PST 2023


================
@@ -330,7 +330,9 @@ llvm::DILocation *DebugTranslation::translateLoc(Location loc,
   if (auto callLoc = dyn_cast<CallSiteLoc>(loc)) {
     // For callsites, the caller is fed as the inlinedAt for the callee.
     auto *callerLoc = translateLoc(callLoc.getCaller(), scope, inlinedAt);
-    llvmLoc = translateLoc(callLoc.getCallee(), scope, callerLoc);
+    llvmLoc = translateLoc(callLoc.getCallee(), nullptr, callerLoc);
+    if (!llvmLoc)
+      return callerLoc; // Fallback: Ignore callee if it has no debug scope.
----------------
Dinistro wrote:

Shouldn't we also add this to the cache, as we would do for the `llvmLoc` later on? 

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


More information about the Mlir-commits mailing list