-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
[NFC] Use references to avoid copying #110462
Changes from 7 commits
3f01499
d2d2b51
59dcac3
a6e6e75
9c35706
17808e7
138f49b
b835728
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -256,7 +256,7 @@ void IntrinsicEmitter::EmitIntrinsicToOverloadTable( | |
static constexpr uint8_t OTable[] = { | ||
0 | ||
)"; | ||
for (auto [I, Int] : enumerate(Ints)) { | ||
for (const auto [I, Int] : enumerate(Ints)) { | ||
// Add one to the index so we emit a null bit for the invalid #0 intrinsic. | ||
size_t Idx = I + 1; | ||
|
||
|
@@ -346,7 +346,7 @@ static constexpr {} IIT_Table[] = {{ | |
FixedEncodingTypeName); | ||
|
||
unsigned MaxOffset = 0; | ||
for (auto [Idx, FixedEncoding, Int] : enumerate(FixedEncodings, Ints)) { | ||
for (const auto [Idx, FixedEncoding, Int] : enumerate(FixedEncodings, Ints)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know why leaving
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it. It seems that we wont need to change anything in this PR. Closing this. |
||
if ((Idx & 7) == 7) | ||
OS << "\n "; | ||
|
||
|
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.
Given it is just a copy, do we still need
const
?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.
Removed
const