Don't use getFileOrStdin() at where we don't want to read from stdin.

llvm-svn: 194746
This commit is contained in:
Rui Ueyama 2013-11-14 23:21:25 +00:00
parent 7a1ae9f1a1
commit 9c082cd8dd
3 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ void RoundTripNativePass::perform(std::unique_ptr<MutableFile> &mergedFile) {
// writing to the file or when reading atoms back from the file.
nativeWriter->writeFile(*mergedFile, tmpNativeFile.str());
OwningPtr<MemoryBuffer> buff;
if (MemoryBuffer::getFileOrSTDIN(tmpNativeFile.str(), buff))
if (MemoryBuffer::getFile(tmpNativeFile.str(), buff))
return;
std::unique_ptr<MemoryBuffer> mb(buff.take());

View File

@ -36,7 +36,7 @@ void RoundTripYAMLPass::perform(std::unique_ptr<MutableFile> &mergedFile) {
// writing to the file or when reading atoms back from the file.
yamlWriter->writeFile(*mergedFile, tmpYAMLFile.str());
OwningPtr<MemoryBuffer> buff;
if (MemoryBuffer::getFileOrSTDIN(tmpYAMLFile.str(), buff))
if (MemoryBuffer::getFile(tmpYAMLFile.str(), buff))
return;
if (buff->getBufferSize() < MAX_YAML_FILE_SIZE) {

View File

@ -891,7 +891,7 @@ private:
// Read and parse the COFF
OwningPtr<MemoryBuffer> opmb;
if (error_code ec = MemoryBuffer::getFileOrSTDIN(*coffFilePath, opmb))
if (error_code ec = MemoryBuffer::getFile(*coffFilePath, opmb))
return ec;
std::unique_ptr<MemoryBuffer> newmb(opmb.take());
return parseCOFFFile(newmb, result);