[PATCH] D43060: [CodeView] Lower __restrict and other pointer qualifiers correctly
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 26 15:51:31 PST 2018
rnk added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:2142
// lowerType call. It will update the TypeIndices map.
auto I = TypeIndices.find({Ty, ClassTy});
if (I != TypeIndices.end())
----------------
Hui wrote:
> I am thinking without extra information for the method `getTypeIndex`, two different DIType, for example, int* and int* __restrict, that having the same `Ty`, will be hashed with only one key in the DenseMap. So what is returned by finding DenseMap will be whatever is hashed first. This might not be correct. If this thought is right, changing DenseMap is still needed.
The DITypeRef key should encode this information already. In the first case, the key will be a single DW_TAG_pointer_type DIDerivedType node. In the second case, it will be a DW_TAG_restrict_type node wrapping a pointer node.
https://reviews.llvm.org/D43060
More information about the llvm-commits
mailing list