[llvm] r196158 - Debug Info: drop debug info via upgrading path if version number does not match.

Manman Ren manman.ren at gmail.com
Mon Dec 16 11:58:50 PST 2013


On Fri, Dec 13, 2013 at 1:45 PM, Adrian Prantl <aprantl at apple.com> wrote:

> On Dec 2, 2013, at 13:29, Manman Ren <manman.ren at gmail.com> wrote:
> > Modified: llvm/trunk/lib/IR/DebugInfo.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=196158&r1=196157&r2=196158&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/lib/IR/AutoUpgrade.cpp (original)
> > +++ llvm/trunk/lib/IR/AutoUpgrade.cpp Mon Dec  2 15:29:56 2013
> > +/// Check the debug info version number, if it is out-dated, drop the
> debug
> > +/// info. Return true if module is modified.
> > +bool llvm::UpgradeDebugInfo(Module &M) {
> > +  if (getDebugInfoVersionFromModule(M) == DEBUG_METADATA_VERSION)
> > +    return false;
> > +
> > +  return StripDebugInfo(M);
> > +}
> >
> Hi Manman,
>
> sorry for commenting with such a delay.
> Can we somehow make this not just silently drop the debug info but print a
> warning or at least a DEBUG() message?
> Either here or in LLParser and BitCodeReader (which both seem to ignore
> the return value)?
>

Hi Adrian,

We are going to use Quentin's work on "Add warning capabilities in LLVM" to
emit warning messages.
Writing to errs() is not the right thing to do.

Thanks,
Manman


>
> thanks!
>   adrian
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131216/24a5bc46/attachment.html>


More information about the llvm-commits mailing list