Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[llvm-objdump][COFF][NFC] Split format-specific interfaces; add names…
…pace Summary: This patch addresses, for the interfaces implemented by `COFFDump.cpp`, multiple issues identified with the current structure of `llvm-objdump.h` in the review of D72973. This patch moves implementation details of the tool into an `llvm::objdump` namespace for external linkage names, splits the implementation details into separate headers for each implementation file, and uses qualified names when declaring members of the `llvm::objdump` namespace in place of leaving the namespace definition open. Reviewers: jhenderson, DiggerLin, jasonliu, daltenty, MaskRay Reviewed By: jhenderson, MaskRay Subscribers: MaskRay, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77285
- Loading branch information
1 parent
b94afc1
commit 2aab46a
Showing
4 changed files
with
49 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
//===-- COFFDump.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 LLVM_TOOLS_LLVM_OBJDUMP_COFFDUMP_H | ||
#define LLVM_TOOLS_LLVM_OBJDUMP_COFFDUMP_H | ||
|
||
#include "llvm/ADT/SmallVector.h" | ||
|
||
namespace llvm { | ||
|
||
class Error; | ||
|
||
namespace object { | ||
class COFFObjectFile; | ||
class COFFImportFile; | ||
class ObjectFile; | ||
class RelocationRef; | ||
} // namespace object | ||
|
||
namespace objdump { | ||
Error getCOFFRelocationValueString(const object::COFFObjectFile *Obj, | ||
const object::RelocationRef &Rel, | ||
llvm::SmallVectorImpl<char> &Result); | ||
|
||
void printCOFFUnwindInfo(const object::COFFObjectFile *O); | ||
void printCOFFFileHeader(const object::ObjectFile *O); | ||
void printCOFFSymbolTable(const object::COFFImportFile *I); | ||
void printCOFFSymbolTable(const object::COFFObjectFile *O); | ||
} // namespace objdump | ||
} // namespace llvm | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters