diff options
author | Torok Edwin <edwintorok@gmail.com> | 2009-03-10 13:41:26 +0000 |
---|---|---|
committer | Torok Edwin <edwintorok@gmail.com> | 2009-03-10 13:41:26 +0000 |
commit | ff7d0e9509cf8f359fe14c05dc29a05a293ce88f (patch) | |
tree | c14372a112c7b3779e087c48e9279ef31afe068f /include/llvm/Analysis/DebugInfo.h | |
parent | c29f0c7ddea5a7d5e4f01b47735cb9acdc9ec4df (diff) |
Global variables don't have a corresponding llvm.dbg.declare, yet it is possible
to obtain debug info about them.
Introduce helpers to access debug info for global variables. Also introduce a
helper that works for both local and global variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66541 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/DebugInfo.h')
-rw-r--r-- | include/llvm/Analysis/DebugInfo.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h index c1be6460aa..c6f09283bd 100644 --- a/include/llvm/Analysis/DebugInfo.h +++ b/include/llvm/Analysis/DebugInfo.h @@ -507,6 +507,12 @@ namespace llvm { /// Finds the dbg.declare intrinsic corresponding to this value if any. /// It looks through pointer casts too. const DbgDeclareInst *findDbgDeclare(const Value *V, bool stripCasts = true); + + /// Find the debug info descriptor corresponding to this global variable. + Value *findDbgGlobalDeclare(GlobalVariable *V); + + bool getLocationInfo(const Value *V, std::string &DisplayName, std::string &Type, + unsigned &LineNo, std::string &File, std::string &Dir); } // end namespace llvm #endif |