Skip to content

Commit 4270c9c

Browse files
committed
[lldb] Stop passing both i386 and i686 in parallel as architectures on Windows
When an object file returns multiple architectures, it is treated as a fat binary - which really isn't the case of i386 vs i686 where the object file actually has one architecture. This allows getting rid of hardcoded architecture triples in PlatformWindows. The parallel i386 and i686 architecture strings stem from 5e6f452 / D7120 and ad587ae / D4658. Differential Revision: https://reviews.llvm.org/D128617
1 parent f96cb66 commit 4270c9c

File tree

4 files changed

+1
-8
lines changed

4 files changed

+1
-8
lines changed

lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@ size_t ObjectFilePDB::GetModuleSpecifications(
137137
case PDB_Machine::x86:
138138
module_arch.SetTriple("i386-pc-windows");
139139
specs.Append(module_spec);
140-
module_arch.SetTriple("i686-pc-windows");
141-
specs.Append(module_spec);
142140
break;
143141
case PDB_Machine::ArmNT:
144142
module_arch.SetTriple("armv7-pc-windows");

lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,6 @@ size_t ObjectFilePECOFF::GetModuleSpecifications(
337337
spec.SetTriple("i386-pc-windows");
338338
spec.GetTriple().setEnvironment(env);
339339
specs.Append(module_spec);
340-
spec.SetTriple("i686-pc-windows");
341-
spec.GetTriple().setEnvironment(env);
342-
specs.Append(module_spec);
343340
break;
344341
case MachineArmNt:
345342
spec.SetTriple("armv7-pc-windows");

lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,9 @@ PlatformWindows::PlatformWindows(bool is_host) : RemoteAwarePlatform(is_host) {
124124
if (spec.IsValid())
125125
m_supported_architectures.push_back(spec);
126126
};
127-
AddArch(ArchSpec("i686-pc-windows"));
128127
AddArch(HostInfo::GetArchitecture(HostInfo::eArchKindDefault));
129128
AddArch(HostInfo::GetArchitecture(HostInfo::eArchKind32));
130129
AddArch(HostInfo::GetArchitecture(HostInfo::eArchKind64));
131-
AddArch(ArchSpec("i386-pc-windows"));
132130
}
133131

134132
Status PlatformWindows::ConnectRemote(Args &args) {

lldb/test/Shell/ObjectFile/PECOFF/settings-abi-i686.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# RUN: FileCheck -DABI=gnu -DFILENAME=%basename_t.tmp %s
1919

2020
# CHECK-LABEL: image list --triple --basename
21-
# CHECK-NEXT: i686-pc-windows-[[ABI]] [[FILENAME]]
21+
# CHECK-NEXT: i386-pc-windows-[[ABI]] [[FILENAME]]
2222

2323
--- !COFF
2424
OptionalHeader:

0 commit comments

Comments
 (0)