]> granicus.if.org Git - clang/commit
[Clang] Handle interaction of -pg and no_instrument_function attribute.
authorManoj Gupta <manojgupta@google.com>
Mon, 19 Jun 2017 18:45:03 +0000 (18:45 +0000)
committerManoj Gupta <manojgupta@google.com>
Mon, 19 Jun 2017 18:45:03 +0000 (18:45 +0000)
commitb8c6e47bedeba554a913c71653d6ce778f398155
tree2630c19b0e5d59bcbed39e1dc1fa5af6a2d24988
parent2a29f3b4c8d5c9042103398f643bf8b32a5d9974
[Clang] Handle interaction of -pg and no_instrument_function attribute.

Summary:
Disable generation of counting-function attribute if no_instrument_function
attribute is present in function.
Interaction between -pg and no_instrument_function is the desired behavior
and matches gcc as well.
This is required for fixing a crash in Linux kernel when function tracing
is enabled.

Fixes PR33515.

Reviewers: hfinkel, rengolin, srhines, hans

Reviewed By: hfinkel

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D34357

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305728 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenFunction.cpp
test/CodeGen/mcount.c