This attribute is similar to GCC's function attribute, but it doesn't support
compiling functions with arbitrary optimization options. This patch only
supports "-Os", "-Oz", "-Ofast", "-O0" because they map to existing
attributes cleanly. We don't intend to support arbitrary options, like GCC,
with this attribute.
i.e. __attribute__((optimize("O0")))
Something along these lines adds a "fake" argument to the attribute. This means the parsed attribute doesn't care about this argument (so users don't supply it when writing the attribute themselves), but the semantic attribute (OptimizeAttr) will have a member to track the fake argument value and will require extra information when creating the attribute.
This effectively will add:
to the semantic attribute.