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

Adrian Prantl aprantl at apple.com
Mon Dec 16 14:05:18 PST 2013


On Dec 16, 2013, at 11:58 AM, Manman Ren <manman.ren at gmail.com> wrote:

> 
> 
> 
> 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.

Sounds even better!

thanks,
Adrian



More information about the llvm-commits mailing list