diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-12-29 23:49:00 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-12-29 23:49:00 +0000 |
commit | 608a24501c73ee2384464fa1c1703e28116d05f3 (patch) | |
tree | d99f56fc9d07ecdd2e2af2044f4ea3c8a566e04c /clang/lib/CodeGen/CodeGenFunction.h | |
parent | b7373cd6398eee6a35d20a623bb6fb06f5414dc0 (diff) | |
download | llvm-608a24501c73ee2384464fa1c1703e28116d05f3.zip llvm-608a24501c73ee2384464fa1c1703e28116d05f3.tar.gz llvm-608a24501c73ee2384464fa1c1703e28116d05f3.tar.bz2 |
Revert "DebugInfo: Generalize debug info location handling"
Asserting when building compiler-rt when using a GCC host compiler.
Reverting while I investigate.
This reverts commit r224941.
llvm-svn: 224970
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 8302b7a..e2fd80e 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 { @@ -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); |