<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 15, 2015 at 7:35 PM, David Li <span dir="ltr"><<a href="mailto:davidxl@google.com" target="_blank" class="cremed">davidxl@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">davidxl added inline comments.<br>
<br>
================<br>
Comment at: include/llvm/ProfileData/SampleProf.h:299<br>
@@ +298,3 @@<br>
+ addTotalSamples(Other.getTotalSamples(), Weight);<br>
+ if (AddTotalSamplesResult != sampleprof_error::success)<br>
+ Result = AddTotalSamplesResult;<br>
----------------<br>
May be introducing a macro for the repeated patterns:<br>
<br>
#define SET_RESULT(R, FinalR) \<br>
if (R != ....) \<br>
FinalR = R;<br>
<br></blockquote><div><br></div><div>No, please. Not a macro. An inline function.</div></div></div></div>