forked from OSchip/llvm-project
parent
b5cbf77c2e
commit
2d925ebd0a
|
@ -1388,8 +1388,13 @@ PCHReader::PCHReadResult PCHReader::ReadPCH(const std::string &FileName) {
|
|||
this->FileName = FileName;
|
||||
|
||||
// Open the PCH file.
|
||||
//
|
||||
// FIXME: This shouldn't be here, we should just take a raw_ostream.
|
||||
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) {
|
||||
Error(ErrStr.c_str());
|
||||
return IgnorePCH;
|
||||
|
|
Loading…
Reference in New Issue