[LLVMdev] Should file opening error during raw_fd_stream::raw_fd_stream exit instead of passing the error up to the caller?

Yuri yuri at rawbw.com
Wed Jun 16 09:13:37 PDT 2010


In several places, for example in JITDebugRegisterer::MakeELF, stream is 
opened and the error is ignored. When the error is actually returned by open

There are two solutions (assuming there are no exceptions).
1. check error string after every raw_fd_stream::raw_fd_stream, fix all 
the places where the check is missing
2. make raw_fd_stream::raw_fd_stream exit

I suggest the second should be done since there are really no situations 
when the file error should be tolerated.

Yuri




More information about the llvm-dev mailing list