llvm.org GIT mirror llvm / 8b27d7b
[pgo] extend r271532 to darwin platform git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271746 91177308-0d34-0410-b5e6-96231b3b80d8 Xinliang David Li 4 years ago
1 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
260260 // Inline virtual functions have linkeOnceODR linkage. When a key method
261261 // exists, the vtable will only be emitted in the TU where the key method
262262 // is defined. In a TU where vtable is not available, the function won't
263 // be 'addresstaken'. If its address is not recorded here, the profile counter
264 // comdat group with missing address may be picked by the linker leading
265 // to missing indirect call target info.
266 return F->hasAddressTaken() || (F->hasLinkOnceLinkage() && F->hasComdat());
263 // be 'addresstaken'. If its address is not recorded here, the profile data
264 // with missing address may be picked by the linker leading to missing
265 // indirect call target info.
266 return F->hasAddressTaken() || F->hasLinkOnceLinkage();
267267 }
268268
269269 static inline bool needsComdatForCounter(Function &F, Module &M) {