llvm/lib/DebugInfo/PDB
Zachary Turner 03936513dd [PDB] Fix bug when using multiple PCH header objects with the same name.
A common pattern in Windows is to have all your precompiled headers
use an object named stdafx.obj.  If you've got a project with many
different static libs, you might use a separate PCH for each one of
these.

During the final link step, a file from A might reference the PCH
object from A, but it will have the same name (stdafx.obj) as any
other PCH from another project.  The only difference will be the
path.  For example, A might be A/stdafx.obj while B is B/stdafx.obj.

The existing algorithm checks only the filename that was passed on
the command line (or stored in archive), but this is insufficient in
the case where relative paths are used, because depending on the
command line object file / library order, it might find the wrong
PCH object first resulting in a signature mismatch.

The fix here is to simply check whether the absolute path of the
PCH object (which is stored in the input obj file for the file that
references the PCH) *ends with* the full relative path of whatever
is specified on the command line (or is in the archive).

Differential Revision: https://reviews.llvm.org/D66431

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374442 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-10 20:25:51 +00:00
..
DIA [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
Native Unify the two CRC implementations 2019-10-09 09:06:30 +00:00
CMakeLists.txt Teach llvm-pdbutil pretty -native about -injected-sources 2019-07-16 18:04:26 +00:00
GenericError.cpp [PDB] Fix bug when using multiple PCH header objects with the same name. 2019-10-10 20:25:51 +00:00
IPDBSourceFile.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDB.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBContext.cpp llvm-symbolizer: Add a FRAME command. 2019-06-24 20:03:23 +00:00
PDBExtras.cpp llvm-pdbdump: Fix several smaller issues with injected source compression handling 2019-07-17 22:59:52 +00:00
PDBInterfaceAnchors.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbol.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolAnnotation.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolBlock.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolCompiland.cpp Add Swift enumerator value for CodeView::SourceLanguage 2019-03-11 23:27:59 +00:00
PDBSymbolCompilandDetails.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolCompilandEnv.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolCustom.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolData.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolExe.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolFunc.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
PDBSymbolFuncDebugEnd.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolFuncDebugStart.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolLabel.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolPublicSymbol.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolThunk.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolTypeArray.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolTypeBaseClass.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolTypeBuiltin.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolTypeCustom.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolTypeDimension.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolTypeEnum.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolTypeFriend.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolTypeFunctionArg.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolTypeFunctionSig.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
PDBSymbolTypeManaged.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolTypePointer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolTypeTypedef.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolTypeUDT.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolTypeVTable.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolTypeVTableShape.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolUnknown.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymbolUsingNamespace.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PDBSymDumper.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UDTLayout.cpp [DebugInfo] Don't dereference a dyn_cast<PDBSymbolData> result. NFCI. 2019-09-15 15:38:26 +00:00