-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[StructuralHash] Ignore global variable declarations
Ignore declarations of global variables, just as we do with declarations of functions. Done as a follow up to the comments in https://reviews.llvm.org/D149209 Differential Revision: https://reviews.llvm.org/D153855 # Conflicts: # llvm/lib/IR/StructuralHash.cpp
- Loading branch information
1 parent
80155cb
commit d2640f5
Showing
2 changed files
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
llvm/test/Transforms/StripDeadPrototypes/remove-global-variable-declaration.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
; RUN: opt -passes=strip-dead-prototypes -S -verify-analysis-invalidation < %s | FileCheck %s | ||
|
||
; The declaration of the unused global variable @.str should be removed without | ||
; getting any error from -verify-analysis-invalidation. | ||
|
||
; CHECK-NOT: @.str | ||
|
||
@.str = external constant [15 x i16] | ||
|