parent
b5cbf77c2e
commit
2d925ebd0a
|
@ -1388,8 +1388,13 @@ PCHReader::PCHReadResult PCHReader::ReadPCH(const std::string &FileName) {
|
||||||
this->FileName = FileName;
|
this->FileName = FileName;
|
||||||
|
|
||||||
// Open the PCH file.
|
// Open the PCH file.
|
||||||
|
//
|
||||||
|
// FIXME: This shouldn't be here, we should just take a raw_ostream.
|
||||||
std::string ErrStr;
|
std::string ErrStr;
|
||||||
Buffer.reset(llvm::MemoryBuffer::getFile(FileName.c_str(), &ErrStr));
|
if (FileName == "-")
|
||||||
|
Buffer.reset(llvm::MemoryBuffer::getSTDIN());
|
||||||
|
else
|
||||||
|
Buffer.reset(llvm::MemoryBuffer::getFile(FileName.c_str(), &ErrStr));
|
||||||
if (!Buffer) {
|
if (!Buffer) {
|
||||||
Error(ErrStr.c_str());
|
Error(ErrStr.c_str());
|
||||||
return IgnorePCH;
|
return IgnorePCH;
|
||||||
|
|
Loading…
Reference in New Issue