mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
[Debugify] Do not require named metadata to be present when stripping
This allows -mir-strip-debug to be run without -debugify having run before.
This commit is contained in:
parent
5430d2dee2
commit
f74f9f2af9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user