[llvm-commits] CVS: llvm/tools/opt/opt.cpp
Chris Lattner
sabre at nondot.org
Sat May 5 21:43:23 PDT 2007
Changes in directory llvm/tools/opt:
opt.cpp updated: 1.138 -> 1.139
---
Log message:
add support to llvm-prof for reading from a bitcode file
---
Diffs of the changes: (+2 -6)
opt.cpp | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
Index: llvm/tools/opt/opt.cpp
diff -u llvm/tools/opt/opt.cpp:1.138 llvm/tools/opt/opt.cpp:1.139
--- llvm/tools/opt/opt.cpp:1.138 Sat May 5 21:42:03 2007
+++ llvm/tools/opt/opt.cpp Sat May 5 23:43:00 2007
@@ -268,12 +268,8 @@
// Load the input module...
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