[all-commits] [llvm/llvm-project] cf3ef1: [OpenCL] Add builtin declarations by default.

Anastasia Stulova via All-commits all-commits at lists.llvm.org
Mon Feb 22 04:25:07 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cf3ef15a6ec5e5b45c6c54e8fbe3769255e815ce
      https://github.com/llvm/llvm-project/commit/cf3ef15a6ec5e5b45c6c54e8fbe3769255e815ce
  Author: Anastasia Stulova <anastasia.stulova at arm.com>
  Date:   2021-02-22 (Mon, 22 Feb 2021)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/include/clang/Driver/Types.h
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Driver/Types.cpp
    A clang/test/Driver/default-includes.cl
    M clang/unittests/AST/MatchVerifier.h

  Log Message:
  -----------
  [OpenCL] Add builtin declarations by default.

This change enables the builtin function declarations
in clang driver by default using the Tablegen solution
along with the implicit include of 'opencl-c-base.h'
header.

A new flag '-cl-no-stdinc' disabling all default
declarations and header includes is added. If any other
mechanisms were used to include the declarations (e.g.
with -Xclang -finclude-default-header) and the new default
approach is not sufficient the, `-cl-no-stdinc` flag has
to be used with clang to activate the old behavior.

Tags: #clang

Differential Revision: https://reviews.llvm.org/D96515




More information about the All-commits mailing list