diff options
author | Yuchen Wu <yuchenericwu@hotmail.com> | 2013-11-12 04:59:08 +0000 |
---|---|---|
committer | Yuchen Wu <yuchenericwu@hotmail.com> | 2013-11-12 04:59:08 +0000 |
commit | f42264e7e4cb947bcd1ff7dd48fd0ba4e9fbbf9f (patch) | |
tree | ab7f03eea9012a40902786117766ecd6961d94f1 | |
parent | d99e04db6a9a8d58dcfdd958d1a4f00c7d518c9d (diff) | |
download | llvm-f42264e7e4cb947bcd1ff7dd48fd0ba4e9fbbf9f.tar.gz llvm-f42264e7e4cb947bcd1ff7dd48fd0ba4e9fbbf9f.tar.bz2 llvm-f42264e7e4cb947bcd1ff7dd48fd0ba4e9fbbf9f.tar.xz |
llvm-cov: Added call to update run/program counts.
Also updated test files that were generated from this change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194453 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/Instrumentation/GCOVProfiling.cpp | 8 | ||||
-rw-r--r-- | test/tools/llvm-cov/Inputs/test.gcda | bin | 857 -> 824 bytes | |||
-rw-r--r-- | test/tools/llvm-cov/Inputs/test.gcno | bin | 3113 -> 3112 bytes |
3 files changed, 8 insertions, 0 deletions
diff --git a/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/lib/Transforms/Instrumentation/GCOVProfiling.cpp index 4e9afeed43..206bffbb27 100644 --- a/lib/Transforms/Instrumentation/GCOVProfiling.cpp +++ b/lib/Transforms/Instrumentation/GCOVProfiling.cpp @@ -102,6 +102,7 @@ namespace { Constant *getIncrementIndirectCounterFunc(); Constant *getEmitFunctionFunc(); Constant *getEmitArcsFunc(); + Constant *getSummaryInfoFunc(); Constant *getDeleteWriteoutFunctionListFunc(); Constant *getDeleteFlushFunctionListFunc(); Constant *getEndFileFunc(); @@ -700,6 +701,11 @@ Constant *GCOVProfiler::getEmitArcsFunc() { return M->getOrInsertFunction("llvm_gcda_emit_arcs", FTy); } +Constant *GCOVProfiler::getSummaryInfoFunc() { + FunctionType *FTy = FunctionType::get(Type::getVoidTy(*Ctx), false); + return M->getOrInsertFunction("llvm_gcda_summary_info", FTy); +} + Constant *GCOVProfiler::getDeleteWriteoutFunctionListFunc() { FunctionType *FTy = FunctionType::get(Type::getVoidTy(*Ctx), false); return M->getOrInsertFunction("llvm_delete_writeout_function_list", FTy); @@ -746,6 +752,7 @@ Function *GCOVProfiler::insertCounterWriteout( Constant *StartFile = getStartFileFunc(); Constant *EmitFunction = getEmitFunctionFunc(); Constant *EmitArcs = getEmitArcsFunc(); + Constant *SummaryInfo = getSummaryInfoFunc(); Constant *EndFile = getEndFileFunc(); NamedMDNode *CU_Nodes = M->getNamedMetadata("llvm.dbg.cu"); @@ -772,6 +779,7 @@ Function *GCOVProfiler::insertCounterWriteout( Builder.getInt32(Arcs), Builder.CreateConstGEP2_64(GV, 0, 0)); } + Builder.CreateCall(SummaryInfo); Builder.CreateCall(EndFile); } } diff --git a/test/tools/llvm-cov/Inputs/test.gcda b/test/tools/llvm-cov/Inputs/test.gcda Binary files differindex 16fff43acc..23d03bdd1f 100644 --- a/test/tools/llvm-cov/Inputs/test.gcda +++ b/test/tools/llvm-cov/Inputs/test.gcda diff --git a/test/tools/llvm-cov/Inputs/test.gcno b/test/tools/llvm-cov/Inputs/test.gcno Binary files differindex 9db4f59dc7..6162604e74 100644 --- a/test/tools/llvm-cov/Inputs/test.gcno +++ b/test/tools/llvm-cov/Inputs/test.gcno |