Re-apply "r226548 - Introduce SPIR calling conventions" reverted in r226558.
authorAlexander Kornienko <alexfh@google.com>
Tue, 20 Jan 2015 11:20:41 +0000 (11:20 +0000)
committerAlexander Kornienko <alexfh@google.com>
Tue, 20 Jan 2015 11:20:41 +0000 (11:20 +0000)
commit21de0ae3d45ea34f924b5c8b19249852155d9929
tree38412fd21e4ede299c9bf7861005ea882aa31a39
parentaaf0b4cd57c609b33c2c12adc5d0ca109c8e6131
Re-apply "r226548 - Introduce SPIR calling conventions" reverted in r226558.

The test was fixed after a discussion with the revision author: the check
pattern was made more flexible as the "%call" part is not what we actually want
to check strictly there.

The original patch description:
===
Introduce SPIR calling conventions.

This implements Section 3.7 from the SPIR 1.2 spec:

    SPIR kernels should use "spir_kernel" calling convention.
    Non-kernel functions use "spir_func" calling convention. All
    other calling conventions are disallowed.

The patch works only for OpenCL source. Any other uses will need
to ensure that kernels are assigned the spir_kernel calling
convention correctly.
===

llvm-svn: 226561
clang/include/clang/Basic/Specifiers.h
clang/lib/AST/ASTContext.cpp
clang/lib/AST/Type.cpp
clang/lib/AST/TypePrinter.cpp
clang/lib/Basic/Targets.cpp
clang/lib/CodeGen/CGCall.cpp
clang/lib/Sema/SemaType.cpp
clang/test/CodeGenOpenCL/spir-calling-conv.cl [new file with mode: 0644]
clang/tools/libclang/CXType.cpp