aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h32
1 files changed, 4 insertions, 28 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index dd73d3b..af9798b 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -14,7 +14,6 @@
#define LLVM_CLANG_LIB_CODEGEN_CODEGENFUNCTION_H
#include "CGBuilder.h"
-#include "CGDebugInfo.h"
#include "CGLoopInfo.h"
#include "CGValue.h"
#include "CodeGenModule.h"
@@ -48,6 +47,7 @@
namespace llvm {
class BasicBlock;
+class ConvergenceControlInst;
class LLVMContext;
class MDNode;
class SwitchInst;
@@ -1105,13 +1105,7 @@ public:
public:
/// Enter a new cleanup scope.
- explicit LexicalScope(CodeGenFunction &CGF, SourceRange Range)
- : RunCleanupsScope(CGF), Range(Range),
- ParentScope(CGF.CurLexicalScope) {
- CGF.CurLexicalScope = this;
- if (CGDebugInfo *DI = CGF.getDebugInfo())
- DI->EmitLexicalBlockStart(CGF.Builder, Range.getBegin());
- }
+ explicit LexicalScope(CodeGenFunction &CGF, SourceRange Range);
void addLabel(const LabelDecl *label) {
assert(PerformCleanup && "adding label to dead scope?");
@@ -1120,17 +1114,7 @@ public:
/// Exit this cleanup scope, emitting any accumulated
/// cleanups.
- ~LexicalScope() {
- if (CGDebugInfo *DI = CGF.getDebugInfo())
- DI->EmitLexicalBlockEnd(CGF.Builder, Range.getEnd());
-
- // If we should perform a cleanup, force them now. Note that
- // this ends the cleanup scope before rescoping any labels.
- if (PerformCleanup) {
- ApplyDebugLocation DL(CGF, Range.getEnd());
- ForceCleanup();
- }
- }
+ ~LexicalScope();
/// Force the emission of cleanups now, instead of waiting
/// until this object is destroyed.
@@ -1691,15 +1675,7 @@ public:
/// Increment the profiler's counter for the given statement by \p StepV.
/// If \p StepV is null, the default increment is 1.
- void incrementProfileCounter(const Stmt *S, llvm::Value *StepV = nullptr) {
- if (CGM.getCodeGenOpts().hasProfileClangInstr() &&
- !CurFn->hasFnAttribute(llvm::Attribute::NoProfile) &&
- !CurFn->hasFnAttribute(llvm::Attribute::SkipProfile)) {
- auto AL = ApplyDebugLocation::CreateArtificial(*this);
- PGO.emitCounterSetOrIncrement(Builder, S, StepV);
- }
- PGO.setCurrentStmt(S);
- }
+ void incrementProfileCounter(const Stmt *S, llvm::Value *StepV = nullptr);
bool isMCDCCoverageEnabled() const {
return (CGM.getCodeGenOpts().hasProfileClangInstr() &&