danielcdh added inline comments.

================
Comment at: lib/CodeGen/CGDebugInfo.cpp:2743-2745
   if (LinkageName == Name || (!CGM.getCodeGenOpts().EmitGcovArcs &&
                               !CGM.getCodeGenOpts().EmitGcovNotes &&
+                              !CGM.getCodeGenOpts().ProfileDebug &&
----------------
echristo wrote:
> danielcdh wrote:
> > echristo wrote:
> > > Should we be encapsulating all of these for profile debug info? I.e. I 
> > > think coverage analysis is going to want the same things.
> > Do you mean that -fcoverage also implies -fprofile-debug?
> > 
> > I think the reason we introduce -fprofile-debug is that it has different 
> > requirments for debug info than coverage/sanitizer. E.g. we want to emit 
> > discriminator for -fprofile-debug, but not coverage/sanitizer.
> So, what are the differences here? I imagine that profile debugging will want 
> accurate source information. Perhaps we should hash this out in the thread 
> that dblaikie has started on llvm-dev.
The discussion about introducing this flag is in the thread of 
http://lists.llvm.org/pipermail/llvm-dev/2016-November/107645.html

Basically -fprofile-debug not only requires accurate source information, it 
also requires:

>> 1. emit linkage name in all subprograms
>> 2. emit discriminator with dup-factor copy-factor encoded
>> 3. use-unknown-locations=true

The above 3 items are not required by -fcoverage. That's why we introduce 
-fprofile-debug to record these extra debug info.


https://reviews.llvm.org/D25435



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to