mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-25 16:29:20 +00:00
llvm-cov: Don't assume FileChecksum was generated.
For cases where emitProfileArcs() was called but emitProfileNotes() was not, set the CfgChecksum to 0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195311 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
53daa8e8f3
commit
1155e0e912
@ -803,10 +803,11 @@ Function *GCOVProfiler::insertCounterWriteout(
|
||||
for (unsigned i = 0, e = CU_Nodes->getNumOperands(); i != e; ++i) {
|
||||
DICompileUnit CU(CU_Nodes->getOperand(i));
|
||||
std::string FilenameGcda = mangleName(CU, "gcda");
|
||||
uint32_t CfgChecksum = FileChecksums.size() ? FileChecksums[i] : 0;
|
||||
Builder.CreateCall3(StartFile,
|
||||
Builder.CreateGlobalStringPtr(FilenameGcda),
|
||||
Builder.CreateGlobalStringPtr(ReversedVersion),
|
||||
Builder.getInt32(FileChecksums[i]));
|
||||
Builder.getInt32(CfgChecksum));
|
||||
for (unsigned j = 0, e = CountersBySP.size(); j != e; ++j) {
|
||||
DISubprogram SP(CountersBySP[j].second);
|
||||
Builder.CreateCall4(
|
||||
@ -815,7 +816,7 @@ Function *GCOVProfiler::insertCounterWriteout(
|
||||
Builder.CreateGlobalStringPtr(getFunctionName(SP)) :
|
||||
Constant::getNullValue(Builder.getInt8PtrTy()),
|
||||
Builder.getInt8(Options.UseCfgChecksum),
|
||||
Builder.getInt32(FileChecksums[i]));
|
||||
Builder.getInt32(CfgChecksum));
|
||||
|
||||
GlobalVariable *GV = CountersBySP[j].first;
|
||||
unsigned Arcs =
|
||||
|
Loading…
Reference in New Issue
Block a user