summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Verifier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r--llvm/lib/IR/Verifier.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 7eea5170b94..980cb7746ec 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -698,15 +698,10 @@ void Verifier::visitGlobalAlias(const GlobalAlias &GA) {
}
void Verifier::visitNamedMDNode(const NamedMDNode &NMD) {
- // There used to be various other llvm.dbg.* nodes, but we don't support
- // upgrading them and we want to reserve the namespace for future uses.
- if (NMD.getName().startswith("llvm.dbg."))
- AssertDI(NMD.getName() == "llvm.dbg.cu",
- "unrecognized named metadata node in the llvm.dbg namespace",
- &NMD);
for (const MDNode *MD : NMD.operands()) {
- if (NMD.getName() == "llvm.dbg.cu")
+ if (NMD.getName() == "llvm.dbg.cu") {
AssertDI(MD && isa<DICompileUnit>(MD), "invalid compile unit", &NMD, MD);
+ }
if (!MD)
continue;
OpenPOWER on IntegriCloud