mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 22:36:06 +00:00
[OpenACC] Add Compute Context Serialization test, fix a bug
While working on a followup patch, I discovered we didn't serialize/deserialize the Compute Context properly, so this patch fixes it, then adds a PCH mode to the ast test.
This commit is contained in:
parent
abfac563f5
commit
c54e0524ee
@ -2805,7 +2805,7 @@ void ASTStmtReader::VisitOpenACCAssociatedStmtConstruct(
|
||||
|
||||
void ASTStmtReader::VisitOpenACCComputeConstruct(OpenACCComputeConstruct *S) {
|
||||
VisitStmt(S);
|
||||
VisitOpenACCConstructStmt(S);
|
||||
VisitOpenACCAssociatedStmtConstruct(S);
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -2855,7 +2855,7 @@ void ASTStmtWriter::VisitOpenACCAssociatedStmtConstruct(
|
||||
|
||||
void ASTStmtWriter::VisitOpenACCComputeConstruct(OpenACCComputeConstruct *S) {
|
||||
VisitStmt(S);
|
||||
VisitOpenACCConstructStmt(S);
|
||||
VisitOpenACCAssociatedStmtConstruct(S);
|
||||
Code = serialization::STMT_OPENACC_COMPUTE_CONSTRUCT;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,12 @@
|
||||
// RUN: %clang_cc1 %s -fopenacc -ast-dump | FileCheck %s
|
||||
|
||||
// Test this with PCH.
|
||||
// RUN: %clang_cc1 %s -fopenacc -emit-pch -o %t %s
|
||||
// RUN: %clang_cc1 %s -fopenacc -include-pch %t -ast-dump-all | FileCheck %s
|
||||
|
||||
#ifndef PCH_HELPER
|
||||
#define PCH_HELPER
|
||||
|
||||
void NormalFunc() {
|
||||
// FIXME: Add a test once we have clauses for this.
|
||||
// CHECK-LABEL: NormalFunc
|
||||
@ -104,3 +111,5 @@ struct S {
|
||||
void use() {
|
||||
TemplFunc<S>();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user