@@ -145,14 +145,14 @@ private newtype TDefOrUseImpl =
145
145
or
146
146
// Since the pruning stage doesn't know about global variables we can't use the above check to
147
147
// rule out dead assignments to globals.
148
- base .( VariableAddressInstruction ) .getAstVariable ( ) instanceof Cpp :: GlobalOrNamespaceVariable
148
+ base .( VariableAddressInstruction ) .getAstVariable ( ) instanceof GlobalLikeVariable
149
149
)
150
150
} or
151
151
TUseImpl ( Operand operand , int indirectionIndex ) {
152
152
isUse ( _, operand , _, _, indirectionIndex ) and
153
153
not isDef ( _, _, operand , _, _, _)
154
154
} or
155
- TGlobalUse ( Cpp :: GlobalOrNamespaceVariable v , IRFunction f , int indirectionIndex ) {
155
+ TGlobalUse ( GlobalLikeVariable v , IRFunction f , int indirectionIndex ) {
156
156
// Represents a final "use" of a global variable to ensure that
157
157
// the assignment to a global variable isn't ruled out as dead.
158
158
exists ( VariableAddressInstruction vai , int defIndex |
@@ -162,7 +162,7 @@ private newtype TDefOrUseImpl =
162
162
indirectionIndex = [ 0 .. defIndex ] + 1
163
163
)
164
164
} or
165
- TGlobalDefImpl ( Cpp :: GlobalOrNamespaceVariable v , IRFunction f , int indirectionIndex ) {
165
+ TGlobalDefImpl ( GlobalLikeVariable v , IRFunction f , int indirectionIndex ) {
166
166
// Represents the initial "definition" of a global variable when entering
167
167
// a function body.
168
168
exists ( VariableAddressInstruction vai |
@@ -458,7 +458,7 @@ class FinalParameterUse extends UseImpl, TFinalParameterUse {
458
458
}
459
459
460
460
class GlobalUse extends UseImpl , TGlobalUse {
461
- Cpp :: GlobalOrNamespaceVariable global ;
461
+ GlobalLikeVariable global ;
462
462
IRFunction f ;
463
463
464
464
GlobalUse ( ) { this = TGlobalUse ( global , f , ind ) }
@@ -468,7 +468,7 @@ class GlobalUse extends UseImpl, TGlobalUse {
468
468
override int getIndirection ( ) { result = ind + 1 }
469
469
470
470
/** Gets the global variable associated with this use. */
471
- Cpp :: GlobalOrNamespaceVariable getVariable ( ) { result = global }
471
+ GlobalLikeVariable getVariable ( ) { result = global }
472
472
473
473
/** Gets the `IRFunction` whose body is exited from after this use. */
474
474
IRFunction getIRFunction ( ) { result = f }
@@ -496,14 +496,14 @@ class GlobalUse extends UseImpl, TGlobalUse {
496
496
}
497
497
498
498
class GlobalDefImpl extends DefOrUseImpl , TGlobalDefImpl {
499
- Cpp :: GlobalOrNamespaceVariable global ;
499
+ GlobalLikeVariable global ;
500
500
IRFunction f ;
501
501
int indirectionIndex ;
502
502
503
503
GlobalDefImpl ( ) { this = TGlobalDefImpl ( global , f , indirectionIndex ) }
504
504
505
505
/** Gets the global variable associated with this definition. */
506
- Cpp :: GlobalOrNamespaceVariable getVariable ( ) { result = global }
506
+ GlobalLikeVariable getVariable ( ) { result = global }
507
507
508
508
/** Gets the `IRFunction` whose body is evaluated after this definition. */
509
509
IRFunction getIRFunction ( ) { result = f }
@@ -760,7 +760,7 @@ private predicate variableWriteCand(IRBlock bb, int i, SourceVariable v) {
760
760
}
761
761
762
762
private predicate sourceVariableIsGlobal (
763
- SourceVariable sv , Cpp :: GlobalOrNamespaceVariable global , IRFunction func , int indirectionIndex
763
+ SourceVariable sv , GlobalLikeVariable global , IRFunction func , int indirectionIndex
764
764
) {
765
765
exists ( IRVariable irVar , BaseIRVariable base |
766
766
sourceVariableHasBaseAndIndex ( sv , base , indirectionIndex ) and
@@ -919,7 +919,7 @@ class GlobalDef extends TGlobalDef, SsaDefOrUse {
919
919
IRFunction getIRFunction ( ) { result = global .getIRFunction ( ) }
920
920
921
921
/** Gets the global variable associated with this definition. */
922
- Cpp :: GlobalOrNamespaceVariable getVariable ( ) { result = global .getVariable ( ) }
922
+ GlobalLikeVariable getVariable ( ) { result = global .getVariable ( ) }
923
923
}
924
924
925
925
class Phi extends TPhi , SsaDefOrUse {
0 commit comments