summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ItaniumMangle.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-04-29 01:23:20 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-04-29 01:23:20 +0000
commitec24bbe332b4c341fc32328ee6aafa7b72aa1df7 (patch)
tree6e343bd054192a75448d6682c24d037a571da34b /clang/lib/AST/ItaniumMangle.cpp
parent23323e25f896cf44e6d4519ef38f066e45fe408f (diff)
downloadbcm5719-llvm-ec24bbe332b4c341fc32328ee6aafa7b72aa1df7.tar.gz
bcm5719-llvm-ec24bbe332b4c341fc32328ee6aafa7b72aa1df7.zip
PR27549: fix bug that resulted in us giving a translation-unit-scope variable a
mangled name if it happened to be declared in an 'extern "C++"' context. This also causes us to use the '_ZL' mangling rather than the '_Z' mangling for internal-linkage entities that are wrapped in a language linkage construct. llvm-svn: 267969
Diffstat (limited to 'clang/lib/AST/ItaniumMangle.cpp')
-rw-r--r--clang/lib/AST/ItaniumMangle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp
index 7ad464e1d91..62b60d7b892 100644
--- a/clang/lib/AST/ItaniumMangle.cpp
+++ b/clang/lib/AST/ItaniumMangle.cpp
@@ -79,7 +79,7 @@ static const DeclContext *getEffectiveDeclContext(const Decl *D) {
if (FD->isExternC())
return FD->getASTContext().getTranslationUnitDecl();
- return DC;
+ return DC->getRedeclContext();
}
static const DeclContext *getEffectiveParentContext(const DeclContext *DC) {
OpenPOWER on IntegriCloud