File tree 3 files changed +10
-8
lines changed
3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -197,8 +197,9 @@ void resetGlobalVariables() {
197
197
" .input" {TRACE (" ** INPUT" ); return DIRECTIVE_INPUT;}
198
198
" ." implicit[a -zA -Z0 -9_ \- $@? ]* {
199
199
TRACE (" ** DIRECTIVE_IMPLICIT" );
200
- CISAlval.string = strdup (yytext);
201
- CISAlval.string [yyleng] = ' \0 ' ;
200
+ char * yytext_dup = strdup (yytext);
201
+ yytext_dup[yyleng] = ' \0 ' ;
202
+ CISAlval.string = yytext_dup;
202
203
return DIRECTIVE_IMPLICIT;
203
204
}
204
205
" .function" {TRACE (" ** FUNCTION" ); return DIRECTIVE_FUNC;}
@@ -877,8 +878,9 @@ lifetime"."end {
877
878
878
879
^ [a -zA -Z_$@? ][a -zA -Z0 -9_ \- $@? ]* : {
879
880
TRACE (" ** LABEL" );
880
- CISAlval.string = strdup (yytext);
881
- CISAlval.string [yyleng - 1 ] = ' \0 ' ;
881
+ char * yytext_dup = strdup (yytext);
882
+ yytext_dup[yyleng - 1 ] = ' \0 ' ;
883
+ CISAlval.string = yytext_dup;
882
884
return LABEL;
883
885
}
884
886
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ std::vector<attr_gen_struct*> AttrOptVar;
89
89
char * decoded;
90
90
size_t len;
91
91
} strlit;
92
- char * string;
92
+ const char * string;
93
93
94
94
VISA_Type type;
95
95
ISA_Opcode opcode;
@@ -149,7 +149,7 @@ std::vector<attr_gen_struct*> AttrOptVar;
149
149
} regAccess;
150
150
151
151
struct {
152
- char * aliasname;
152
+ const char * aliasname;
153
153
int offset;
154
154
} alias;
155
155
@@ -251,7 +251,7 @@ std::vector<attr_gen_struct*> AttrOptVar;
251
251
int surfaceIndex;
252
252
} lsc_addr_model;
253
253
struct sampler_base_struct {
254
- char *base;
254
+ const char *base;
255
255
unsigned int offset;
256
256
} sampler_base;
257
257
Original file line number Diff line number Diff line change @@ -562,7 +562,7 @@ class G4_SrcRegRegion final : public G4_Operand {
562
562
G4_SrcRegRegion& operator =(const G4_SrcRegRegion&) = delete ;
563
563
void *operator new (size_t sz, Mem_Manager &m) { return m.alloc (sz); }
564
564
565
- bool operator ==(const G4_SrcRegRegion &other) {
565
+ bool operator ==(const G4_SrcRegRegion &other) const {
566
566
if (base != other.base || regOff != other.regOff ||
567
567
subRegOff != other.subRegOff ||
568
568
desc->vertStride != other.desc ->vertStride ||
You can’t perform that action at this time.
0 commit comments