[llvm-commits] CVS: llvm/tools/lli/lli.cpp
Chris Lattner
sabre at nondot.org
Sun May 6 16:46:45 PDT 2007
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;
}
More information about the llvm-commits
mailing list