[llvm] r253808 - [llvm-rtdyld] Refactor to reduce indentation.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 21 17:58:33 PST 2015
Author: davide
Date: Sat Nov 21 19:58:33 2015
New Revision: 253808
URL: http://llvm.org/viewvc/llvm-project?rev=253808&view=rev
Log:
[llvm-rtdyld] Refactor to reduce indentation.
Suggested by: David Blaikie.
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=253808&r1=253807&r2=253808&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp (original)
+++ llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp Sat Nov 21 19:58:33 2015
@@ -247,12 +247,11 @@ static int Error(const Twine &Msg) {
static void loadDylibs() {
for (const std::string &Dylib : Dylibs) {
- if (sys::fs::is_regular_file(Dylib)) {
- std::string ErrMsg;
- if (sys::DynamicLibrary::LoadLibraryPermanently(Dylib.c_str(), &ErrMsg))
- report_fatal_error("Error loading '" + Dylib + "': " + ErrMsg);
- } else
+ if (!sys::fs::is_regular_file(Dylib))
report_fatal_error("Dylib not found: '" + Dylib + "'.");
+ std::string ErrMsg;
+ if (sys::DynamicLibrary::LoadLibraryPermanently(Dylib.c_str(), &ErrMsg))
+ report_fatal_error("Error loading '" + Dylib + "': " + ErrMsg);
}
}
More information about the llvm-commits
mailing list