[llvm-commits] CVS: llvm/tools/llvm-dis/llvm-dis.cpp
Chris Lattner
sabre at nondot.org
Sat May 5 21:43:53 PDT 2007
Changes in directory llvm/tools/llvm-dis:
llvm-dis.cpp updated: 1.59 -> 1.60
---
Log message:
simplify code
---
Diffs of the changes: (+2 -6)
llvm-dis.cpp | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
Index: llvm/tools/llvm-dis/llvm-dis.cpp
diff -u llvm/tools/llvm-dis/llvm-dis.cpp:1.59 llvm/tools/llvm-dis/llvm-dis.cpp:1.60
--- llvm/tools/llvm-dis/llvm-dis.cpp:1.59 Sun Apr 29 02:54:31 2007
+++ llvm/tools/llvm-dis/llvm-dis.cpp Sat May 5 23:43:36 2007
@@ -60,12 +60,8 @@
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 + "'";
More information about the llvm-commits
mailing list