Changes in directory llvm/tools/lli:
lli.cpp updated: 1.72 -> 1.73 --- Log message: use the new MemoryBuffer interfaces to simplify error reporting in clients. --- Diffs of the changes: (+1 -5) lli.cpp | 6 +----- 1 files changed, 1 insertion(+), 5 deletions(-) Index: llvm/tools/lli/lli.cpp diff -u llvm/tools/lli/lli.cpp:1.72 llvm/tools/lli/lli.cpp:1.73 --- llvm/tools/lli/lli.cpp:1.72 Sun May 6 04:32:02 2007 +++ llvm/tools/lli/lli.cpp Sun May 6 18:45:48 2007 @@ -77,11 +77,7 @@ // Load the bytecode... std::string ErrorMsg; ModuleProvider *MP = 0; - MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(&InputFile[0], - InputFile.size()); - if (Buffer == 0) - ErrorMsg = "Error reading file '" + InputFile + "'"; - else { + if (MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(InputFile,&ErrorMsg)){ MP = getBitcodeModuleProvider(Buffer, &ErrorMsg); if (!MP) delete Buffer; } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits