[PATCH] D24587: Output optimization remarks in YAML
Hal Finkel via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 26 14:30:40 PDT 2016
hfinkel added a comment.
In https://reviews.llvm.org/D24587#553036, @anemet wrote:
> In https://reviews.llvm.org/D24587#552967, @hfinkel wrote:
>
> > I'm glad you liked by suggestion for 'NV', because it is easy to type, but I do wonder if we'll have any issues because 'NV' is currently used as a variable name in a number of places. Having variable/type shadowing can certainly be confusing. What do you think?
>
>
> I was worried about the same thing but I haven't started propagating this pattern yet so I don't know if we hit something.
>
> My backup solution is creating a small namespace for NV and perhaps IsVerbose, something like "ore". Then you'd have to qualify NV:
>
> ORE.emit(DiagnosticInfoOptimizationRemarkMissed( DEBUG_TYPE, "NotInlined", &I)
> << ore::NV("Callee", Callee) << " will not be inlined into "
> << ore::NV("Caller", CS.getCaller())
> << ore::setIsVerbose());
>
>
> What do you think? Another option I was thinking is using std::make_pair directly.
Using ore:: seems safer. That's a good option. I don't like std::make_pair, it is pretty long, and implies something about the implementation we might later wish to change.
https://reviews.llvm.org/D24587
More information about the llvm-commits
mailing list