1
0
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:
Rafael Espindola 2013-04-22 15:16:51 +00:00
parent 88a7961c64
commit 4a4fbbaf4e
2 changed files with 8 additions and 1 deletions

View File

@ -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();

View 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