[llvm-commits] CVS: llvm/tools/llvm2cpp/llvm2cpp.cpp
Chris Lattner
sabre at nondot.org
Sun May 6 16:46:38 PDT 2007
Changes in directory llvm/tools/llvm2cpp:
llvm2cpp.cpp updated: 1.9 -> 1.10
---
Log message:
use the new MemoryBuffer interfaces to simplify error reporting in clients.
---
Diffs of the changes: (+1 -3)
llvm2cpp.cpp | 4 +---
1 files changed, 1 insertion(+), 3 deletions(-)
Index: llvm/tools/llvm2cpp/llvm2cpp.cpp
diff -u llvm/tools/llvm2cpp/llvm2cpp.cpp:1.9 llvm/tools/llvm2cpp/llvm2cpp.cpp:1.10
--- llvm/tools/llvm2cpp/llvm2cpp.cpp:1.9 Sun May 6 04:29:57 2007
+++ llvm/tools/llvm2cpp/llvm2cpp.cpp Sun May 6 18:45:49 2007
@@ -52,11 +52,9 @@
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] << ": ";
if (ErrorMessage.size())
More information about the llvm-commits
mailing list