llvm.org GIT mirror llvm / e5dedf9
[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 Davide Italiano 3 years ago
1 changed file(s) with 4 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
246246
247247 static void loadDylibs() {
248248 for (const std::string &Dylib : Dylibs) {
249 if (sys::fs::is_regular_file(Dylib)) {
250 std::string ErrMsg;
251 if (sys::DynamicLibrary::LoadLibraryPermanently(Dylib.c_str(), &ErrMsg))
252 report_fatal_error("Error loading '" + Dylib + "': " + ErrMsg);
253 } else
249 if (!sys::fs::is_regular_file(Dylib))
254250 report_fatal_error("Dylib not found: '" + Dylib + "'.");
251 std::string ErrMsg;
252 if (sys::DynamicLibrary::LoadLibraryPermanently(Dylib.c_str(), &ErrMsg))
253 report_fatal_error("Error loading '" + Dylib + "': " + ErrMsg);
255254 }
256255 }
257256