This allows to write:
if (op->getName() == "some.op")
instead of
if (op->getName().getStringRef() == "some.op")
Differential D105388
Enable comparison between OperationName and StringLiteral (NFC) mehdi_amini on Jul 2 2021, 8:46 PM. Authored by
Details
Diff Detail
Event TimelineComment Actions Isn't this a bit of a feature that doing the string comparison needs to be explicit? It is less efficient than the compares currently exposed. Well modulo getting an Identifier requires adding it to context, but the user has control and the choice is explicit. Would a wrapper class work here to both make the writing simpler and (potentially) cache for efficient further checking post first hit? |