diff options
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp index 13472f038d5..fb5bee2ede2 100644 --- a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp @@ -467,6 +467,9 @@ void GCOVProfiler::emitProfileNotes() { Function *F = SP.getFunction(); if (!F) continue; + BasicBlock &EntryBlock = F->getEntryBlock(); + EntryBlock.splitBasicBlock(EntryBlock.begin()); + GCOVFunction *Func = new GCOVFunction(SP, &out, i, Options.UseCfgChecksum); Funcs.push_back(Func); |