mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-05 11:18:48 +00:00
2ce5ded6d2
This is the first step towards round-tripping symbol information, and thusly being able to write symbol information to a PDB. This patch writes the symbol information for each compiland to the Yaml when running in pdb2yaml mode. There's still some loose ends, such as what to do about relocations (necessary in order to print linkage names), how to print enums with friendly names, and how to give the dumper access to the StringTable, but this is a good first start. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283641 91177308-0d34-0410-b5e6-96231b3b80d8
36 lines
1.0 KiB
C++
36 lines
1.0 KiB
C++
//===- YamlSerializationContext.h ----------------------------- *- C++ --*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_TOOLS_LLVMPDBDUMP_YAMLSERIALIZATIONCONTEXT_H
|
|
#define LLVM_TOOLS_LLVMPDBDUMP_YAMLSERIALIZATIONCONTEXT_H
|
|
|
|
#include "PdbYaml.h"
|
|
#include "YamlTypeDumper.h"
|
|
#include "llvm/DebugInfo/CodeView/FieldListRecordBuilder.h"
|
|
#include "llvm/DebugInfo/CodeView/MemoryTypeTableBuilder.h"
|
|
|
|
namespace llvm {
|
|
namespace yaml {
|
|
class IO;
|
|
}
|
|
|
|
namespace pdb {
|
|
namespace yaml {
|
|
struct SerializationContext {
|
|
explicit SerializationContext(llvm::yaml::IO &IO, BumpPtrAllocator &Allocator)
|
|
: Dumper(IO, *this), TypeTableBuilder(Allocator) {}
|
|
codeview::yaml::YamlTypeDumperCallbacks Dumper;
|
|
codeview::MemoryTypeTableBuilder TypeTableBuilder;
|
|
codeview::FieldListRecordBuilder FieldListBuilder;
|
|
};
|
|
}
|
|
}
|
|
}
|
|
|
|
#endif |