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
16namespace llvm {
17namespace codeview {
18union DebugInfo;
19}
20}
21
22namespace lld {
23class Timer;
24
25namespace coff {
26class OutputSection;
27class SectionChunk;
28class SymbolTable;
29
30void createPDB(SymbolTable *symtab,
31 llvm::ArrayRef<OutputSection *> outputSections,
32 llvm::ArrayRef<uint8_t> sectionTable,
33 llvm::codeview::DebugInfo *buildId);
34
35llvm::Optional<std::pair<llvm::StringRef, uint32_t>>
36getFileLineCodeView(const SectionChunk *c, uint32_t addr);
37
38extern Timer loadGHashTimer;
39extern Timer mergeGHashTimer;
40
41} // namespace coff
42} // namespace lld
43
44#endif
45