[llvm-commits] CVS: llvm/tools/llc/llc.cpp
Chris Lattner
sabre at nondot.org
Sun May 6 16:46:42 PDT 2007
Changes in directory llvm/tools/llc:
llc.cpp updated: 1.148 -> 1.149
---
Log message:
use the new MemoryBuffer interfaces to simplify error reporting in clients.
---
Diffs of the changes: (+1 -5)
llc.cpp | 6 +-----
1 files changed, 1 insertion(+), 5 deletions(-)
Index: llvm/tools/llc/llc.cpp
diff -u llvm/tools/llc/llc.cpp:1.148 llvm/tools/llc/llc.cpp:1.149
--- llvm/tools/llc/llc.cpp:1.148 Sun May 6 04:32:02 2007
+++ llvm/tools/llc/llc.cpp Sun May 6 18:45:48 2007
@@ -179,14 +179,10 @@
std::string ErrorMessage;
std::auto_ptr<Module> M;
- {
std::auto_ptr<MemoryBuffer> Buffer(
- MemoryBuffer::getFileOrSTDIN(&InputFilename[0], InputFilename.size()));
+ MemoryBuffer::getFileOrSTDIN(InputFilename, &ErrorMessage));
if (Buffer.get())
M.reset(ParseBitcodeFile(Buffer.get(), &ErrorMessage));
- else
- ErrorMessage = "Error reading file '" + InputFilename + "'";
- }
if (M.get() == 0) {
std::cerr << argv[0] << ": bytecode didn't read correctly.\n";
std::cerr << "Reason: " << ErrorMessage << "\n";
More information about the llvm-commits
mailing list