simplify code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36837 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-05-06 04:43:36 +00:00
parent 592488a4ef
commit 0f4ed87c9c

View File

@ -60,12 +60,8 @@ int main(int argc, char **argv) {
std::auto_ptr<Module> M;
if (Bitcode) {
MemoryBuffer *Buffer;
if (InputFilename == "-") {
Buffer = MemoryBuffer::getSTDIN();
} else {
Buffer = MemoryBuffer::getFile(&InputFilename[0], InputFilename.size());
}
MemoryBuffer *Buffer
= MemoryBuffer::getFileOrSTDIN(&InputFilename[0], InputFilename.size());
if (Buffer == 0)
ErrorMessage = "Error reading file '" + InputFilename + "'";