================
@@ -4059,8 +4154,16 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked,
     auto Call = TrapBB->begin();
     assert(isa<llvm::CallInst>(Call) && "Expected call in trap BB");
 
-    Call->applyMergedLocation(Call->getDebugLoc(),
-                              Builder.getCurrentDebugLocation());
+    // Call->applyMergedLocation(Call->getDebugLoc(),
+    //                           Builder.getCurrentDebugLocation());
+    Call->applyMergedLocation(Call->getDebugLoc(), TrapLocation);
+
+    auto Unreachable = ++TrapBB->begin();
----------------
delcypher wrote:

Adjusting the debug info on the unreachable instructions is a bug fix in the 
Apple fork of Clang that I never got around to upstreaming. Is this something 
you needed for writing tests?

If this isn't strictly needed I'd suggest dropping this and you can add it as a 
separate patch.

https://github.com/llvm/llvm-project/pull/143758
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to