Both of the if-clauses modify the raw_path variable and only one of them
was resetting the variable for the fallback. Avoid future bugs like that
by always resetting the variable.
Differential revision: https://reviews.llvm.org/D88704
FileSystem::Instance().Resolve(file_spec);
return true;
}
- raw_path = lldb_shlib_spec.GetPath();
}
- raw_path.resize(rev_it - r_end);
- } else {
- raw_path.resize(rev_it - r_end);
}
// Fall back to the Clang resource directory inside the framework.
+ raw_path = lldb_shlib_spec.GetPath();
+ raw_path.resize(rev_it - r_end);
raw_path.append("LLDB.framework/Resources/Clang");
file_spec.GetDirectory().SetString(raw_path.c_str());
FileSystem::Instance().Resolve(file_spec);