[llvm] r253767 - [llvm-rtdyld] Fail early if we can't load dynamic libraries.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 21 07:17:32 PST 2015
I assume report_fatal_error is noreturn? So we could reorder this to reduce
indentation:
if (not normal file)
Report
If (load library)
Report
On Nov 20, 2015 10:00 PM, "Davide Italiano via llvm-commits" <
llvm-commits at lists.llvm.org> wrote:
> Author: davide
> Date: Fri Nov 20 23:58:19 2015
> New Revision: 253767
>
> URL: http://llvm.org/viewvc/llvm-project?rev=253767&view=rev
> Log:
> [llvm-rtdyld] Fail early if we can't load dynamic libraries.
>
> Modified:
> llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp
>
> Modified: llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp?rev=253767&r1=253766&r2=253767&view=diff
>
> ==============================================================================
> --- llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp (original)
> +++ llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp Fri Nov 20 23:58:19 2015
> @@ -250,10 +250,9 @@ static void loadDylibs() {
> if (sys::fs::is_regular_file(Dylib)) {
> std::string ErrMsg;
> if (sys::DynamicLibrary::LoadLibraryPermanently(Dylib.c_str(),
> &ErrMsg))
> - llvm::errs() << "Error loading '" << Dylib << "': "
> - << ErrMsg << "\n";
> + report_fatal_error("Error loading '" + Dylib + "': " + ErrMsg);
> } else
> - llvm::errs() << "Dylib not found: '" << Dylib << "'.\n";
> + report_fatal_error("Dylib not found: '" + Dylib + "'.");
> }
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151121/6341895e/attachment.html>
More information about the llvm-commits
mailing list