forked from OSchip/llvm-project
[MS ABI] Ignore transparent contexts when determining the effective context
We didn't skip over extern "C++" contexts, causing us to mangle things which don't need to be mangled. llvm-svn: 270089
This commit is contained in:
parent
0376b1a2d7
commit
b0f1dbdf33
|
@ -94,7 +94,7 @@ static const DeclContext *getEffectiveDeclContext(const Decl *D) {
|
|||
return getEffectiveDeclContext(cast<Decl>(DC));
|
||||
}
|
||||
|
||||
return DC;
|
||||
return DC->getRedeclContext();
|
||||
}
|
||||
|
||||
static const DeclContext *getEffectiveParentContext(const DeclContext *DC) {
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
int a;
|
||||
// CHECK-DAG: @"\01?a@@3HA"
|
||||
|
||||
extern "C++" {
|
||||
static int __attribute__((used)) ignore_transparent_context;
|
||||
// CHECK-DAG: @ignore_transparent_context
|
||||
}
|
||||
|
||||
namespace N {
|
||||
int b;
|
||||
// CHECK-DAG: @"\01?b@N@@3HA"
|
||||
|
|
Loading…
Reference in New Issue