[lldb] Remove ConstString getters from FileSpec (#206802)
This finishes the removal of ConstString from FileSpec's interface. Note that FileSpec is still _backed_ by ConstStrings, that will be changed in a follow-up. A non-goal for this change is to rewrite business logic, so I kept the type of some variables as ConstString where a refactor would necessary to change that. I converted printf-style formatting to formatv-style formatting where required, and otherwise tried to leave callsites alone to the extent that was possible.
This commit is contained in:
1 parent
a2cc0b6e99
commit
f9b5264523
88 files changed
+322
-348
No files matched your search
@@ -2343,17 +2343,16 @@ bool ScriptInterpreterPythonImpl::LoadScriptingModule(
|
||||
// Not a filename, probably a package of some sort, let it go through.
|
||||
possible_package = true;
|
||||
} else if (is_directory(st) || is_regular_file(st)) {
|
||||
if (module_file.GetDirectory().IsEmpty()) {
|
||||
if (module_file.GetDirectory().empty()) {
|
||||
error = Status::FromErrorStringWithFormatv(
|
||||
"invalid directory name '{0}'", pathname);
|
||||
return false;
|
||||
}
|
||||
if (llvm::Error e =
|
||||
ExtendSysPath(module_file.GetDirectory().GetCString())) {
|
||||
if (llvm::Error e = ExtendSysPath(module_file.GetDirectory().str())) {
|
||||
error = Status::FromError(std::move(e));
|
||||
return false;
|
||||
}
|
||||
module_name = module_file.GetFilename().GetCString();
|
||||
module_name = module_file.GetFilename().str();
|
||||
} else {
|
||||
error = Status::FromErrorString(
|
||||
"no known way to import this module specification");
|
||||
|
||||
Reference in new issue
Block a user