[PATCH] D43060: [CodeView] Lower __restrict and other pointer qualifiers correctly

Hui Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 26 15:21:22 PST 2018


Hui 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())
----------------
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. 


https://reviews.llvm.org/D43060





More information about the llvm-commits mailing list