1 //===- DWARF.h --------------------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 #include "lld/Common/LLVM.h"
13 #include "llvm/ADT/DenseMap.h"
14 #include "llvm/ADT/StringRef.h"
15 #include "llvm/DebugInfo/DWARF/DWARFContext.h"
16 #include "llvm/DebugInfo/DWARF/DWARFDebugLine.h"
28 DWARFCache(std::unique_ptr<llvm::DWARFContext> dwarf);
29 llvm::Optional<llvm::DILineInfo> getDILineInfo(uint64_t offset,
30 uint64_t sectionIndex);
31 llvm::Optional<std::pair<std::string, unsigned>>
32 getVariableLoc(StringRef name);
34 llvm::DWARFContext *getContext() { return dwarf.get(); }
37 std::unique_ptr<llvm::DWARFContext> dwarf;
38 std::vector<const llvm::DWARFDebugLine::LineTable *> lineTables;
40 const llvm::DWARFDebugLine::LineTable *lt;
44 llvm::DenseMap<StringRef, VarLoc> variableLoc;