summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-09-15 20:43:22 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-09-15 20:43:22 +0000
commit101b1c5ff16dffd45d03746d92c024740f72ecc6 (patch)
treece0a3736eabcea8dd244494e4b2ac13b4c03d420 /include
parentc26ed9b47ff77ca6244feda9e3837b49624605db (diff)
downloadllvm-101b1c5ff16dffd45d03746d92c024740f72ecc6.tar.gz
llvm-101b1c5ff16dffd45d03746d92c024740f72ecc6.tar.bz2
llvm-101b1c5ff16dffd45d03746d92c024740f72ecc6.tar.xz
DWARF: Put all the pieces we have together and provide a single accessor to DIContext that provides line information when given an address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139836 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/DebugInfo/DIContext.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/llvm/DebugInfo/DIContext.h b/include/llvm/DebugInfo/DIContext.h
index bd888f74f2..152d90ad35 100644
--- a/include/llvm/DebugInfo/DIContext.h
+++ b/include/llvm/DebugInfo/DIContext.h
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
//
-// This file defines DIContext, and abstract data structure that holds
+// This file defines DIContext, an abstract data structure that holds
// debug information data.
//
//===----------------------------------------------------------------------===//
@@ -21,6 +21,20 @@ namespace llvm {
class raw_ostream;
+/// DILineInfo - a format-neutral container for source line information.
+class DILineInfo {
+ const char *FileName;
+ uint32_t Line;
+ uint32_t Column;
+public:
+ DILineInfo(const char *fileName, uint32_t line, uint32_t column)
+ : FileName(fileName), Line(line), Column(column) {}
+
+ const char *getFileName() const { return FileName; }
+ uint32_t getLine() const { return Line; }
+ uint32_t getColumn() const { return Column; }
+};
+
class DIContext {
public:
virtual ~DIContext();
@@ -34,6 +48,8 @@ public:
StringRef stringSection = StringRef());
virtual void dump(raw_ostream &OS) = 0;
+
+ virtual DILineInfo getLineInfoForAddress(uint64_t address) = 0;
};
}