summaryrefslogtreecommitdiff
path: root/lib/IR
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-04-22 15:16:51 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-04-22 15:16:51 +0000
commit97bf57d488a1bfcf7128cc2dbc695f6901ae9be7 (patch)
treec8b8ee8fee42bdb9d383d70682bc1943734dd0fa /lib/IR
parentcde25b435a907e7741da0c0d18953850936277c4 (diff)
downloadllvm-97bf57d488a1bfcf7128cc2dbc695f6901ae9be7.tar.gz
llvm-97bf57d488a1bfcf7128cc2dbc695f6901ae9be7.tar.bz2
llvm-97bf57d488a1bfcf7128cc2dbc695f6901ae9be7.tar.xz
Also verify llvm.compiler_used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180020 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR')
-rw-r--r--lib/IR/Verifier.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp
index f7aa79cca3..888090db61 100644
--- a/lib/IR/Verifier.cpp
+++ b/lib/IR/Verifier.cpp
@@ -449,7 +449,8 @@ void Verifier::visitGlobalVariable(GlobalVariable &GV) {
}
}
- if (GV.hasName() && (GV.getName() == "llvm.used")) {
+ if (GV.hasName() && (GV.getName() == "llvm.used" ||
+ GV.getName() == "llvm.compiler_used")) {
Assert1(!GV.hasInitializer() || GV.hasAppendingLinkage(),
"invalid linkage for intrinsic global variable", &GV);
Type *GVType = GV.getType()->getElementType();