p4c icon indicating copy to clipboard operation
p4c copied to clipboard

Add a getStringLiteral utility function to irutils.

Open fruffy opened this issue 10 months ago • 3 comments

I have been doing this a lot lately, so might as well contribute a utility function. Maybe all of these "get" functions should be static class members?

fruffy avatar Apr 17 '24 15:04 fruffy

Maybe all of these "get" functions should be static class members?

Do you mean e.g. IR::StringLiteral::get?

vlstill avatar Apr 17 '24 17:04 vlstill

Maybe all of these "get" functions should be static class members?

Do you mean e.g. IR::StringLiteral::get?

Yes, something in that form.

fruffy avatar Apr 17 '24 17:04 fruffy

Maybe all of these "get" functions should be static class members?

Do you mean e.g. IR::StringLiteral::get?

Yes, something in that form.

OK, I think that would make more sense than the freestanding functions.

vlstill avatar Apr 19 '24 08:04 vlstill

Maybe all of these "get" functions should be static class members?

Do you mean e.g. IR::StringLiteral::get?

Yes, something in that form.

OK, I think that would make more sense than the freestanding functions.

Alright, gave this a shot. There is probably more utils we could add.

fruffy avatar Apr 23 '24 01:04 fruffy