xref: /freebsd/contrib/llvm-project/lld/COFF/PDB.h (revision 6419bb52)
1 //===- PDB.h ----------------------------------------------------*- C++ -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLD_COFF_PDB_H
10 #define LLD_COFF_PDB_H
11 
12 #include "llvm/ADT/ArrayRef.h"
13 #include "llvm/ADT/Optional.h"
14 #include "llvm/ADT/StringRef.h"
15 
16 namespace llvm {
17 namespace codeview {
18 union DebugInfo;
19 }
20 }
21 
22 namespace lld {
23 namespace coff {
24 class OutputSection;
25 class SectionChunk;
26 class SymbolTable;
27 
28 void createPDB(SymbolTable *symtab,
29                llvm::ArrayRef<OutputSection *> outputSections,
30                llvm::ArrayRef<uint8_t> sectionTable,
31                llvm::codeview::DebugInfo *buildId);
32 
33 llvm::Optional<std::pair<llvm::StringRef, uint32_t>>
34 getFileLineCodeView(const SectionChunk *c, uint32_t addr);
35 } // namespace coff
36 } // namespace lld
37 
38 #endif
39