diff options
-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) { |