Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(12427)

Issue 6409051: Improve getSubprogramName in DebugInfo lib (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 9 months ago by samsonov
Modified:
11 years, 9 months ago
Reviewers:
bkramer
Base URL:
https://llvm.org/svn/llvm-project/llvm/trunk/
Visibility:
Public.

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -28 lines) Patch
M lib/DebugInfo/DWARFContext.cpp View 1 chunk +5 lines, -2 lines 2 comments Download
M lib/DebugInfo/DWARFDebugInfoEntry.h View 1 chunk +4 lines, -2 lines 0 comments Download
M lib/DebugInfo/DWARFDebugInfoEntry.cpp View 1 chunk +26 lines, -23 lines 2 comments Download
M test/DebugInfo/dwarfdump-test.test View 2 chunks +5 lines, -0 lines 0 comments Download
M test/DebugInfo/lit.local.cfg View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 2
bkramer
Minor stylistic issues, otherwise LGTM! http://codereview.appspot.com/6409051/diff/1/lib/DebugInfo/DWARFContext.cpp File lib/DebugInfo/DWARFContext.cpp (right): http://codereview.appspot.com/6409051/diff/1/lib/DebugInfo/DWARFContext.cpp#newcode161 lib/DebugInfo/DWARFContext.cpp:161: functionName = name; I'd ...
11 years, 9 months ago (2012-07-17 15:13:17 UTC) #1
samsonov
11 years, 9 months ago (2012-07-17 15:30:12 UTC) #2
http://codereview.appspot.com/6409051/diff/1/lib/DebugInfo/DWARFContext.cpp
File lib/DebugInfo/DWARFContext.cpp (right):

http://codereview.appspot.com/6409051/diff/1/lib/DebugInfo/DWARFContext.cpp#n...
lib/DebugInfo/DWARFContext.cpp:161: functionName = name;
On 2012/07/17 15:13:17, bkramer wrote:
> I'd prefer to have the variable declaration into the if
> 
> if (const char *name = function_die->getSubprogramName(cu))
>   functionName = name;

Done.

http://codereview.appspot.com/6409051/diff/1/lib/DebugInfo/DWARFDebugInfoEntr...
File lib/DebugInfo/DWARFDebugInfoEntry.cpp (right):

http://codereview.appspot.com/6409051/diff/1/lib/DebugInfo/DWARFDebugInfoEntr...
lib/DebugInfo/DWARFDebugInfoEntry.cpp:467: return name;
On 2012/07/17 15:13:17, bkramer wrote:
> Here, folding the name variable into the if would eliminate the double parens
> and it's easier to grasp the code as the variable lifetime is limited. There
are
> more instances of this below.

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b