File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -829,17 +829,7 @@ class Instrumenter : InstrumenterBase {
829
829
LoggerRef->setImplicit (true );
830
830
831
831
if (ExtendedCallbacks) {
832
- auto SourceLocBufferId = Context.SourceMgr .findBufferContainingLoc (SR.Start );
833
- StringRef filePath;
834
-
835
- // Use #sourceLocation if it exists.
836
- SourceLoc sl = SR.Start ;
837
- auto *vf = Context.SourceMgr .getVirtualFile (sl);
838
- if (vf) {
839
- filePath = StringRef (vf->Name );
840
- } else {
841
- filePath = Context.SourceMgr .getIdentifierForBuffer (SourceLocBufferId);
842
- }
832
+ StringRef filePath = Context.SourceMgr .getDisplayNameForLoc (SR.Start );
843
833
844
834
Expr *FilePathExpr = new (Context) StringLiteralExpr (
845
835
Context.AllocateCopy (filePath), SourceRange (), /* implicit=*/ true );
You can’t perform that action at this time.
0 commit comments