cchen added a comment. > One thing I wanted to do though is keep track of the constructs in the > OpenMPIRBuilder instead. So move the > > /// Vector of declare variant construct traits. > SmallVector<llvm::omp::TraitProperty, 8> ConstructTraits; > > into OpenMPIRBuilder and add/delete the things there. It's not a conceptual > difference but makes it easier > to opt-in for Flang later.
We don't have any OpenMPIRBuilder instance inside `SemaOpenMP` yet and the OpenMPIRBuilder constructor requires a `Module` parameter so I'm not sure how to achieve this, can you give me some suggestions? ================ Comment at: clang/lib/Sema/SemaOpenMP.cpp:737 + } + void eraseConstructTrait() { ConstructTraits.clear(); } + ---------------- jdoerfert wrote: > Modification was made to make it clear what happens but now I think this is > not needed. > > See below first. Maybe the interface should be > "handleConstructTrait(Property, bool Insert)" and if Insert is false you > verify it's the last one and delete it. You'd need to traverse them in > opposite order though to verify, unsure if verification is therefore strictly > necessary. For the delete part, I'm not sure how passing `Property` would work since I'm not deleting all the construct trait properties inside `ActOnOpenMPRegionEnd` function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109635/new/ https://reviews.llvm.org/D109635 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits