mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Fix DenseMap iterator constness.
This patch forbids implicit conversion of DenseMap::const_iterator to DenseMap::iterator which was possible because DenseMapIterator inherited (publicly) from DenseMapConstIterator. Conversion the other way around is now allowed as one may expect. The template DenseMapConstIterator is removed and the template parameter IsConst which specifies whether the iterator is constant is added to DenseMapIterator. Actually IsConst parameter is not necessary since the constness can be determined from KeyT but this is not relevant to the fix and can be addressed later. Patch by Victor Zverovich! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86636 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -364,7 +364,7 @@ bool MSP430DAGToDAGISel::IsLegalAndProfitableToFold(SDNode *N, SDNode *U,
|
||||
/// TokenFactor by PreprocessForRMW. Query the map Store => Load1 (created
|
||||
/// during preprocessing) to determine whether it's legal to introduce such
|
||||
/// "cycle" for a moment.
|
||||
DenseMap<SDNode*, SDNode*>::iterator I = RMWStores.find(Root);
|
||||
DenseMap<SDNode*, SDNode*>::const_iterator I = RMWStores.find(Root);
|
||||
if (I != RMWStores.end() && I->second == N)
|
||||
return true;
|
||||
|
||||
|
Reference in New Issue
Block a user