зеркало из https://github.com/mozilla/gecko-dev.git
41 строка
1.9 KiB
Diff
41 строка
1.9 KiB
Diff
Index: compiler-rt/lib/profile/GCDAProfiling.c
|
|
===================================================================
|
|
diff --git a/compiler-rt/lib/profile/GCDAProfiling.c b/compiler-rt/lib/profile/GCDAProfiling.c
|
|
--- a/compiler-rt/lib/profile/GCDAProfiling.c (revisione 336380)
|
|
+++ b/compiler-rt/lib/profile/GCDAProfiling.c (copia locale)
|
|
@@ -555,7 +555,7 @@
|
|
fn_list_insert(&flush_fn_list, fn);
|
|
}
|
|
|
|
-void __gcov_flush() {
|
|
+void __custom_llvm_gcov_flush() {
|
|
struct fn_node* curr = flush_fn_list.head;
|
|
|
|
while (curr) {
|
|
diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
|
|
index 9af64ed332c..bcebe303ff4 100644
|
|
--- a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
|
|
+++ b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
|
|
@@ -648,7 +648,7 @@ void GCOVProfiler::AddFlushBeforeForkAndExec() {
|
|
for (auto I : ForkAndExecs) {
|
|
IRBuilder<> Builder(I);
|
|
FunctionType *FTy = FunctionType::get(Builder.getVoidTy(), {}, false);
|
|
- Constant *GCOVFlush = M->getOrInsertFunction("__gcov_flush", FTy);
|
|
+ Constant *GCOVFlush = M->getOrInsertFunction("__custom_llvm_gcov_flush", FTy);
|
|
Builder.CreateCall(GCOVFlush);
|
|
I->getParent()->splitBasicBlock(I);
|
|
}
|
|
diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp
|
|
index e113f9a679..b3a07b18c0 100644
|
|
--- a/clang/lib/Driver/ToolChains/Darwin.cpp
|
|
+++ b/clang/lib/Driver/ToolChains/Darwin.cpp
|
|
@@ -1058,7 +1058,7 @@ void Darwin::addProfileRTLibs(const ArgList &Args,
|
|
// runtime's functionality.
|
|
if (hasExportSymbolDirective(Args)) {
|
|
if (needsGCovInstrumentation(Args)) {
|
|
- addExportedSymbol(CmdArgs, "___gcov_flush");
|
|
+ addExportedSymbol(CmdArgs, "___custom_llvm_gcov_flush");
|
|
addExportedSymbol(CmdArgs, "_flush_fn_list");
|
|
addExportedSymbol(CmdArgs, "_writeout_fn_list");
|
|
} else {
|