[llvm-commits] CVS: llvm/include/llvm/Debugger/SourceFile.h
Reid Spencer
reid at x10sys.com
Tue Aug 22 09:06:43 PDT 2006
Changes in directory llvm/include/llvm/Debugger:
SourceFile.h updated: 1.3 -> 1.4
---
Log message:
For PR797: http://llvm.org/PR797 :
Adjust users of MappedFile to its new non-throwing interface. Note that in
most cases the lazy step of just throwing after a call to MappedFile was
installed. This was done in the name of incremental changes. Getting rid of
the new throw statements will take adjustment of interfaces and propagation
of errors to higher levels. Those changes will come in subsequent patches.
---
Diffs of the changes: (+4 -1)
SourceFile.h | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)
Index: llvm/include/llvm/Debugger/SourceFile.h
diff -u llvm/include/llvm/Debugger/SourceFile.h:1.3 llvm/include/llvm/Debugger/SourceFile.h:1.4
--- llvm/include/llvm/Debugger/SourceFile.h:1.3 Thu Apr 21 15:39:38 2005
+++ llvm/include/llvm/Debugger/SourceFile.h Tue Aug 22 11:06:27 2006
@@ -50,7 +50,10 @@
/// reading it, or if the user cancels the operation. Instead, it will just
/// be an empty source file.
SourceFile(const std::string &fn, const GlobalVariable *Desc)
- : Filename(fn), Descriptor(Desc), File(Filename) {
+ : Filename(fn), Descriptor(Desc), File() {
+ std::string ErrMsg;
+ if (File.open(Filename, sys::MappedFile::READ_ACCESS, &ErrMsg))
+ throw ErrMsg;
readFile();
}
~SourceFile() {
More information about the llvm-commits
mailing list