aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-09-01 01:14:15 +0000
committerDevang Patel <dpatel@apple.com>2009-09-01 01:14:15 +0000
commit8a6a4f5d031875716e06bf7339708874e97d915b (patch)
tree425477c2ba2da28e891b070c02987ea8da723745 /include
parentd4794f1da6e32d0eda205da2f994a25d1632aea9 (diff)
downloadexternal_llvm-8a6a4f5d031875716e06bf7339708874e97d915b.zip
external_llvm-8a6a4f5d031875716e06bf7339708874e97d915b.tar.gz
external_llvm-8a6a4f5d031875716e06bf7339708874e97d915b.tar.bz2
Introduce DILocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80648 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/DebugInfo.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h
index f4783c0..7c6b421 100644
--- a/include/llvm/Analysis/DebugInfo.h
+++ b/include/llvm/Analysis/DebugInfo.h
@@ -471,8 +471,24 @@ namespace llvm {
const std::string &getDirectory(std::string &D) const {
return getContext().getDirectory(D);
}
+ };
+ /// DILocation - This object holds location information. This object
+ /// is not associated with any DWARF tag.
+ class DILocation : public DIDescriptor {
+ public:
+ explicit DILocation(MDNode *L) { DbgNode = L; }
+ unsigned getLineNumber() const { return getUnsignedField(0); }
+ unsigned getColumnNumber() const { return getUnsignedField(1); }
+ DIScope getScope() const { return getFieldAs<DIScope>(3); }
+ DILocation getOrigLocation() const { return getFieldAs<DILocation>(4); }
+ std::string getFilename(std::string &F) const {
+ return getScope().getFilename(F);
+ }
+ std::string getDirectory(std::string &D) const {
+ return getScope().getDirectory(D);
+ }
};
/// DIFactory - This object assists with the construction of the various
@@ -575,6 +591,10 @@ namespace llvm {
/// with the specified parent context.
DILexicalBlock CreateLexicalBlock(DIDescriptor Context);
+ /// CreateLocation - Creates a debug info location.
+ DILocation CreateLocation(unsigned LineNo, unsigned ColumnNo,
+ DIScope S, DILocation OrigLoc);
+
/// InsertStopPoint - Create a new llvm.dbg.stoppoint intrinsic invocation,
/// inserting it at the end of the specified basic block.
void InsertStopPoint(DICompileUnit CU, unsigned LineNo, unsigned ColNo,