xref: /freebsd/contrib/llvm-project/lld/COFF/PDB.h (revision 8ddb146abcdf061be9f2c0db7e391697dafad85c)
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 class Timer;
24 
25 namespace coff {
26 class SectionChunk;
27 class COFFLinkerContext;
28 
29 void createPDB(COFFLinkerContext &ctx, llvm::ArrayRef<uint8_t> sectionTable,
30                llvm::codeview::DebugInfo *buildId);
31 
32 llvm::Optional<std::pair<llvm::StringRef, uint32_t>>
33 getFileLineCodeView(const SectionChunk *c, uint32_t addr);
34 
35 } // namespace coff
36 } // namespace lld
37 
38 #endif
39