[llvm-commits] CVS: llvm/tools/llc/llc.cpp
Reid Spencer
reid at x10sys.com
Mon Mar 26 15:38:18 PDT 2007
Changes in directory llvm/tools/llc:
llc.cpp updated: 1.144 -> 1.145
---
Log message:
For PR1277: http://llvm.org/PR1277 :
Implement error handling for bytecode parsing.
Patch by Scott Michel.
---
Diffs of the changes: (+4 -1)
llc.cpp | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)
Index: llvm/tools/llc/llc.cpp
diff -u llvm/tools/llc/llc.cpp:1.144 llvm/tools/llc/llc.cpp:1.145
--- llvm/tools/llc/llc.cpp:1.144 Wed Feb 7 19:41:07 2007
+++ llvm/tools/llc/llc.cpp Mon Mar 26 17:38:01 2007
@@ -177,10 +177,13 @@
sys::PrintStackTraceOnErrorSignal();
// Load the module to be compiled...
+ std::string errmsg;
std::auto_ptr<Module> M(ParseBytecodeFile(InputFilename,
- Compressor::decompressToNewBuffer));
+ Compressor::decompressToNewBuffer,
+ &errmsg));
if (M.get() == 0) {
std::cerr << argv[0] << ": bytecode didn't read correctly.\n";
+ std::cerr << "Reason: " << errmsg << "\n";
return 1;
}
Module &mod = *M.get();
More information about the llvm-commits
mailing list