summaryrefslogtreecommitdiff
path: root/lib/IR
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-11 13:18:13 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-11 13:18:13 +0000
commit9f8e6da019a99960af59c79e17659dd2dba8433e (patch)
tree0981ff97bfa7fed1ddde2d439eb1b5d93e13b1d3 /lib/IR
parent6c921a55f4d5fc51a127fcc673ac1c9b46273899 (diff)
downloadllvm-9f8e6da019a99960af59c79e17659dd2dba8433e.tar.gz
llvm-9f8e6da019a99960af59c79e17659dd2dba8433e.tar.bz2
llvm-9f8e6da019a99960af59c79e17659dd2dba8433e.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183743 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR')
-rw-r--r--lib/IR/Verifier.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp
index 41364b2e6a..f8774bc3d9 100644
--- a/lib/IR/Verifier.cpp
+++ b/lib/IR/Verifier.cpp
@@ -467,6 +467,7 @@ void Verifier::visitGlobalVariable(GlobalVariable &GV) {
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);
}
}
}