Skip to content

Commit

Permalink
Revert "Verifier: Disallow uses of intrinsic global variables"
Browse files Browse the repository at this point in the history
This reverts commit b67c16f.
  • Loading branch information
tstellar committed Jan 28, 2023
1 parent c0e53ac commit 124f90b
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 70 deletions.
6 changes: 0 additions & 6 deletions llvm/lib/IR/Verifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -730,9 +730,6 @@ void Verifier::visitGlobalVariable(const GlobalVariable &GV) {
GV.getName() == "llvm.global_dtors")) {
Check(!GV.hasInitializer() || GV.hasAppendingLinkage(),
"invalid linkage for intrinsic global variable", &GV);
Check(GV.materialized_use_empty(),
"invalid uses of intrinsic global variable", &GV);

// Don't worry about emitting an error for it not being an array,
// visitGlobalValue will complain on appending non-array.
if (ArrayType *ATy = dyn_cast<ArrayType>(GV.getValueType())) {
Expand All @@ -759,9 +756,6 @@ void Verifier::visitGlobalVariable(const GlobalVariable &GV) {
GV.getName() == "llvm.compiler.used")) {
Check(!GV.hasInitializer() || GV.hasAppendingLinkage(),
"invalid linkage for intrinsic global variable", &GV);
Check(GV.materialized_use_empty(),
"invalid uses of intrinsic global variable", &GV);

Type *GVType = GV.getValueType();
if (ArrayType *ATy = dyn_cast<ArrayType>(GVType)) {
PointerType *PTy = dyn_cast<PointerType>(ATy->getElementType());
Expand Down
6 changes: 0 additions & 6 deletions llvm/test/Linker/Inputs/funcimport_appending_global_used.ll

This file was deleted.

22 changes: 0 additions & 22 deletions llvm/test/Linker/funcimport_appending_global_used.ll

This file was deleted.

16 changes: 0 additions & 16 deletions llvm/test/Verifier/global-ctors-dtors-uses.ll

This file was deleted.

20 changes: 0 additions & 20 deletions llvm/test/Verifier/used-uses.ll

This file was deleted.

0 comments on commit 124f90b

Please sign in to comment.