Skip to content

Commit

Permalink
support captures(none) instead of nocapture (#1165)
Browse files Browse the repository at this point in the history
  • Loading branch information
regehr authored Jan 31, 2025
1 parent 65902e0 commit 9ff342f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions llvm_util/llvm2alive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1570,8 +1570,11 @@ class llvm2alive_ : public llvm::InstVisitor<llvm2alive_, unique_ptr<Instr>> {
attrs.set(ParamAttrs::NonNull);
break;

case llvm::Attribute::NoCapture:
attrs.set(ParamAttrs::NoCapture);
case llvm::Attribute::Captures:
if (capturesNothing(llvmattr.getCaptureInfo().getOtherComponents()))
attrs.set(ParamAttrs::NoCapture);
else
errorAttr(llvmattr); // TODO: support other captures
break;

case llvm::Attribute::ReadOnly:
Expand Down

0 comments on commit 9ff342f

Please sign in to comment.