mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Also verify llvm.compiler_used.
llvm-svn: 180020
This commit is contained in:
parent
88a7961c64
commit
4a4fbbaf4e
@ -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…
x
Reference in New Issue
Block a user