diff options
author | Xinliang David Li <davidxl@google.com> | 2016-06-03 23:02:28 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@google.com> | 2016-06-03 23:02:28 +0000 |
commit | 6c44e9e33d6f58da12fba5f3260eb5d68d9a65c1 (patch) | |
tree | 4a4e80329544d17d47444bacb56723c749f71995 /llvm/lib/Transforms | |
parent | 019e0bf592ed5e1c571b17a9070e32c74cf6c2bd (diff) | |
download | bcm5719-llvm-6c44e9e33d6f58da12fba5f3260eb5d68d9a65c1.tar.gz bcm5719-llvm-6c44e9e33d6f58da12fba5f3260eb5d68d9a65c1.zip |
[pgo] extend r271532 to darwin platform
llvm-svn: 271746
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp index cf8f93d0407..7bb3bdc1137 100644 --- a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp @@ -261,10 +261,10 @@ static inline bool shouldRecordFunctionAddr(Function *F) { // Inline virtual functions have linkeOnceODR linkage. When a key method // exists, the vtable will only be emitted in the TU where the key method // is defined. In a TU where vtable is not available, the function won't - // be 'addresstaken'. If its address is not recorded here, the profile counter - // comdat group with missing address may be picked by the linker leading - // to missing indirect call target info. - return F->hasAddressTaken() || (F->hasLinkOnceLinkage() && F->hasComdat()); + // be 'addresstaken'. If its address is not recorded here, the profile data + // with missing address may be picked by the linker leading to missing + // indirect call target info. + return F->hasAddressTaken() || F->hasLinkOnceLinkage(); } static inline bool needsComdatForCounter(Function &F, Module &M) { |