This is an archive of the discontinued LLVM Phabricator instance.

Also search BitcodeFiles for exclude-lib symbols
ClosedPublic

Authored by kongyi on Jul 2 2018, 4:25 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

kongyi created this revision.Jul 2 2018, 4:25 PM
kongyi added a reviewer: pcc.Jul 2 2018, 4:40 PM
srhines added a subscriber: srhines.Jul 2 2018, 4:47 PM
pcc added a comment.Jul 2 2018, 4:49 PM

Test case?

ELF/Driver.cpp
1164–1168 ↗(On Diff #153824)

Move this code into a lambda and call it from both places.

kongyi updated this revision to Diff 153841.Jul 2 2018, 6:19 PM
kongyi marked an inline comment as done.
ruiu added inline comments.Jul 5 2018, 12:00 PM
ELF/Driver.cpp
1156 ↗(On Diff #153841)

We don't need to give a long descriptive name for a local variable whose scope is narrow. Also, in LLVM/lld, local variables must be in CamelCase. I'd name this just Visit.

dexonsmith added inline comments.Jul 5 2018, 12:04 PM
ELF/Driver.cpp
1156 ↗(On Diff #153841)

Also, in LLVM/lld, local variables must be in CamelCase.

Given that this is a function-like object, I'd argue for lowerCamelCase here.

ruiu added subscribers: kongyi, pcc.Jul 5 2018, 12:28 PM

Is that part of our coding standard? In lld, all local variables holding
function-like objects are in CamelCase, not in camelCase.

Is that part of our coding standard? In lld, all local variables holding
function-like objects are in CamelCase, not in camelCase.

Last I checked the coding standard did not call out local variables that are function-like specifically. I've seen them both ways in LLVM, and I prefer aligning them with other functions than with local variables.

If lld is entirely consistent don't let me get in the way.

ruiu added a comment.Jul 5 2018, 12:55 PM

It may make sense to get a consensus and update the coding standard
document, as it is not entirely clear. If that's the case, I'd vote for
CamelCase. :)

It may make sense to get a consensus and update the coding standard
document, as it is not entirely clear. If that's the case, I'd vote for
CamelCase. :)

Way ahead of you :)
http://lists.llvm.org/pipermail/llvm-dev/2018-July/124466.html
https://reviews.llvm.org/D48991

(But let's not hold up this review on that bike-shed...)

kongyi updated this revision to Diff 154332.Jul 5 2018, 4:20 PM
kongyi marked an inline comment as done.
chh added a subscriber: chh.Jul 9 2018, 9:22 AM
ruiu accepted this revision.Jul 10 2018, 6:34 PM

LGTM

This revision is now accepted and ready to land.Jul 10 2018, 6:34 PM
This revision was automatically updated to reflect the committed changes.