Skip to content

Commit a0248b7

Browse files
committed
Don't make stdout absolute
1 parent c394fb8 commit a0248b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/Index/IndexUnitWriter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ IndexUnitWriter::IndexUnitWriter(FileManager &FileMgr,
150150
this->ProviderIdentifier = std::string(ProviderIdentifier);
151151
this->ProviderVersion = std::string(ProviderVersion);
152152
SmallString<256> AbsOutputFile(OutputFile);
153-
FileMgr.makeAbsolutePath(AbsOutputFile);
153+
if (OutputFile != "-") // Can't make stdout absolute, should stay as "-".
154+
FileMgr.makeAbsolutePath(AbsOutputFile);
154155
this->OutputFile = std::string(AbsOutputFile.str());
155156
this->ModuleName = std::string(ModuleName);
156157
this->MainFile = MainFile;

0 commit comments

Comments
 (0)