Add no_instrument_function attribute to Objective C methods as well
authorAditya Kumar <1894981+hiraditya@users.noreply.github.com>
Fri, 8 Oct 2021 23:28:15 +0000 (16:28 -0700)
committerAditya Kumar <1894981+hiraditya@users.noreply.github.com>
Sat, 9 Oct 2021 00:54:44 +0000 (17:54 -0700)
commit0f00aa502d79acf8a92b0b8490489895a9f28829
tree4052d0b0fa1cb28c96f2d5e05c3b29b7e633b2c6
parent04aff395047ab39811eea1fd811a5874d3e4dfe4
Add no_instrument_function attribute to Objective C methods as well

There are functions where we do not want function instrumentation which is why we have `__attribute__((no_instrument_function))`. Extending this functionality to disable instrumentation for Objective-C methods as well. Objective C methods like `+load` run premain and having instrumentation on them causes runtime errors depending on the implementation of `__cyg_profile_func_enter` etc. functions

Reviewed By: rjmccall, aaron.ballman

Differential Revision: https://reviews.llvm.org/D111286
clang/include/clang/Basic/Attr.td
clang/test/CodeGen/instrument-objc-method.m [new file with mode: 0644]
clang/test/Misc/pragma-attribute-supported-attributes-list.test
clang/test/SemaObjC/attr-noinstrument.m [new file with mode: 0644]