[llvm] 2fa656c - [Debugify] Do not require named metadata to be present when stripping

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 13 15:16:47 PDT 2020


Sure, I've done that in 528a1c56d976.

> On Jul 13, 2020, at 3:00 PM, David Blaikie <dblaikie at gmail.com> wrote:
> 
> 
> 
> On Mon, Jul 13, 2020 at 2:41 PM <vsk at apple.com> wrote:
> Yikes, sorry I missed this as well.
> 
> https://reviews.llvm.org/D78411 introduced test changes which relied on the ability to strip debugify metadata even if module-level metadata is missing. This could use a more targeted test -- I've added one in e51c7fb842ee.
> 
> Great! Could you update the test to test something more specific than "does anything other than crash" - I guess checking the output is empty?
>  
> 
> vedant
> 
> 
> > On Jul 6, 2020, at 12:23 PM, David Blaikie <dblaikie at gmail.com> wrote:
> > 
> > Ping
> > 
> > On Mon, Apr 27, 2020 at 9:15 PM David Blaikie <dblaikie at gmail.com> wrote:
> >> 
> >> Should/could this have a test case?
> >> 
> >> On Wed, Apr 22, 2020 at 5:05 PM Vedant Kumar via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> >>> 
> >>> 
> >>> Author: Vedant Kumar
> >>> Date: 2020-04-22T17:03:39-07:00
> >>> New Revision: 2fa656cdfd836d5d3959466f05e44ae51bcded4e
> >>> 
> >>> URL: https://github.com/llvm/llvm-project/commit/2fa656cdfd836d5d3959466f05e44ae51bcded4e
> >>> DIFF: https://github.com/llvm/llvm-project/commit/2fa656cdfd836d5d3959466f05e44ae51bcded4e.diff
> >>> 
> >>> LOG: [Debugify] Do not require named metadata to be present when stripping
> >>> 
> >>> This allows -mir-strip-debug to be run without -debugify having run
> >>> before.
> >>> 
> >>> Added:
> >>> 
> >>> 
> >>> Modified:
> >>>    llvm/lib/Transforms/Utils/Debugify.cpp
> >>> 
> >>> Removed:
> >>> 
> >>> 
> >>> 
> >>> ################################################################################
> >>> diff  --git a/llvm/lib/Transforms/Utils/Debugify.cpp b/llvm/lib/Transforms/Utils/Debugify.cpp
> >>> index f2739a8257a2..19c73f3840fc 100644
> >>> --- a/llvm/lib/Transforms/Utils/Debugify.cpp
> >>> +++ b/llvm/lib/Transforms/Utils/Debugify.cpp
> >>> @@ -224,7 +224,8 @@ bool llvm::stripDebugifyMetadata(Module &M) {
> >>>   // Strip out the module-level Debug Info Version metadata.
> >>>   // FIXME: There must be an easier way to remove an operand from a NamedMDNode.
> >>>   NamedMDNode *NMD = M.getModuleFlagsMetadata();
> >>> -  assert(NMD && "debugify metadata present without Debug Info Version set?");
> >>> +  if (!NMD)
> >>> +    return Changed;
> >>>   SmallVector<MDNode *, 4> Flags;
> >>>   for (MDNode *Flag : NMD->operands())
> >>>     Flags.push_back(Flag);
> >>> 
> >>> 
> >>> 
> >>> _______________________________________________
> >>> llvm-commits mailing list
> >>> llvm-commits at lists.llvm.org
> >>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> 



More information about the llvm-commits mailing list