1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

[pgo] extend r271532 to darwin platform

llvm-svn: 271746
This commit is contained in:
Xinliang David Li 2016-06-03 23:02:28 +00:00
parent 60d682daa9
commit af3cf63542

View File

@ -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) {