This is an archive of the discontinued LLVM Phabricator instance.

Save getArch() in a local var instead of calling it 20 times, etc.
ClosedPublic

Authored by dougk on Jun 3 2015, 2:39 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

dougk updated this revision to Diff 27063.Jun 3 2015, 2:39 PM
dougk retitled this revision from to Save getArch() in a local var instead of calling it 20 times, etc..
dougk updated this object.
dougk edited the test plan for this revision. (Show Details)
dougk added a subscriber: Unknown Object (MLST).
jroelofs accepted this revision.Jun 3 2015, 3:04 PM
jroelofs added a reviewer: jroelofs.
jroelofs added a subscriber: jroelofs.

LGTM with those fixes.

lib/Driver/Tools.cpp
1659 ↗(On Diff #27063)

const?

3880 ↗(On Diff #27063)

const?

7064 ↗(On Diff #27063)

const?

7769 ↗(On Diff #27063)

const?

7816 ↗(On Diff #27063)

return should be on next line.

7819 ↗(On Diff #27063)

return should be on next line.

7939 ↗(On Diff #27063)

why are you changing the format of this line?

This revision is now accepted and ready to land.Jun 3 2015, 3:04 PM
dougk updated this revision to Diff 27066.Jun 3 2015, 3:43 PM
dougk edited edge metadata.

add 'const', and fix format issues

lib/Driver/Tools.cpp
7816 ↗(On Diff #27063)

Done.

7819 ↗(On Diff #27063)

Done.

7939 ↗(On Diff #27063)

clang-format likes it this way. Should it be forced back the way it was?

jroelofs added inline comments.Jun 3 2015, 3:51 PM
lib/Driver/Tools.cpp
7939 ↗(On Diff #27063)

hmm, weird. I don't have a strong preference, so go with what clang-format is telling you.

This revision was automatically updated to reflect the committed changes.