mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-12 13:30:51 +00:00
Also verify llvm.compiler_used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180020 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cde25b435a
commit
97bf57d488
@ -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();
|
||||
|
6
test/Verifier/llvm.compiler_used-invalid-type.ll
Normal file
6
test/Verifier/llvm.compiler_used-invalid-type.ll
Normal file
@ -0,0 +1,6 @@
|
||||
; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s
|
||||
|
||||
@llvm.compiler_used = appending global [1 x i32] [i32 0], section "llvm.metadata"
|
||||
|
||||
; CHECK: wrong type for intrinsic global variable
|
||||
; CHECK-NEXT: [1 x i32]* @llvm.compiler_used
|
Loading…
Reference in New Issue
Block a user