r182488 - Use StringMap in MicrosoftMangle to resolve FIXME.
Reid Kleckner
reid at kleckner.net
Wed May 22 10:16:39 PDT 2013
Author: rnk
Date: Wed May 22 12:16:39 2013
New Revision: 182488
URL: http://llvm.org/viewvc/llvm-project?rev=182488&view=rev
Log:
Use StringMap in MicrosoftMangle to resolve FIXME.
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=182488&r1=182487&r2=182488&view=diff
==============================================================================
--- cfe/trunk/lib/AST/MicrosoftMangle.cpp (original)
+++ cfe/trunk/lib/AST/MicrosoftMangle.cpp Wed May 22 12:16:39 2013
@@ -23,6 +23,7 @@
#include "clang/Basic/ABI.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/TargetInfo.h"
+#include "llvm/ADT/StringMap.h"
#include <map>
using namespace clang;
@@ -48,9 +49,7 @@ class MicrosoftCXXNameMangler {
const NamedDecl *Structor;
unsigned StructorType;
- // FIXME: audit the performance of BackRefMap as it might do way too many
- // copying of strings.
- typedef std::map<std::string, unsigned> BackRefMap;
+ typedef llvm::StringMap<unsigned> BackRefMap;
BackRefMap NameBackReferences;
bool UseNameBackReferences;
More information about the cfe-commits
mailing list