I hit this while debugging another issue where my sources were in an
inconsistent state, so I don't have a testcase. Regardless, this check is
simpler and more direct than checking if the option is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203072
91177308-0d34-0410-b5e6-
96231b3b80d8
}
void CodeGenPGO::emitCounterIncrement(CGBuilderTy &Builder, unsigned Counter) {
- if (!CGM.getCodeGenOpts().ProfileInstrGenerate)
+ if (!RegionCounters)
return;
llvm::Value *Addr =
Builder.CreateConstInBoundsGEP2_64(RegionCounters, 0, Counter);