Skip to content

Commit

Permalink
[CIR][CodeGen][NFC] Break the missing feature flag for OpenCL into sm…
Browse files Browse the repository at this point in the history
…aller pieces (llvm#902)

The missing feature flag for OpenCL has very few occurrences now. This
PR rearranges them into proper pieces to better track them.
  • Loading branch information
seven-mile authored and smeenai committed Oct 9, 2024
1 parent 272bc3b commit 1c05171
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clang/include/clang/CIR/MissingFeatures.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ struct MissingFeatures {
static bool CGFPOptionsRAII() { return false; }
static bool getFPFeaturesInEffect() { return false; }
static bool cxxABI() { return false; }
static bool openCL() { return false; }
static bool openCLCXX() { return false; }
static bool openCLBuiltinTypes() { return false; }
static bool CUDA() { return false; }
static bool openMP() { return false; }
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/CIR/CodeGen/CIRGenCXX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ static void buildDeclDestroy(CIRGenFunction &CGF, const VarDecl *D) {
if (Record && (CanRegisterDestructor || UsingExternalHelper)) {
assert(!D->getTLSKind() && "TLS NYI");
assert(!Record->hasTrivialDestructor());
assert(!MissingFeatures::openCL());
assert(!MissingFeatures::openCLCXX());
CXXDestructorDecl *Dtor = Record->getDestructor();
// In LLVM OG codegen this is done in registerGlobalDtor, but CIRGen
// relies on LoweringPrepare for further decoupling, so build the
Expand Down
1 change: 0 additions & 1 deletion clang/lib/CIR/CodeGen/CIRGenDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ CIRGenFunction::AutoVarEmission
CIRGenFunction::buildAutoVarAlloca(const VarDecl &D,
mlir::OpBuilder::InsertPoint ip) {
QualType Ty = D.getType();
assert(!MissingFeatures::openCL());
assert(
Ty.getAddressSpace() == LangAS::Default ||
(Ty.getAddressSpace() == LangAS::opencl_private && getLangOpts().OpenCL));
Expand Down

0 comments on commit 1c05171

Please sign in to comment.