C++: Restrict 'VariableNode's to only be global-like variables (which is the only place where use them for).

This commit is contained in:
Mathias Vorreiter Pedersen
2024-02-28 19:12:38 +00:00
parent ca1a27dc75
commit a7f0966fcb

View File

@@ -34,7 +34,7 @@ private import Node0ToString
cached
private newtype TIRDataFlowNode =
TNode0(Node0Impl node) { DataFlowImplCommon::forceCachingInSameStage() } or
TVariableNode(Variable var, int indirectionIndex) {
TVariableNode(GlobalLikeVariable var, int indirectionIndex) {
indirectionIndex =
[getMinIndirectionsForType(var.getUnspecifiedType()) .. Ssa::getMaxIndirectionsForType(var.getUnspecifiedType())]
} or