Skip to content

Commit a98e830

Browse files
[Profile] Update swift after LLVM API update
Related to rdar://102581439
1 parent c2f7452 commit a98e830

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/SILGen/SILGen.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ SILGenModule::SILGenModule(SILModule &M, ModuleDecl *SM)
5555
FileIDsByFilePath(SM->computeFileIDMap(/*shouldDiagnose=*/true)) {
5656
const SILOptions &Opts = M.getOptions();
5757
if (!Opts.UseProfile.empty()) {
58-
auto ReaderOrErr = llvm::IndexedInstrProfReader::create(Opts.UseProfile);
58+
// FIXME: Create file system to read the profile. In the future, the vfs
59+
// needs to come from CompilerInstance.
60+
auto FS = llvm::vfs::getRealFileSystem();
61+
auto ReaderOrErr =
62+
llvm::IndexedInstrProfReader::create(Opts.UseProfile, *FS);
5963
if (auto E = ReaderOrErr.takeError()) {
6064
diagnose(SourceLoc(), diag::profile_read_error, Opts.UseProfile,
6165
llvm::toString(std::move(E)));

0 commit comments

Comments
 (0)