
This is the first of a few patches that will do infrastructure work to enable the OpenACC lowering via the OpenACC dialect. At the moment this just gets the various function calls that will end up generating OpenACC, plus some tests to validate that we're doing the diagnostics in OpenACC specific locations. Additionally, this adds Stmt and Decl files for CIRGen.
35 lines
1.2 KiB
C++
35 lines
1.2 KiB
C++
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This contains code to emit Decl nodes as CIR code.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "CIRGenFunction.h"
|
|
#include "clang/AST/DeclOpenACC.h"
|
|
|
|
using namespace clang;
|
|
using namespace clang::CIRGen;
|
|
|
|
void CIRGenFunction::emitOpenACCDeclare(const OpenACCDeclareDecl &d) {
|
|
getCIRGenModule().errorNYI(d.getSourceRange(), "OpenACC Declare Construct");
|
|
}
|
|
|
|
void CIRGenFunction::emitOpenACCRoutine(const OpenACCRoutineDecl &d) {
|
|
getCIRGenModule().errorNYI(d.getSourceRange(), "OpenACC Routine Construct");
|
|
}
|
|
|
|
void CIRGenModule::emitGlobalOpenACCDecl(const OpenACCConstructDecl *d) {
|
|
if (isa<OpenACCRoutineDecl>(d))
|
|
errorNYI(d->getSourceRange(), "OpenACC Routine Construct");
|
|
else if (isa<OpenACCDeclareDecl>(d))
|
|
errorNYI(d->getSourceRange(), "OpenACC Declare Construct");
|
|
else
|
|
llvm_unreachable("unknown OpenACC declaration kind?");
|
|
}
|