Skip to content

Commit c6e1119

Browse files
jansvoboda11mahesh-attarde
authored andcommitted
[clang] Use the VFS to get the OpenMP entry info (llvm#160935)
This PR uses the VFS to get the OpenMP entry info instead of going straight to the real file system. This matches the behavior of other input files of the compiler.
1 parent ef64a9d commit c6e1119

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clang/lib/CodeGen/CGOpenMPRuntime.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,10 +1542,8 @@ static llvm::TargetRegionEntryInfo getEntryInfoFromPresumedLoc(
15421542
SourceManager &SM = CGM.getContext().getSourceManager();
15431543
PresumedLoc PLoc = SM.getPresumedLoc(BeginLoc);
15441544

1545-
llvm::sys::fs::UniqueID ID;
1546-
if (llvm::sys::fs::getUniqueID(PLoc.getFilename(), ID)) {
1545+
if (CGM.getFileSystem()->exists(PLoc.getFilename()))
15471546
PLoc = SM.getPresumedLoc(BeginLoc, /*UseLineDirectives=*/false);
1548-
}
15491547

15501548
return std::pair<std::string, uint64_t>(PLoc.getFilename(), PLoc.getLine());
15511549
};

0 commit comments

Comments
 (0)