[llvm-rtdyld] Refactor to reduce indentation.

Suggested by: David Blaikie.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253808 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Davide Italiano 2015-11-22 01:58:33 +00:00
parent 085776b0a3
commit e5dedf932d

View File

@ -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);
}
}