summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-01-09 23:00:28 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-01-09 23:00:28 +0000
commitf353d3ecd0329884110a8bd39f28b5cc111c9a69 (patch)
tree070b18a0745ca81118c1a5e32351cdcadcceb79e /clang/lib/CodeGen/CodeGenFunction.h
parenta10379ad49b9a102d9f6ab1bdafba67dc42f430b (diff)
downloadbcm5719-llvm-f353d3ecd0329884110a8bd39f28b5cc111c9a69.tar.gz
bcm5719-llvm-f353d3ecd0329884110a8bd39f28b5cc111c9a69.zip
Revert "DebugInfo: Generalize debug info location handling" and related commits
This reverts commit r225000, r225021, r225083, r225086, r225090. The root change (r225000) still has several issues where it's caused calls to be emitted without debug locations. This causes assertion failures if/when those calls are inlined. I'll work up some test cases and fixes before recommitting this. llvm-svn: 225555
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h32
1 files changed, 25 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 36914691eb9..e2fd80e7d3e 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -93,6 +93,19 @@ enum TypeEvaluationKind {
TEK_Aggregate
};
+class SuppressDebugLocation {
+ llvm::DebugLoc CurLoc;
+ llvm::IRBuilderBase &Builder;
+public:
+ SuppressDebugLocation(llvm::IRBuilderBase &Builder)
+ : CurLoc(Builder.getCurrentDebugLocation()), Builder(Builder) {
+ Builder.SetCurrentDebugLocation(llvm::DebugLoc());
+ }
+ ~SuppressDebugLocation() {
+ Builder.SetCurrentDebugLocation(CurLoc);
+ }
+};
+
/// CodeGenFunction - This class organizes the per-function state that is used
/// while generating LLVM code.
class CodeGenFunction : public CodeGenTypeCache {
@@ -1262,7 +1275,7 @@ public:
/// EmitReturnBlock - Emit the unified return block, trying to avoid its
/// emission when possible.
- llvm::DebugLoc EmitReturnBlock();
+ void EmitReturnBlock();
/// FinishFunction - Complete IR generation of the current function. It is
/// legal to call this function even if there is no current insertion point.
@@ -1287,7 +1300,8 @@ public:
FunctionArgList &Args);
void EmitInitializerForField(FieldDecl *Field, LValue LHS, Expr *Init,
- ArrayRef<VarDecl *> ArrayIndexes);
+ ArrayRef<VarDecl *> ArrayIndexes,
+ SourceLocation DbgLoc = SourceLocation());
/// InitializeVTablePointer - Initialize the vtable pointer of the given
/// subobject.
@@ -1532,7 +1546,7 @@ public:
/// EmitExprAsInit - Emits the code necessary to initialize a
/// location in memory with the given initializer.
void EmitExprAsInit(const Expr *init, const ValueDecl *D, LValue lvalue,
- bool capturedByInit);
+ bool capturedByInit, SourceLocation DbgLoc);
/// hasVolatileMember - returns true if aggregate type has a volatile
/// member.
@@ -1819,7 +1833,8 @@ public:
void EmitVarDecl(const VarDecl &D);
void EmitScalarInit(const Expr *init, const ValueDecl *D, LValue lvalue,
- bool capturedByInit);
+ bool capturedByInit,
+ SourceLocation DbgLoc = SourceLocation());
void EmitScalarInit(llvm::Value *init, LValue lvalue);
typedef void SpecialInitFn(CodeGenFunction &Init, const VarDecl &D,
@@ -2149,7 +2164,8 @@ public:
/// EmitStoreThroughLValue - Store the specified rvalue into the specified
/// lvalue, where both are guaranteed to the have the same type, and that type
/// is 'Ty'.
- void EmitStoreThroughLValue(RValue Src, LValue Dst, bool isInit = false);
+ void EmitStoreThroughLValue(RValue Src, LValue Dst, bool isInit = false,
+ SourceLocation DbgLoc = SourceLocation());
void EmitStoreThroughExtVectorComponentLValue(RValue Src, LValue Dst);
void EmitStoreThroughGlobalRegLValue(RValue Src, LValue Dst);
@@ -2521,10 +2537,12 @@ public:
/// EmitComplexExprIntoLValue - Emit the given expression of complex
/// type and place its result into the specified l-value.
- void EmitComplexExprIntoLValue(const Expr *E, LValue dest, bool isInit);
+ void EmitComplexExprIntoLValue(const Expr *E, LValue dest, bool isInit,
+ SourceLocation DbgLoc = SourceLocation());
/// EmitStoreOfComplex - Store a complex number into the specified l-value.
- void EmitStoreOfComplex(ComplexPairTy V, LValue dest, bool isInit);
+ void EmitStoreOfComplex(ComplexPairTy V, LValue dest, bool isInit,
+ SourceLocation DbgLoc = SourceLocation());
/// EmitLoadOfComplex - Load a complex number from the specified l-value.
ComplexPairTy EmitLoadOfComplex(LValue src, SourceLocation loc);
OpenPOWER on IntegriCloud