OSDN Git Service

[pgo] extend r271532 to darwin platform
authorXinliang David Li <davidxl@google.com>
Fri, 3 Jun 2016 23:02:28 +0000 (23:02 +0000)
committerXinliang David Li <davidxl@google.com>
Fri, 3 Jun 2016 23:02:28 +0000 (23:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271746 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Instrumentation/InstrProfiling.cpp

index cf8f93d..7bb3bdc 100644 (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) {