[cfe-commits] r86632 - /cfe/trunk/lib/Frontend/PCHReader.cpp
Daniel Dunbar
daniel at zuster.org
Mon Nov 9 16:46:20 PST 2009
Author: ddunbar
Date: Mon Nov 9 18:46:19 2009
New Revision: 86632
URL: http://llvm.org/viewvc/llvm-project?rev=86632&view=rev
Log:
Switch to getFileOrSTDIN().
Modified:
cfe/trunk/lib/Frontend/PCHReader.cpp
Modified: cfe/trunk/lib/Frontend/PCHReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReader.cpp?rev=86632&r1=86631&r2=86632&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHReader.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHReader.cpp Mon Nov 9 18:46:19 2009
@@ -1404,10 +1404,7 @@
//
// FIXME: This shouldn't be here, we should just take a raw_ostream.
std::string ErrStr;
- if (FileName == "-")
- Buffer.reset(llvm::MemoryBuffer::getSTDIN());
- else
- Buffer.reset(llvm::MemoryBuffer::getFile(FileName.c_str(), &ErrStr));
+ Buffer.reset(llvm::MemoryBuffer::getFileOrSTDIN(FileName, &ErrStr));
if (!Buffer) {
Error(ErrStr.c_str());
return IgnorePCH;
More information about the cfe-commits
mailing list