summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/MicrosoftMangle.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-08-06 03:12:47 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-08-06 03:12:47 +0000
commitff9075f054422212802490902eadff68dca9c6cd (patch)
treef0a3cbdf526c62ae244039629371cc2ccc54496c /clang/lib/AST/MicrosoftMangle.cpp
parent862d1bbdf6f763b93e42ac1419f58e01f02be37f (diff)
downloadbcm5719-llvm-ff9075f054422212802490902eadff68dca9c6cd.tar.gz
bcm5719-llvm-ff9075f054422212802490902eadff68dca9c6cd.zip
MS ABI: Mangle lambdas which are given the same mangling number
It is possible for lambdas to get the same mangling number because they may exist in different mangling contexts. To handle this correctly, mangle the context into the name as well. llvm-svn: 214947
Diffstat (limited to 'clang/lib/AST/MicrosoftMangle.cpp')
-rw-r--r--clang/lib/AST/MicrosoftMangle.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp
index ed22d278499..bc07e3c2dc8 100644
--- a/clang/lib/AST/MicrosoftMangle.cpp
+++ b/clang/lib/AST/MicrosoftMangle.cpp
@@ -802,10 +802,7 @@ void MicrosoftCXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND,
void MicrosoftCXXNameMangler::mangleNestedName(const NamedDecl *ND) {
// <postfix> ::= <unqualified-name> [<postfix>]
// ::= <substitution> [<postfix>]
- if (isLambda(ND))
- return;
-
- const DeclContext *DC = ND->getDeclContext();
+ const DeclContext *DC = getEffectiveDeclContext(ND);
while (!DC->isTranslationUnit()) {
if (isa<TagDecl>(ND) || isa<VarDecl>(ND)) {
OpenPOWER on IntegriCloud