Introduce SPIR calling conventions.
authorSameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com>
Tue, 20 Jan 2015 06:44:32 +0000 (06:44 +0000)
committerSameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com>
Tue, 20 Jan 2015 06:44:32 +0000 (06:44 +0000)
commit450a58b8afbc1790bb58412de5bf0eaa9c599666
treed283328cd3c84234f28de0a90d657dd43776342a
parent0b0f4660faa5072aa5f75560722f224b9712629c
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: 226548
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