allow explicitly marking an identifier as equivalent to special '_' identifier

This commit is contained in:
Vern Paxson 2023-11-05 13:23:39 -08:00 committed by Arne Welzel
parent c49918ba8b
commit 9bfe18473d
2 changed files with 5 additions and 0 deletions

View file

@ -100,6 +100,8 @@ public:
void SetOption(); void SetOption();
bool IsOption() const { return is_option; } bool IsOption() const { return is_option; }
void SetBlank() { is_blank = true; }
bool IsBlank() const { return is_blank; }; bool IsBlank() const { return is_blank; };
void SetEnumConst() { is_enum_const = true; } void SetEnumConst() { is_enum_const = true; }

View file

@ -741,6 +741,9 @@ IDPtr Reducer::GenLocal(const IDPtr& orig) {
local_id->SetType(orig->GetType()); local_id->SetType(orig->GetType());
local_id->SetAttrs(orig->GetAttrs()); local_id->SetAttrs(orig->GetAttrs());
if ( orig->IsBlank() )
local_id->SetBlank();
if ( orig->GetOptInfo()->IsTemp() ) if ( orig->GetOptInfo()->IsTemp() )
local_id->GetOptInfo()->SetTemp(); local_id->GetOptInfo()->SetTemp();