]> granicus.if.org Git - clang/commit
[PGO] Instrument only base constructors and destructors.
authorSerge Pavlov <sepavloff@gmail.com>
Sun, 6 Dec 2015 14:32:39 +0000 (14:32 +0000)
committerSerge Pavlov <sepavloff@gmail.com>
Sun, 6 Dec 2015 14:32:39 +0000 (14:32 +0000)
commit3a6fcd9a38b60c88d1ded2ae778c9e973b9561f3
tree425a423693ac2e2e47480b875c3bf542e3f2976f
parent701684916fc579467febd1dd77f6a25ab83a1a5c
[PGO] Instrument only base constructors and destructors.

Constructors and destructors may be represented by several functions
in IR. Only base structors correspond to source code, others are
small pieces of code and eventually call the base variant. In this
case instrumentation of non-base structors has little sense, this
fix remove it. Now profile data of a declaration corresponds to
exactly one function in IR, it agrees with the current logic of the
profile data loading.

This change fixes PR24996.

Differential Revision: http://reviews.llvm.org/D15158

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254876 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGBlocks.cpp
lib/CodeGen/CGObjC.cpp
lib/CodeGen/CGStmt.cpp
lib/CodeGen/CGStmtOpenMP.cpp
lib/CodeGen/CodeGenFunction.cpp
lib/CodeGen/CodeGenPGO.cpp
lib/CodeGen/CodeGenPGO.h
test/Profile/cxx-structors.cpp [new file with mode: 0644]
test/Profile/cxx-virtual-destructor-calls.cpp