[cfe-commits] r101953 - /cfe/trunk/lib/AST/Decl.cpp

Fariborz Jahanian fjahanian at apple.com
Tue Apr 20 16:24:42 PDT 2010


On Apr 20, 2010, at 4:15 PM, Ted Kremenek wrote:

> Author: kremenek
> Date: Tue Apr 20 18:15:35 2010
> New Revision: 101953
>
> URL: http://llvm.org/viewvc/llvm-project?rev=101953&view=rev
> Log:
> Specify linkage for Objective-C declarations.

This makes me uncomfortable. This looks like something you need to
move the indexer forward (your next patch). Maybe you need to add
a new psuedo_linkage for your purpose.

- Fariborz


>
>
> Modified:
>    cfe/trunk/lib/AST/Decl.cpp
>
> Modified: cfe/trunk/lib/AST/Decl.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=101953&r1=101952&r2=101953&view=diff
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/AST/Decl.cpp (original)
> +++ cfe/trunk/lib/AST/Decl.cpp Tue Apr 20 18:15:35 2010
> @@ -286,6 +286,29 @@
> }
>
> Linkage NamedDecl::getLinkage() const {
> +
> +  // Objective-C: treat all Objective-C declarations as having  
> external
> +  // linkage.
> +  switch (getKind()) {
> +    default:
> +      break;
> +    case Decl::ObjCAtDefsField:
> +    case Decl::ObjCCategory:
> +    case Decl::ObjCCategoryImpl:
> +    case Decl::ObjCClass:
> +    case Decl::ObjCCompatibleAlias:
> +    case Decl::ObjCContainer:
> +    case Decl::ObjCForwardProtocol:
> +    case Decl::ObjCImplementation:
> +    case Decl::ObjCInterface:
> +    case Decl::ObjCIvar:
> +    case Decl::ObjCMethod:
> +    case Decl::ObjCProperty:
> +    case Decl::ObjCPropertyImpl:
> +    case Decl::ObjCProtocol:
> +      return ExternalLinkage;
> +  }
> +
>   // Handle linkage for namespace-scope names.
>   if (getDeclContext()->getLookupContext()->isFileContext())
>     if (Linkage L = getLinkageForNamespaceScopeDecl(this))
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list