[llvm-commits] CVS: llvm/lib/Debugger/SourceFile.cpp

Reid Spencer reid at x10sys.com
Tue Aug 22 09:06:44 PDT 2006



Changes in directory llvm/lib/Debugger:

SourceFile.cpp updated: 1.7 -> 1.8
---
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:  (+3 -1)

 SourceFile.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)


Index: llvm/lib/Debugger/SourceFile.cpp
diff -u llvm/lib/Debugger/SourceFile.cpp:1.7 llvm/lib/Debugger/SourceFile.cpp:1.8
--- llvm/lib/Debugger/SourceFile.cpp:1.7	Thu Apr 21 17:36:21 2005
+++ llvm/lib/Debugger/SourceFile.cpp	Tue Aug 22 11:06:27 2006
@@ -19,7 +19,9 @@
 /// readFile - Load Filename
 ///
 void SourceFile::readFile() {
-  File.map();
+  std::string ErrMsg;
+  if (File.map(&ErrMsg))
+    throw ErrMsg;
 }
 
 /// calculateLineOffsets - Compute the LineOffset vector for the current file.






More information about the llvm-commits mailing list