[lld] r330157 - [PDB] Correctly use the target machine when writing DBI stream.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 16 13:42:06 PDT 2018
Author: zturner
Date: Mon Apr 16 13:42:06 2018
New Revision: 330157
URL: http://llvm.org/viewvc/llvm-project?rev=330157&view=rev
Log:
[PDB] Correctly use the target machine when writing DBI stream.
Using Config->is64() will treat ARM64 as Amd64, which is incorrect.
Furthermore, there are more esoteric architectures that could
theoretically be encountered. Just set it directly to the machine
type, which we already know anyway.
Modified:
lld/trunk/COFF/PDB.cpp
Modified: lld/trunk/COFF/PDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/PDB.cpp?rev=330157&r1=330156&r2=330157&view=diff
==============================================================================
--- lld/trunk/COFF/PDB.cpp (original)
+++ lld/trunk/COFF/PDB.cpp Mon Apr 16 13:42:06 2018
@@ -1102,8 +1102,7 @@ void PDBLinker::initialize(const llvm::c
pdb::DbiStreamBuilder &DbiBuilder = Builder.getDbiBuilder();
DbiBuilder.setAge(BuildId.PDB70.Age);
DbiBuilder.setVersionHeader(pdb::PdbDbiV70);
- DbiBuilder.setMachineType(Config->is64() ? pdb::PDB_Machine::Amd64
- : pdb::PDB_Machine::x86);
+ DbiBuilder.setMachineType(Config->Machine);
// Technically we are not link.exe 14.11, but there are known cases where
// debugging tools on Windows expect Microsoft-specific version numbers or
// they fail to work at all. Since we know we produce PDBs that are
More information about the llvm-commits
mailing list