Skip to content

Commit 158b2ae

Browse files
committed
[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 08b0356 commit 158b2ae

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
@@ -1539,10 +1539,8 @@ static llvm::TargetRegionEntryInfo getEntryInfoFromPresumedLoc(
15391539
SourceManager &SM = CGM.getContext().getSourceManager();
15401540
PresumedLoc PLoc = SM.getPresumedLoc(BeginLoc);
15411541

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

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

0 commit comments

Comments
 (0)