Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OpenCL] Allow -std={cl|CL}{|1.1|1.2|2.0} in driver
Fix a regression which forbids using -std=cl|CL1.1|CL1.2|CL2.0 in driver. Allow -std and -cl-std={cl|CL}{|1.1|1.2|2.0}. Differential Revision: http://reviews.llvm.org/D20630 llvm-svn: 273015
- Loading branch information
Showing
4 changed files
with
54 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// RUN: %clang %s | ||
// RUN: %clang -std=cl %s | ||
// RUN: %clang -std=cl1.1 %s | ||
// RUN: %clang -std=cl1.2 %s | ||
// RUN: %clang -std=cl2.0 %s | ||
// RUN: %clang -std=CL %s | ||
// RUN: %clang -std=CL1.1 %s | ||
// RUN: %clang -std=CL1.2 %s | ||
// RUN: %clang -std=CL2.0 %s | ||
// RUN: not %clang_cc1 -std=c99 -DOPENCL %s 2>&1 | FileCheck --check-prefix=CHECK-C99 %s | ||
// RUN: not %clang_cc1 -std=invalid -DOPENCL %s 2>&1 | FileCheck --check-prefix=CHECK-INVALID %s | ||
// CHECK-C99: error: invalid argument '-std=c99' not allowed with 'OpenCL' | ||
// CHECK-INVALID: error: invalid value 'invalid' in '-std=invalid' | ||
|
||
kernel void func(void); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters