[llvm] [CodeView] Read and dump LF_ALIAS (PR #218243)
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 24 21:36:33 PDT 2026
================
@@ -85,6 +85,15 @@ static Expected<uint32_t> getSourceLineHash(const CVType &Rec) {
return hashStringV1(StringRef(Buf, 4));
}
+// LF_ALIAS is considered a UDT, so only the name is hashed.
+static Expected<uint32_t> getHashForAlias(const CVType &Rec) {
----------------
rnk wrote:
PDB writing in LLD is also a client of this interface, but I don't think there's any reason to be concerned about correctness issues there.
I refreshed my memory on how type hashing works, and I think this is safe. LLD seems to retain multiple records with the same type hash, it deduplicates on content, rather than semantic hash, so if you have multiple typedefs with the same name in the same program, it's up to the debugger to sort out which is in effect.
https://github.com/llvm/llvm-project/pull/218243
More information about the llvm-commits
mailing list