1 //===-- DIContext.h ---------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines DIContext, an abstract data structure that holds
11 // debug information data.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_DEBUGINFO_DICONTEXT_H
16 #define LLVM_DEBUGINFO_DICONTEXT_H
18 #include "llvm/ADT/StringRef.h"
24 /// DILineInfo - a format-neutral container for source line information.
30 DILineInfo(const char *fileName, uint32_t line, uint32_t column)
31 : FileName(fileName), Line(line), Column(column) {}
33 const char *getFileName() const { return FileName; }
34 uint32_t getLine() const { return Line; }
35 uint32_t getColumn() const { return Column; }
42 /// getDWARFContext - get a context for binary DWARF data.
43 static DIContext *getDWARFContext(bool isLittleEndian,
44 StringRef infoSection,
45 StringRef abbrevSection,
46 StringRef aRangeSection = StringRef(),
47 StringRef lineSection = StringRef(),
48 StringRef stringSection = StringRef());
50 virtual void dump(raw_ostream &OS) = 0;
52 virtual DILineInfo getLineInfoForAddress(uint64_t address) = 0;