================ @@ -1370,10 +1375,14 @@ llvm::Value *CGOpenMPRuntime::emitUpdateLocation(CodeGenFunction &CGF, SrcLocStr = OMPBuilder.getOrCreateDefaultSrcLocStr(SrcLocStrSize); } else { std::string FunctionName; + std::string FileName; if (const auto *FD = dyn_cast_or_null<FunctionDecl>(CGF.CurFuncDecl)) FunctionName = FD->getQualifiedNameAsString(); PresumedLoc PLoc = CGF.getContext().getSourceManager().getPresumedLoc(Loc); - const char *FileName = PLoc.getFilename(); + if (CGF.getDebugInfo()) ---------------- dankm wrote:
I'm *fairly* sure that this check is redundant, because in this branch debug info should be available, but an extra null check seems safer than randomly crashing. I considered replacing this with an assert and running it through clang's test suite, but my machine is rather slow :/ https://github.com/llvm/llvm-project/pull/141250 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits