diff options
author | Chris Lattner <sabre@nondot.org> | 2007-05-06 04:43:36 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-05-06 04:43:36 +0000 |
commit | 0f4ed87c9c894fa55276d4f309923a4ac219711e (patch) | |
tree | c061baa02b1949da15fb7342641689d11c719361 /tools/llvm-dis | |
parent | 592488a4ef92ce8e454dc029808ed1b6612b7312 (diff) |
simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36837 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-dis')
-rw-r--r-- | tools/llvm-dis/llvm-dis.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/llvm-dis/llvm-dis.cpp b/tools/llvm-dis/llvm-dis.cpp index 6065e9ba5e..12a53285c0 100644 --- a/tools/llvm-dis/llvm-dis.cpp +++ b/tools/llvm-dis/llvm-dis.cpp @@ -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 + "'"; |