[cfe-commits] r172316 - in /cfe/trunk: lib/AST/Decl.cpp test/SemaCXX/builtins.cpp

Rafael EspĂ­ndola rafael.espindola at gmail.com
Sat Jan 12 07:31:27 PST 2013


Sorry. I forgot to squash the git commits. The correct commit message was:

Give builtins C language linkage. This fixes llvm.org/pr14895.

On 12 January 2013 10:27, Rafael Espindola <rafael.espindola at gmail.com> wrote:
> Author: rafael
> Date: Sat Jan 12 09:27:43 2013
> New Revision: 172316
>
> URL: http://llvm.org/viewvc/llvm-project?rev=172316&view=rev
> Log:
> bar
>
> Modified:
>     cfe/trunk/lib/AST/Decl.cpp
>     cfe/trunk/test/SemaCXX/builtins.cpp
>
> Modified: cfe/trunk/lib/AST/Decl.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=172316&r1=172315&r2=172316&view=diff
> ==============================================================================
> --- cfe/trunk/lib/AST/Decl.cpp (original)
> +++ cfe/trunk/lib/AST/Decl.cpp Sat Jan 12 09:27:43 2013
> @@ -1761,6 +1761,9 @@
>  }
>
>  bool FunctionDecl::hasCLanguageLinkage() const {
> +  if (getBuiltinID())
> +    return true;
> +
>    return hasCLanguageLinkageTemplate(*this);
>  }
>
>
> Modified: cfe/trunk/test/SemaCXX/builtins.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/builtins.cpp?rev=172316&r1=172315&r2=172316&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaCXX/builtins.cpp (original)
> +++ cfe/trunk/test/SemaCXX/builtins.cpp Sat Jan 12 09:27:43 2013
> @@ -20,3 +20,7 @@
>  void f2() {
>    __builtin_isnan; // expected-error {{builtin functions must be directly called}}
>  }
> +
> +// pr14895
> +typedef __typeof(sizeof(int)) size_t;
> +extern "C" void *__builtin_alloca (size_t);
>
>
> _______________________________________________
> 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