Require members of llvm.used to be named.
The effect of llvm.used is to introduce an invisible reference, so this seems
a reasonable restriction. It will be used to provide an easy ordering of
the entries in llvm.used.
llvm-svn: 183743
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 41364b2..f8774bc 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -467,6 +467,7 @@
Assert1(
isa<GlobalVariable>(V) || isa<Function>(V) || isa<GlobalAlias>(V),
"invalid llvm.used member", V);
+ Assert1(V->hasName(), "members of llvm.used must be named", V);
}
}
}