Skip to content

Commit c361a95

Browse files
author
iclsrc
committed
Merge from 'sycl' to 'sycl-web' (5 commits)
2 parents a8590e2 + e73f1f6 commit c361a95

File tree

80 files changed

+4886
-4636
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+4886
-4636
lines changed

clang/lib/Basic/Targets/SPIR.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ void SPIR64TargetInfo::getTargetDefines(const LangOptions &Opts,
5959
void BaseSPIRVTargetInfo::getTargetDefines(const LangOptions &Opts,
6060
MacroBuilder &Builder) const {
6161
DefineStd(Builder, "SPIRV", Opts);
62-
DefineStd(Builder, "spirv", Opts);
6362
}
6463

6564
void SPIRVTargetInfo::getTargetDefines(const LangOptions &Opts,

clang/lib/CodeGen/TargetBuiltins/X86.cpp

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,10 @@ static Value *getMaskVecValue(CodeGenFunction &CGF, Value *Mask,
7474
}
7575
return MaskVec;
7676
}
77-
// static Value *EmitX86MaskedStore(CodeGenFunction &CGF, ArrayRef<Value *> Ops,
78-
// Align Alignment) {
79-
// Value *Ptr = CGF.Builder.CreateAddrSpaceCast(
80-
// Ops[0], llvm::PointerType::getUnqual(Ops[1]->getType()));
81-
82-
// Value *MaskVec = getMaskVecValue(
83-
// CGF, Ops[2],
84-
// cast<llvm::FixedVectorType>(Ops[1]->getType())->getNumElements());
85-
86-
// return CGF.Builder.CreateMaskedStore(Ops[1], Ptr, Alignment, MaskVec);
87-
// }
8877
static Value *EmitX86MaskedStore(CodeGenFunction &CGF, ArrayRef<Value *> Ops,
8978
Align Alignment) {
90-
Value *Ptr = Ops[0];
79+
Value *Ptr = CGF.Builder.CreateAddrSpaceCast(
80+
Ops[0], llvm::PointerType::getUnqual(Ops[1]->getType()));
9181

9282
Value *MaskVec = getMaskVecValue(
9383
CGF, Ops[2],
@@ -99,7 +89,8 @@ static Value *EmitX86MaskedStore(CodeGenFunction &CGF, ArrayRef<Value *> Ops,
9989
static Value *EmitX86MaskedLoad(CodeGenFunction &CGF, ArrayRef<Value *> Ops,
10090
Align Alignment) {
10191
llvm::Type *Ty = Ops[1]->getType();
102-
Value *Ptr = Ops[0];
92+
Value *Ptr = CGF.Builder.CreateAddrSpaceCast(
93+
Ops[0], llvm::PointerType::getUnqual(Ops[1]->getType()));
10394

10495
Value *MaskVec = getMaskVecValue(
10596
CGF, Ops[2], cast<llvm::FixedVectorType>(Ty)->getNumElements());

clang/lib/Driver/Driver.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2713,7 +2713,11 @@ int Driver::ExecuteCompilation(
27132713
// Remove result files if we're not saving temps.
27142714
if (!isSaveTempsEnabled()) {
27152715
const JobAction *JA = cast<JobAction>(&FailingCommand->getSource());
2716-
C.CleanupFileMap(C.getResultFiles(), JA, true);
2716+
// When performing offload compilations, the result files may not match
2717+
// the JobAction that fails. In that case, do not pass in the JobAction
2718+
// to allow for the proper resulting file to be removed upon failure.
2719+
C.CleanupFileMap(C.getResultFiles(),
2720+
C.getActiveOffloadKinds() ? nullptr : JA, true);
27172721

27182722
// Failure result files are valid unless we crashed.
27192723
if (CommandRes < 0)

clang/test/AST/ast-attr-add-ir-annotations-pack.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void InstantiateClassWithAnnotFieldTemplates() {
5353
// CHECK-NEXT: ConstantExpr {{.*}} 'const char[6]' lvalue
5454
// CHECK-NEXT: value: LValue
5555
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr3"
56-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
56+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'int'
5757
// CHECK-NEXT: DeclRefExpr {{.*}} 'int' NonTypeTemplateParm {{.*}} 'Is' 'int'
5858
// CHECK-NEXT: ClassTemplateSpecializationDecl {{.*}} struct ClassWithAnnotFieldTemplate1 definition
5959
// CHECK-NEXT: DefinitionData
@@ -147,7 +147,7 @@ void InstantiateClassWithAnnotFieldTemplates() {
147147
// CHECK-NEXT: ConstantExpr {{.*}} 'const char[6]' lvalue
148148
// CHECK-NEXT: value: LValue
149149
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr3"
150-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
150+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'int'
151151
// CHECK-NEXT: DeclRefExpr {{.*}} 'int' NonTypeTemplateParm {{.*}} 'Is' 'int'
152152
// CHECK-NEXT: ClassTemplateSpecializationDecl {{.*}} struct ClassWithAnnotFieldTemplate2 definition
153153
// CHECK-NEXT: DefinitionData
@@ -232,7 +232,7 @@ void InstantiateClassWithAnnotFieldTemplates() {
232232
// CHECK-NEXT: CXXRecordDecl {{.*}} implicit struct ClassWithAnnotFieldTemplate3
233233
// CHECK-NEXT: FieldDecl {{.*}} ptr 'int *'
234234
// CHECK-NEXT: SYCLAddIRAnnotationsMemberAttr
235-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
235+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'const char *'
236236
// CHECK-NEXT: DeclRefExpr {{.*}} 'const char *' NonTypeTemplateParm {{.*}} 'Names' 'const char *'
237237
// CHECK-NEXT: ConstantExpr {{.*}} 'int'
238238
// CHECK-NEXT: value: Int 1
@@ -334,7 +334,7 @@ void InstantiateClassWithAnnotFieldTemplates() {
334334
// CHECK-NEXT: InitListExpr {{.*}} 'void'
335335
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr1"
336336
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr3"
337-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
337+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'const char *'
338338
// CHECK-NEXT: DeclRefExpr {{.*}} 'const char *' NonTypeTemplateParm {{.*}} 'Names' 'const char *'
339339
// CHECK-NEXT: ConstantExpr {{.*}} 'int'
340340
// CHECK-NEXT: value: Int 1
@@ -436,7 +436,7 @@ void InstantiateClassWithAnnotFieldTemplates() {
436436
// CHECK-NEXT: CXXRecordDecl {{.*}} implicit struct ClassWithAnnotFieldTemplate5
437437
// CHECK-NEXT: FieldDecl {{.*}} ptr 'int *'
438438
// CHECK-NEXT: SYCLAddIRAnnotationsMemberAttr
439-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
439+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'const char *'
440440
// CHECK-NEXT: DeclRefExpr {{.*}} 'const char *' NonTypeTemplateParm {{.*}} 'Strs' 'const char *'
441441
// CHECK-NEXT: ClassTemplateSpecializationDecl {{.*}} struct ClassWithAnnotFieldTemplate5 definition
442442
// CHECK-NEXT: DefinitionData
@@ -636,7 +636,7 @@ void InstantiateClassWithAnnotFieldTemplates() {
636636
// CHECK-NEXT: InitListExpr {{.*}} 'void'
637637
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr1"
638638
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr3"
639-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
639+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'const char *'
640640
// CHECK-NEXT: DeclRefExpr {{.*}} 'const char *' NonTypeTemplateParm {{.*}} 'Strs' 'const char *'
641641
// CHECK-NEXT: ClassTemplateSpecializationDecl {{.*}} struct ClassWithAnnotFieldTemplate6 definition
642642
// CHECK-NEXT: DefinitionData

clang/test/AST/ast-attr-add-ir-attributes-packs.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void InstantiateFunctionTemplates() {
3232
// CHECK-NEXT: ConstantExpr {{.*}} 'const char[6]' lvalue
3333
// CHECK-NEXT: value: LValue
3434
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr3"
35-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
35+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'int'
3636
// CHECK-NEXT: DeclRefExpr {{.*}} 'int' NonTypeTemplateParm {{.*}} 'Is' 'int'
3737
// CHECK-NEXT: FunctionDecl {{.*}} used FunctionTemplate1 'void ()'
3838
// CHECK-NEXT: TemplateArgument pack
@@ -90,7 +90,7 @@ void InstantiateFunctionTemplates() {
9090
// CHECK-NEXT: ConstantExpr {{.*}} 'const char[6]' lvalue
9191
// CHECK-NEXT: value: LValue
9292
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr3"
93-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
93+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'int'
9494
// CHECK-NEXT: DeclRefExpr {{.*}} 'int' NonTypeTemplateParm {{.*}} 'Is' 'int'
9595
// CHECK-NEXT: FunctionDecl {{.*}} used FunctionTemplate2 'void ()'
9696
// CHECK-NEXT: TemplateArgument pack
@@ -139,7 +139,7 @@ void InstantiateFunctionTemplates() {
139139
// CHECK-NEXT: FunctionDecl {{.*}} FunctionTemplate3 'void ()'
140140
// CHECK-NEXT: CompoundStmt
141141
// CHECK-NEXT: SYCLAddIRAttributesFunctionAttr
142-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
142+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'const char *'
143143
// CHECK-NEXT: DeclRefExpr {{.*}} 'const char *' NonTypeTemplateParm {{.*}} 'Names' 'const char *'
144144
// CHECK-NEXT: ConstantExpr {{.*}} 'int'
145145
// CHECK-NEXT: value: Int 1
@@ -205,7 +205,7 @@ void InstantiateFunctionTemplates() {
205205
// CHECK-NEXT: InitListExpr {{.*}} 'void'
206206
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr1"
207207
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr3"
208-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
208+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'const char *'
209209
// CHECK-NEXT: DeclRefExpr {{.*}} 'const char *' NonTypeTemplateParm {{.*}} 'Names' 'const char *'
210210
// CHECK-NEXT: ConstantExpr {{.*}} 'int'
211211
// CHECK-NEXT: value: Int 1
@@ -271,7 +271,7 @@ void InstantiateFunctionTemplates() {
271271
// CHECK-NEXT: FunctionDecl {{.*}} FunctionTemplate5 'void ()'
272272
// CHECK-NEXT: CompoundStmt
273273
// CHECK-NEXT: SYCLAddIRAttributesFunctionAttr
274-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
274+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'const char *'
275275
// CHECK-NEXT: DeclRefExpr {{.*}} 'const char *' NonTypeTemplateParm {{.*}} 'Strs' 'const char *'
276276
// CHECK-NEXT: FunctionDecl {{.*}} used FunctionTemplate5 'void ()'
277277
// CHECK-NEXT: TemplateArgument pack
@@ -407,7 +407,7 @@ void InstantiateFunctionTemplates() {
407407
// CHECK-NEXT: InitListExpr {{.*}} 'void'
408408
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr1"
409409
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr3"
410-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
410+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'const char *'
411411
// CHECK-NEXT: DeclRefExpr {{.*}} 'const char *' NonTypeTemplateParm {{.*}} 'Strs' 'const char *'
412412
// CHECK-NEXT: FunctionDecl {{.*}} used FunctionTemplate6 'void ()'
413413
// CHECK-NEXT: TemplateArgument pack
@@ -572,7 +572,7 @@ template <const char *...Strs> struct [[__sycl_detail__::add_ir_attributes_globa
572572
// CHECK-NEXT: ConstantExpr {{.*}} 'const char[6]' lvalue
573573
// CHECK-NEXT: value: LValue
574574
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr3"
575-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
575+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'int'
576576
// CHECK-NEXT: DeclRefExpr {{.*}} 'int' NonTypeTemplateParm {{.*}} 'Is' 'int'
577577
// CHECK-NEXT: CXXRecordDecl {{.*}} implicit struct GlobalVarStructTemplate1
578578
// CHECK-NEXT: ClassTemplateSpecializationDecl {{.*}} struct GlobalVarStructTemplate1 definition
@@ -663,7 +663,7 @@ GlobalVarStructTemplate1<1, 2> InstantiatedGV2;
663663
// CHECK-NEXT: ConstantExpr {{.*}} 'const char[6]' lvalue
664664
// CHECK-NEXT: value: LValue
665665
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr3"
666-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
666+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'int'
667667
// CHECK-NEXT: DeclRefExpr {{.*}} 'int' NonTypeTemplateParm {{.*}} 'Is' 'int'
668668
// CHECK-NEXT: CXXRecordDecl {{.*}} implicit struct GlobalVarStructTemplate2
669669
// CHECK-NEXT: ClassTemplateSpecializationDecl {{.*}} struct GlobalVarStructTemplate2 definition
@@ -745,7 +745,7 @@ GlobalVarStructTemplate2<1, 2> InstantiatedGV4;
745745
// CHECK-NEXT: MoveAssignment
746746
// CHECK-NEXT: Destructor
747747
// CHECK-NEXT: SYCLAddIRAttributesGlobalVariableAttr
748-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
748+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'const char *'
749749
// CHECK-NEXT: DeclRefExpr {{.*}} 'const char *' NonTypeTemplateParm {{.*}} 'Names' 'const char *'
750750
// CHECK-NEXT: ConstantExpr {{.*}} 'int'
751751
// CHECK-NEXT: value: Int 1
@@ -844,7 +844,7 @@ GlobalVarStructTemplate3<AttrName1, AttrName2> InstantiatedGV6;
844844
// CHECK-NEXT: InitListExpr {{.*}} 'void'
845845
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr1"
846846
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr3"
847-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
847+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'const char *'
848848
// CHECK-NEXT: DeclRefExpr {{.*}} 'const char *' NonTypeTemplateParm {{.*}} 'Names' 'const char *'
849849
// CHECK-NEXT: ConstantExpr {{.*}} 'int'
850850
// CHECK-NEXT: value: Int 1
@@ -943,7 +943,7 @@ GlobalVarStructTemplate4<AttrName1, AttrName2> InstantiatedGV8;
943943
// CHECK-NEXT: MoveAssignment
944944
// CHECK-NEXT: Destructor
945945
// CHECK-NEXT: SYCLAddIRAttributesGlobalVariableAttr
946-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
946+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'const char *'
947947
// CHECK-NEXT: DeclRefExpr {{.*}} 'const char *' NonTypeTemplateParm {{.*}} 'Strs' 'const char *'
948948
// CHECK-NEXT: CXXRecordDecl {{.*}} implicit struct GlobalVarStructTemplate5
949949
// CHECK-NEXT: ClassTemplateSpecializationDecl {{.*}} struct GlobalVarStructTemplate5 definition
@@ -1138,7 +1138,7 @@ GlobalVarStructTemplate5<AttrName1, AttrName2, AttrName3, AttrVal1, AttrVal2> In
11381138
// CHECK-NEXT: InitListExpr {{.*}} 'void'
11391139
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr1"
11401140
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr3"
1141-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
1141+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'const char *'
11421142
// CHECK-NEXT: DeclRefExpr {{.*}} 'const char *' NonTypeTemplateParm {{.*}} 'Strs' 'const char *'
11431143
// CHECK-NEXT: CXXRecordDecl {{.*}} implicit struct GlobalVarStructTemplate6
11441144
// CHECK-NEXT: ClassTemplateSpecializationDecl {{.*}} struct GlobalVarStructTemplate6 definition
@@ -1372,7 +1372,7 @@ void InstantiateSpecialClassStructTemplates() {
13721372
// CHECK-NEXT: ConstantExpr {{.*}} 'const char[6]' lvalue
13731373
// CHECK-NEXT: value: LValue
13741374
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr3"
1375-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
1375+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'int'
13761376
// CHECK-NEXT: DeclRefExpr {{.*}} 'int' NonTypeTemplateParm {{.*}} 'Is' 'int'
13771377
// CHECK-NEXT: CompoundStmt
13781378
// CHECK-NEXT: ClassTemplateSpecializationDecl {{.*}} struct SpecialClassStructTemplate1 definition
@@ -1473,7 +1473,7 @@ void InstantiateSpecialClassStructTemplates() {
14731473
// CHECK-NEXT: ConstantExpr {{.*}} 'const char[6]' lvalue
14741474
// CHECK-NEXT: value: LValue
14751475
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr3"
1476-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
1476+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'int'
14771477
// CHECK-NEXT: DeclRefExpr {{.*}} 'int' NonTypeTemplateParm {{.*}} 'Is' 'int'
14781478
// CHECK-NEXT: CompoundStmt
14791479
// CHECK-NEXT: ClassTemplateSpecializationDecl {{.*}} struct SpecialClassStructTemplate2 definition
@@ -1565,7 +1565,7 @@ void InstantiateSpecialClassStructTemplates() {
15651565
// CHECK-NEXT: CXXMethodDecl {{.*}} __init 'void (int)'
15661566
// CHECK-NEXT: ParmVarDecl {{.*}} x 'int'
15671567
// CHECK-NEXT: SYCLAddIRAttributesKernelParameterAttr
1568-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
1568+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'const char *'
15691569
// CHECK-NEXT: DeclRefExpr {{.*}} 'const char *' NonTypeTemplateParm {{.*}} 'Names' 'const char *'
15701570
// CHECK-NEXT: ConstantExpr {{.*}} 'int'
15711571
// CHECK-NEXT: value: Int 1
@@ -1674,7 +1674,7 @@ void InstantiateSpecialClassStructTemplates() {
16741674
// CHECK-NEXT: InitListExpr {{.*}} 'void'
16751675
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr1"
16761676
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr3"
1677-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
1677+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'const char *'
16781678
// CHECK-NEXT: DeclRefExpr {{.*}} 'const char *' NonTypeTemplateParm {{.*}} 'Names' 'const char *'
16791679
// CHECK-NEXT: ConstantExpr {{.*}} 'int'
16801680
// CHECK-NEXT: value: Int 1
@@ -1783,7 +1783,7 @@ void InstantiateSpecialClassStructTemplates() {
17831783
// CHECK-NEXT: CXXMethodDecl {{.*}} __init 'void (int)'
17841784
// CHECK-NEXT: ParmVarDecl {{.*}} x 'int'
17851785
// CHECK-NEXT: SYCLAddIRAttributesKernelParameterAttr
1786-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
1786+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'const char *'
17871787
// CHECK-NEXT: DeclRefExpr {{.*}} 'const char *' NonTypeTemplateParm {{.*}} 'Strs' 'const char *'
17881788
// CHECK-NEXT: CompoundStmt
17891789
// CHECK-NEXT: ClassTemplateSpecializationDecl {{.*}} struct SpecialClassStructTemplate5 definition
@@ -1994,7 +1994,7 @@ void InstantiateSpecialClassStructTemplates() {
19941994
// CHECK-NEXT: InitListExpr {{.*}} 'void'
19951995
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr1"
19961996
// CHECK-NEXT: StringLiteral {{.*}} 'const char[6]' lvalue "Attr3"
1997-
// CHECK-NEXT: PackExpansionExpr {{.*}} '<dependent type>'
1997+
// CHECK-NEXT: PackExpansionExpr {{.*}} 'const char *'
19981998
// CHECK-NEXT: DeclRefExpr {{.*}} 'const char *' NonTypeTemplateParm {{.*}} 'Strs' 'const char *'
19991999
// CHECK-NEXT: CompoundStmt
20002000
// CHECK-NEXT: ClassTemplateSpecializationDecl {{.*}} struct SpecialClassStructTemplate6 definition
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/// Verify object removal when the offload compilation fails.
2+
3+
// REQUIRES: system-linux
4+
5+
/// Force failure during device compilation
6+
// RUN: touch %t.o
7+
// RUN: not %clangxx -fsycl -Xsycl-target-frontend -DCOMPILE_FAIL=1 -c -o %t.o %s
8+
// RUN: not ls %t.o
9+
10+
// RUN: touch %t.o
11+
// RUN: not %clangxx --offload-new-driver -fsycl -Xsycl-target-frontend -DCOMPILE_FAIL=1 -c -o %t.o %s
12+
// RUN: not ls %t.o
13+
14+
/// Force failure during compilation
15+
// RUN: touch %t.o
16+
// RUN: not %clangxx -fsycl -DCOMPILE_FAIL=1 -c -o %t.o %s
17+
// RUN: not ls %t.o
18+
19+
// RUN: touch %t.o
20+
// RUN: not %clangxx --offload-new-driver -fsycl -DCOMPILE_FAIL=1 -c -o %t.o %s
21+
// RUN: not ls %t.o
22+
23+
void func(){};
24+
#ifdef COMPILE_FAIL
25+
#error FAIL
26+
#endif // COMPILE_FAIL

clang/test/Preprocessor/predefined-macros-hlsl.hlsl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
// RUN: %clang_cc1 %s -E -dM -o - -triple dxil-pc-shadermodel6.0-vertex | FileCheck -match-full-lines %s --check-prefixes=CHECK,VERTEX,NOHALF
1010
// RUN: %clang_cc1 %s -E -dM -o - -triple dxil-pc-shadermodel6.3-vertex -fnative-half-type | FileCheck -match-full-lines %s --check-prefixes=CHECK,VERTEX,HALF
1111

12-
// RUN: %clang_cc1 %s -E -dM -o - -triple spirv-unknown-vulkan-compute | FileCheck -match-full-lines %s --check-prefixes=CHECK,COMPUTE,NOHALF,SPIRV
13-
1412
// HALF: #define __HLSL_ENABLE_16_BIT 1
1513
// NOHALF-NOT: __HLSL_ENABLE_16_BIT
1614

@@ -36,8 +34,6 @@
3634
// PIXEL: #define __SHADER_TARGET_STAGE 0
3735
// VERTEX: #define __SHADER_TARGET_STAGE 1
3836

39-
// SPIRV: #define __spirv__ 1
40-
4137
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library %s -E -dM -o - -x hlsl -std=hlsl2015 2>&1 | FileCheck -match-full-lines %s --check-prefixes=STD2015
4238
// STD2015: warning: support for HLSL language version hlsl2015 is incomplete, recommend using hlsl202x instead
4339
// STD2015: #define __HLSL_VERSION 2015

clang/test/SemaSYCL/built-in-type-kernel-arg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,6 @@ int main() {
153153
// CHECK: CXXConstructExpr {{.*}} 'Nested::TDS':'test_struct_simple' 'void (const test_struct_simple &) noexcept'
154154
// CHECK: ImplicitCastExpr {{.*}} 'const test_struct_simple' lvalue <NoOp>
155155
// CHECK: UnaryOperator {{.*}} 'Nested::TDS':'test_struct_simple' lvalue prefix '*' cannot overflow
156-
// CHECK: CXXReinterpretCastExpr {{.*}} 'Nested::TDS *' reinterpret_cast<struct Nested::TDS *> <BitCast>
156+
// CHECK: CXXReinterpretCastExpr {{.*}} 'Nested::TDS *' reinterpret_cast<Nested::TDS *> <BitCast>
157157
// CHECK: UnaryOperator {{.*}} '__generated_test_struct_simple *' prefix '&' cannot overflow
158158
// CHECK: DeclRefExpr {{.*}} '__generated_test_struct_simple' lvalue ParmVar {{.*}} '_arg_tds' '__generated_test_struct_simple'

0 commit comments

Comments
 (0)