mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-15 15:33:56 +00:00
![Amy Huang](/assets/img/avatar_default.png)
Original commit description: [LLD] Remove global state in lld/COFF This patch removes globals from the lldCOFF library, by moving globals into a context class (COFFLinkingContext) and passing it around wherever it's needed. See https://lists.llvm.org/pipermail/llvm-dev/2021-June/151184.html for context about removing globals from LLD. I also haven't moved the `driver` or `config` variables yet. Differential Revision: https://reviews.llvm.org/D109634 This reverts commit a2fd05ada9030eab2258fff25e77a05adccae128. Original commits were b4fa71eed34d967195514fe9b0a5211fca2bc5bc and e03c7e367adb8f228332e3c2ef8f45484597b719.
39 lines
955 B
C++
39 lines
955 B
C++
//===- PDB.h ----------------------------------------------------*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLD_COFF_PDB_H
|
|
#define LLD_COFF_PDB_H
|
|
|
|
#include "llvm/ADT/ArrayRef.h"
|
|
#include "llvm/ADT/Optional.h"
|
|
#include "llvm/ADT/StringRef.h"
|
|
|
|
namespace llvm {
|
|
namespace codeview {
|
|
union DebugInfo;
|
|
}
|
|
}
|
|
|
|
namespace lld {
|
|
class Timer;
|
|
|
|
namespace coff {
|
|
class SectionChunk;
|
|
class COFFLinkerContext;
|
|
|
|
void createPDB(COFFLinkerContext &ctx, llvm::ArrayRef<uint8_t> sectionTable,
|
|
llvm::codeview::DebugInfo *buildId);
|
|
|
|
llvm::Optional<std::pair<llvm::StringRef, uint32_t>>
|
|
getFileLineCodeView(const SectionChunk *c, uint32_t addr);
|
|
|
|
} // namespace coff
|
|
} // namespace lld
|
|
|
|
#endif
|