You've already forked linux-packaging-mono
Imported Upstream version 6.0.0.172
Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
parent
8016999e4d
commit
64ac736ec5
49
external/llvm/tools/llvm-readobj/COFFImportDumper.cpp
vendored
Normal file
49
external/llvm/tools/llvm-readobj/COFFImportDumper.cpp
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
//===-- COFFImportDumper.cpp - COFF import library dumper -------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
///
|
||||
/// \file
|
||||
/// \brief This file implements the COFF import library dumper for llvm-readobj.
|
||||
///
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/BinaryFormat/COFF.h"
|
||||
#include "llvm/Object/COFF.h"
|
||||
#include "llvm/Object/COFFImportFile.h"
|
||||
|
||||
using namespace llvm::object;
|
||||
|
||||
namespace llvm {
|
||||
|
||||
void dumpCOFFImportFile(const COFFImportFile *File) {
|
||||
outs() << '\n';
|
||||
outs() << "File: " << File->getFileName() << "\n";
|
||||
outs() << "Format: COFF-import-file\n";
|
||||
|
||||
const coff_import_header *H = File->getCOFFImportHeader();
|
||||
switch (H->getType()) {
|
||||
case COFF::IMPORT_CODE: outs() << "Type: code\n"; break;
|
||||
case COFF::IMPORT_DATA: outs() << "Type: data\n"; break;
|
||||
case COFF::IMPORT_CONST: outs() << "Type: const\n"; break;
|
||||
}
|
||||
|
||||
switch (H->getNameType()) {
|
||||
case COFF::IMPORT_ORDINAL: outs() << "Name type: ordinal\n"; break;
|
||||
case COFF::IMPORT_NAME: outs() << "Name type: name\n"; break;
|
||||
case COFF::IMPORT_NAME_NOPREFIX: outs() << "Name type: noprefix\n"; break;
|
||||
case COFF::IMPORT_NAME_UNDECORATE: outs() << "Name type: undecorate\n"; break;
|
||||
}
|
||||
|
||||
for (const object::BasicSymbolRef &Sym : File->symbols()) {
|
||||
outs() << "Symbol: ";
|
||||
Sym.printName(outs());
|
||||
outs() << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace llvm
|
Reference in New Issue
Block a user