Deleted Added
full compact
105c105
< if (const VisibilityAttr *attr = D->getAttr<VisibilityAttr>(getContext())) {
---
> if (const VisibilityAttr *attr = D->getAttr<VisibilityAttr>()) {
245a246,253
> // The kind of external linkage this function will have, if it is not
> // inline or static.
> CodeGenModule::GVALinkage External = CodeGenModule::GVA_StrongExternal;
> if (Context.getLangOptions().CPlusPlus &&
> (FD->getPrimaryTemplate() || FD->getInstantiatedFromMemberFunction()) &&
> !FD->isExplicitSpecialization())
> External = CodeGenModule::GVA_TemplateInstantiation;
>
251c259
< return CodeGenModule::GVA_StrongExternal;
---
> return External;
259c267
< return CodeGenModule::GVA_StrongExternal;
---
> return External;
276c284
< return CodeGenModule::GVA_StrongExternal;
---
> return External;
301c309
< } else if (D->hasAttr<DLLExportAttr>(getContext())) {
---
> } else if (D->hasAttr<DLLExportAttr>()) {
303c311
< } else if (D->hasAttr<WeakAttr>(getContext())) {
---
> } else if (D->hasAttr<WeakAttr>()) {
309c317
< } else if (Linkage == GVA_CXXInline) {
---
> } else if (Linkage == GVA_CXXInline || Linkage == GVA_TemplateInstantiation) {
336c344
< if (D->hasAttr<FastCallAttr>(getContext()))
---
> if (D->hasAttr<FastCallAttr>())
339c347
< if (D->hasAttr<StdCallAttr>(getContext()))
---
> if (D->hasAttr<StdCallAttr>())
348c356
< if (D->hasAttr<AlwaysInlineAttr>(getContext()))
---
> if (D->hasAttr<AlwaysInlineAttr>())
351c359
< if (D->hasAttr<NoinlineAttr>(getContext()))
---
> if (D->hasAttr<NoinlineAttr>())
359c367
< if (D->hasAttr<UsedAttr>(getContext()))
---
> if (D->hasAttr<UsedAttr>())
362c370
< if (const SectionAttr *SA = D->getAttr<SectionAttr>(getContext()))
---
> if (const SectionAttr *SA = D->getAttr<SectionAttr>())
386c394
< if (FD->hasAttr<DLLImportAttr>(getContext())) {
---
> if (FD->hasAttr<DLLImportAttr>()) {
388,389c396,397
< } else if (FD->hasAttr<WeakAttr>(getContext()) ||
< FD->hasAttr<WeakImportAttr>(getContext())) {
---
> } else if (FD->hasAttr<WeakAttr>() ||
> FD->hasAttr<WeakImportAttr>()) {
397c405
< if (const SectionAttr *SA = FD->getAttr<SectionAttr>(getContext()))
---
> if (const SectionAttr *SA = FD->getAttr<SectionAttr>())
511c519
< if (Features.EmitAllDecls || Global->hasAttr<UsedAttr>(getContext()))
---
> if (Features.EmitAllDecls || Global->hasAttr<UsedAttr>())
516,517c524,525
< if (FD->hasAttr<ConstructorAttr>(getContext()) ||
< FD->hasAttr<DestructorAttr>(getContext()))
---
> if (FD->hasAttr<ConstructorAttr>() ||
> FD->hasAttr<DestructorAttr>())
541c549
< if (Global->hasAttr<AliasAttr>(getContext()))
---
> if (Global->hasAttr<AliasAttr>())
730,731c738,739
< if (D->hasAttr<WeakAttr>(getContext()) ||
< D->hasAttr<WeakImportAttr>(getContext()))
---
> if (D->hasAttr<WeakAttr>() ||
> D->hasAttr<WeakImportAttr>())
851c859
< if (const AnnotateAttr *AA = D->getAttr<AnnotateAttr>(getContext())) {
---
> if (const AnnotateAttr *AA = D->getAttr<AnnotateAttr>()) {
864c872
< else if (D->hasAttr<DLLImportAttr>(getContext()))
---
> else if (D->hasAttr<DLLImportAttr>())
866c874
< else if (D->hasAttr<DLLExportAttr>(getContext()))
---
> else if (D->hasAttr<DLLExportAttr>())
868c876
< else if (D->hasAttr<WeakAttr>(getContext()))
---
> else if (D->hasAttr<WeakAttr>())
1031c1039
< if (const ConstructorAttr *CA = D->getAttr<ConstructorAttr>(getContext()))
---
> if (const ConstructorAttr *CA = D->getAttr<ConstructorAttr>())
1033c1041
< if (const DestructorAttr *DA = D->getAttr<DestructorAttr>(getContext()))
---
> if (const DestructorAttr *DA = D->getAttr<DestructorAttr>())
1038c1046
< const AliasAttr *AA = D->getAttr<AliasAttr>(getContext());
---
> const AliasAttr *AA = D->getAttr<AliasAttr>();
1094c1102
< if (D->hasAttr<DLLExportAttr>(getContext())) {
---
> if (D->hasAttr<DLLExportAttr>()) {
1097c1105
< if (FD->getBody(getContext()))
---
> if (FD->getBody())
1102,1103c1110,1111
< } else if (D->hasAttr<WeakAttr>(getContext()) ||
< D->hasAttr<WeakImportAttr>(getContext())) {
---
> } else if (D->hasAttr<WeakAttr>() ||
> D->hasAttr<WeakImportAttr>()) {
1257c1265
< RecordDecl::field_iterator Field = CFRD->field_begin(getContext());
---
> RecordDecl::field_iterator Field = CFRD->field_begin();
1427,1428c1435
< i = D->propimpl_begin(getContext()),
< e = D->propimpl_end(getContext()); i != e; ++i) {
---
> i = D->propimpl_begin(), e = D->propimpl_end(); i != e; ++i) {
1440c1447
< if (!D->getInstanceMethod(getContext(), PD->getGetterName()))
---
> if (!D->getInstanceMethod(PD->getGetterName()))
1444c1451
< !D->getInstanceMethod(getContext(), PD->getSetterName()))
---
> !D->getInstanceMethod(PD->getSetterName()))
1453,1454c1460
< for (RecordDecl::decl_iterator I = ND->decls_begin(getContext()),
< E = ND->decls_end(getContext());
---
> for (RecordDecl::decl_iterator I = ND->decls_begin(), E = ND->decls_end();
1466,1467c1472
< for (RecordDecl::decl_iterator I = LSD->decls_begin(getContext()),
< E = LSD->decls_end(getContext());
---
> for (RecordDecl::decl_iterator I = LSD->decls_begin(), E = LSD->decls_end();
1479a1485,1488
> // Ignore dependent declarations.
> if (D->getDeclContext() && D->getDeclContext()->isDependentContext())
> return;
>
1482a1492,1497
> // Skip function templates
> if (cast<FunctionDecl>(D)->getDescribedFunctionTemplate())
> return;
>
> // Fall through
>
1492a1508,1509
> case Decl::ClassTemplate:
> case Decl::FunctionTemplate:
1533c1550
< if (OMD->getBody(getContext()))
---
> if (OMD->getBody())