r256663 - [MS ABI] Change the ArgBackRefMap to hold const qualified pointers
David Majnemer via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 30 21:36:52 PST 2015
Author: majnemer
Date: Wed Dec 30 23:36:52 2015
New Revision: 256663
URL: http://llvm.org/viewvc/llvm-project?rev=256663&view=rev
Log:
[MS ABI] Change the ArgBackRefMap to hold const qualified pointers
Just a cleanup, no functional change is intended.
Modified:
cfe/trunk/lib/AST/MicrosoftMangle.cpp
Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/MicrosoftMangle.cpp?rev=256663&r1=256662&r2=256663&view=diff
==============================================================================
--- cfe/trunk/lib/AST/MicrosoftMangle.cpp (original)
+++ cfe/trunk/lib/AST/MicrosoftMangle.cpp Wed Dec 30 23:36:52 2015
@@ -221,7 +221,7 @@ class MicrosoftCXXNameMangler {
typedef llvm::SmallVector<std::string, 10> BackRefVec;
BackRefVec NameBackReferences;
- typedef llvm::DenseMap<void *, unsigned> ArgBackRefMap;
+ typedef llvm::DenseMap<const void *, unsigned> ArgBackRefMap;
ArgBackRefMap TypeBackReferences;
typedef std::set<int> PassObjectSizeArgsSet;
@@ -1489,7 +1489,7 @@ void MicrosoftCXXNameMangler::manglePass
int Type = POSA->getType();
auto Iter = PassObjectSizeArgs.insert(Type).first;
- void *TypePtr = const_cast<void *>((const void *)&*Iter);
+ auto *TypePtr = (const void *)&*Iter;
ArgBackRefMap::iterator Found = TypeBackReferences.find(TypePtr);
if (Found == TypeBackReferences.end()) {
More information about the cfe-commits
mailing list