llvm.org GIT mirror llvm / 97bf57d
Also verify llvm.compiler_used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180020 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 7 years ago
2 changed file(s) with 8 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
448448 }
449449 }
450450
451 if (GV.hasName() && (GV.getName() == "llvm.used")) {
451 if (GV.hasName() && (GV.getName() == "llvm.used" ||
452 GV.getName() == "llvm.compiler_used")) {
452453 Assert1(!GV.hasInitializer() || GV.hasAppendingLinkage(),
453454 "invalid linkage for intrinsic global variable", &GV);
454455 Type *GVType = GV.getType()->getElementType();
0 ; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s
1
2 @llvm.compiler_used = appending global [1 x i32] [i32 0], section "llvm.metadata"
3
4 ; CHECK: wrong type for intrinsic global variable
5 ; CHECK-NEXT: [1 x i32]* @llvm.compiler_used