diff options
author | Ekaterina Romanova <katya_romanova@playstation.sony.com> | 2015-12-10 18:52:50 +0000 |
---|---|---|
committer | Ekaterina Romanova <katya_romanova@playstation.sony.com> | 2015-12-10 18:52:50 +0000 |
commit | 9218a3bf04ef8f75937b07cae1df7e3c71c8c88f (patch) | |
tree | cb9f62ad766e91994bdd35d022af0688a3f22233 /clang/lib/Sema/SemaDeclCXX.cpp | |
parent | 923fdbadae3cda40ae3d3e3e977a5bd177866a0f (diff) | |
download | bcm5719-llvm-9218a3bf04ef8f75937b07cae1df7e3c71c8c88f.tar.gz bcm5719-llvm-9218a3bf04ef8f75937b07cae1df7e3c71c8c88f.zip |
Do not generate DW_TAG_imported_module for anonymous namespaces (even nested) for all the platforms except PS4.
For PS4, generate explicit import for anonymous namespaces and mark it by DW_AT_artificial attribute.
Differential Revision: http://reviews.llvm.org/D12624
llvm-svn: 255281
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 3745641eb01..3054088bd6d 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -7185,7 +7185,8 @@ Decl *Sema::ActOnStartNamespaceDef(Scope *NamespcScope, SourceLocation IdentLoc, IdentifierInfo *II, SourceLocation LBrace, - AttributeList *AttrList) { + AttributeList *AttrList, + UsingDirectiveDecl *&UD) { SourceLocation StartLoc = InlineLoc.isValid() ? InlineLoc : NamespaceLoc; // For anonymous namespace, take the location of the left brace. SourceLocation Loc = II ? IdentLoc : LBrace; @@ -7299,14 +7300,13 @@ Decl *Sema::ActOnStartNamespaceDef(Scope *NamespcScope, // namespace internal linkage. if (!PrevNS) { - UsingDirectiveDecl* UD - = UsingDirectiveDecl::Create(Context, Parent, - /* 'using' */ LBrace, - /* 'namespace' */ SourceLocation(), - /* qualifier */ NestedNameSpecifierLoc(), - /* identifier */ SourceLocation(), - Namespc, - /* Ancestor */ Parent); + UD = UsingDirectiveDecl::Create(Context, Parent, + /* 'using' */ LBrace, + /* 'namespace' */ SourceLocation(), + /* qualifier */ NestedNameSpecifierLoc(), + /* identifier */ SourceLocation(), + Namespc, + /* Ancestor */ Parent); UD->setImplicit(); Parent->addDecl(UD); } |