Page MenuHomePhabricator

[llvm] Non-functional change: declared a couple of local variables as const.
AcceptedPublic

Authored by tamur on Mar 21 2019, 1:31 PM.

Details

Reviewers
dblaikie

Event Timeline

tamur created this revision.Mar 21 2019, 1:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 21 2019, 1:31 PM
dblaikie added inline comments.
llvm/include/llvm/MC/MCContext.h
528 ↗(On Diff #191769)

This doesn't immediately make sense to me - 'find' probably (I haven't double checked the type of MCDwarfLineTablesCUMap to confirm this, but find on most containers works this way) returns an iterator by value. Binding that to a reference is a bit surprising/confusing/unnecessary (& relies on reference lifetime extension - a rarely used/subtle feature)

So probably don't make this change.

llvm/lib/MC/MCAsmStreamer.cpp
1914

Seems reasonable

tamur updated this revision to Diff 192245.Mar 25 2019, 9:48 PM
tamur marked an inline comment as done.Mar 25 2019, 9:49 PM

Reverted changes to llvm/MC/MCContext.h

dblaikie accepted this revision.Mar 25 2019, 9:54 PM

Looks good - thanks!

This revision is now accepted and ready to land.Mar 25 2019, 9:54 PM