[all-commits] [llvm/llvm-project] 820e0c: [clang][cli] Pass '-Wspir-compat' to cc1 from driver

Jan Svoboda via All-commits all-commits at lists.llvm.org
Mon Feb 22 00:55:37 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 820e0c49fc48024d8b426f4b10b50b5b5659a705
      https://github.com/llvm/llvm-project/commit/820e0c49fc48024d8b426f4b10b50b5b5659a705
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2021-02-22 (Mon, 22 Feb 2021)

  Changed paths:
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/test/Driver/opencl.cl
    M clang/test/SemaOpenCL/sampler_t.cl

  Log Message:
  -----------
  [clang][cli] Pass '-Wspir-compat' to cc1 from driver

This patch moves the creation of the '-Wspir-compat' argument from cc1 to the driver.

Without this change, generating command line arguments from `CompilerInvocation` cannot be done reliably: there's no way to distinguish whether '-Wspir-compat' was passed to cc1 on the command line (should be generated), or if it was created within `CompilerInvocation::CreateFromArgs` (should not be generated).

This is also in line with how other '-W' flags are handled.

(This was introduced in D21567.)

Reviewed By: Anastasia

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




More information about the All-commits mailing list