diff options
author | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2008-05-30 10:30:31 +0000 |
---|---|---|
committer | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2008-05-30 10:30:31 +0000 |
commit | cc9b16394fe6c9245dc4f8661a63d0c3937b62f0 (patch) | |
tree | 14ffd780b29f8e2ed574e0684642b2f6d8e90f50 /lib/CodeGen/CGDebugInfo.h | |
parent | e36a3c8b5c7db4916342e4381caa2fdc93eb5745 (diff) |
Emit parameter and local variable debug information with -g.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51765 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.h')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/CodeGen/CGDebugInfo.h b/lib/CodeGen/CGDebugInfo.h index 4e6626fc4d..3e7835a2d0 100644 --- a/lib/CodeGen/CGDebugInfo.h +++ b/lib/CodeGen/CGDebugInfo.h @@ -30,11 +30,13 @@ namespace llvm { class DebugInfoDesc; class Value; class TypeDesc; + class VariableDesc; class SubprogramDesc; } namespace clang { class FunctionDecl; + class VarDecl; namespace CodeGen { class CodeGenModule; @@ -61,7 +63,8 @@ private: llvm::Function *RegionEndFn; llvm::AnchorDesc *CompileUnitAnchor; llvm::AnchorDesc *SubprogramAnchor; - std::vector<llvm::DebugInfoDesc *> RegionStack; + std::vector<llvm::DebugInfoDesc *> RegionStack; + std::vector<llvm::VariableDesc *> VariableDescList; llvm::SubprogramDesc *Subprogram; /// Helper functions for getOrCreateType. @@ -98,6 +101,10 @@ public: /// EmitRegionEnd - Emit call to llvm.dbg.region.end to indicate end of a /// block. void EmitRegionEnd(llvm::Function *Fn, llvm::IRBuilder &Builder); + + /// EmitDeclare - Emit call to llvm.dbg.declare for a variable declaration. + void EmitDeclare(const VarDecl *decl, unsigned Tag, llvm::Value *AI, + llvm::IRBuilder &Builder); /// getOrCreateCompileUnit - Get the compile unit from the cache or create a /// new one if necessary. |