@@ -1661,28 +1661,19 @@ class CodeGenFunction : public CodeGenTypeCache {
16611661 UseSkipPath,
16621662 };
16631663
1664- // / Increment the profiler's counter for the given statement by \p StepV.
1665- // / If \p StepV is null, the default increment is 1.
1666- void incrementProfileCounter (const Stmt *S, llvm::Value *StepV = nullptr ) {
1667- incrementProfileCounter (UseExecPath, S, false , StepV);
1668- }
1669-
16701664 // / Emit increment of Counter.
16711665 // / \param ExecSkip Use `Skipped` Counter if UseSkipPath is specified.
16721666 // / \param S The Stmt that Counter is associated.
16731667 // / \param UseBoth Mark both Exec/Skip as used. (for verification)
16741668 // / \param StepV The offset Value for adding to Counter.
16751669 void incrementProfileCounter (CounterForIncrement ExecSkip, const Stmt *S,
1676- bool UseBoth = false ,
1677- llvm::Value *StepV = nullptr ) {
1678- if (CGM.getCodeGenOpts ().hasProfileClangInstr () &&
1679- !CurFn->hasFnAttribute (llvm::Attribute::NoProfile) &&
1680- !CurFn->hasFnAttribute (llvm::Attribute::SkipProfile)) {
1681- auto AL = ApplyDebugLocation::CreateArtificial (*this );
1682- PGO.emitCounterSetOrIncrement (Builder, S, (ExecSkip == UseSkipPath),
1683- UseBoth, StepV);
1684- }
1685- PGO.setCurrentStmt (S);
1670+ bool UseBoth = false ,
1671+ llvm::Value *StepV = nullptr );
1672+
1673+ // / Increment the profiler's counter for the given statement by \p StepV.
1674+ // / If \p StepV is null, the default increment is 1.
1675+ void incrementProfileCounter (const Stmt *S, llvm::Value *StepV = nullptr ) {
1676+ incrementProfileCounter (UseExecPath, S, false , StepV);
16861677 }
16871678
16881679 bool isMCDCCoverageEnabled () const {
0 commit comments