diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/Debugify.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Debugify.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/Debugify.cpp b/llvm/lib/Transforms/Utils/Debugify.cpp index f2739a8..19c73f3 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); |