================
@@ -6482,7 +6475,11 @@ llvm::DILocation 
*CodeGenFunction::SanitizerAnnotateDebugInfo(
     SanitizerHandler Handler) {
   llvm::DILocation *CheckDebugLoc = Builder.getCurrentDebugLocation();
   auto *DI = getDebugInfo();
-  if (!DI)
+  if (!DI || !CheckDebugLoc)
+    return CheckDebugLoc;
----------------
thurstond wrote:

The performance tradeoff depends on how often the check fails (if CheckDebugLoc 
is rarely null, then adding the check here may slow down codegen overall).

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

Reply via email to