[lldb] Remove FileSpec(FileSpec*) constructor
This constructor was the cause of some pretty weird behavior. Remove it, and update all code to properly dereference the argument instead.
This commit is contained in:
@@ -114,9 +114,10 @@ const char *ObjectFilePECOFF::GetPluginDescriptionStatic() {
|
||||
ObjectFile *ObjectFilePECOFF::CreateInstance(const lldb::ModuleSP &module_sp,
|
||||
DataBufferSP &data_sp,
|
||||
lldb::offset_t data_offset,
|
||||
const lldb_private::FileSpec *file,
|
||||
const lldb_private::FileSpec *file_p,
|
||||
lldb::offset_t file_offset,
|
||||
lldb::offset_t length) {
|
||||
FileSpec file = file_p ? *file_p : FileSpec();
|
||||
if (!data_sp) {
|
||||
data_sp = MapFileData(file, length, file_offset);
|
||||
if (!data_sp)
|
||||
@@ -135,7 +136,7 @@ ObjectFile *ObjectFilePECOFF::CreateInstance(const lldb::ModuleSP &module_sp,
|
||||
}
|
||||
|
||||
auto objfile_up = std::make_unique<ObjectFilePECOFF>(
|
||||
module_sp, data_sp, data_offset, file, file_offset, length);
|
||||
module_sp, data_sp, data_offset, file_p, file_offset, length);
|
||||
if (!objfile_up || !objfile_up->ParseHeader())
|
||||
return nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user