mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
For 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29817 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -50,7 +50,10 @@ namespace llvm {
|
||||
/// 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() {
|
||||
|
Reference in New Issue
Block a user