[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)
Doug Wyatt via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 23 13:48:46 PDT 2024
================
@@ -3637,6 +3637,28 @@ FunctionProtoType::FunctionProtoType(QualType result, ArrayRef<QualType> params,
auto &EllipsisLoc = *getTrailingObjects<SourceLocation>();
EllipsisLoc = epi.EllipsisLoc;
}
+
+ if (!epi.FunctionEffects.empty()) {
+ auto &ExtraBits = *getTrailingObjects<FunctionTypeExtraBitfields>();
+ // TODO: bitfield overflow?
+ ExtraBits.NumFunctionEffects = epi.FunctionEffects.size();
+
+ ArrayRef<FunctionEffect> SrcFX = epi.FunctionEffects.effects();
+ auto *DestFX = getTrailingObjects<FunctionEffect>();
+ std::copy(SrcFX.begin(), SrcFX.end(), DestFX);
+
+ ArrayRef<FunctionEffectCondition> SrcConds =
+ epi.FunctionEffects.conditions();
+ if (!SrcConds.empty()) {
----------------
dougsonos wrote:
TODO: Clean up invariants -- if a non-empty vector signals a dependent expression, then when nulling a vector element, we should check to see if all elements are null and clear it if so.
https://github.com/llvm/llvm-project/pull/84983
More information about the cfe-commits
mailing list