-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[clang][x86][bytecode] remove trailing returns type from interp__builtin_elementwise_int_unaryop callbacks #163905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-clang Author: don (donneypr) ChangesThis was missed in my pr #162346 for #160288. Full diff: https://github.com/llvm/llvm-project/pull/163905.diff 1 Files Affected:
diff --git a/clang/lib/AST/ByteCode/InterpBuiltin.cpp b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
index 922d67940e22f..517c51a5f7de1 100644
--- a/clang/lib/AST/ByteCode/InterpBuiltin.cpp
+++ b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
@@ -3173,7 +3173,7 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call,
case Builtin::BI__builtin_ffsl:
case Builtin::BI__builtin_ffsll:
return interp__builtin_elementwise_int_unaryop(
- S, OpPC, Call, [](const APSInt &Val) {
+ S, OpPC, Call, [](const APSInt &Val) -> APInt {
return APInt(Val.getBitWidth(),
Val.isZero() ? 0u : Val.countTrailingZeros() + 1u);
});
|
… callbacks for uniformity
I've added it for the other callbacks in InterpBuiltin.cpp as well now |
case Builtin::BI__builtin_ffsll: | ||
return interp__builtin_elementwise_int_unaryop( | ||
S, OpPC, Call, [](const APSInt &Val) { | ||
S, OpPC, Call, [](const APSInt &Val) -> APInt { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the plan was to remove all of these things?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the misunderstanding, removed them in InterpBuiltin.cpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - cheers
Regarding the discussion in #162346, this PR is to remove the trailing type from the 'interp__builtin_elementwise_int_unaryop' callbacks.