mirror of
https://github.com/RPCS3/llvm.git
synced 2025-05-17 10:55:58 +00:00

Previously we wrote line information and file checksum information, but we did not write information about inlinee lines and functions. This patch adds support for that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301936 91177308-0d34-0410-b5e6-96231b3b80d8
53 lines
1.8 KiB
C++
53 lines
1.8 KiB
C++
//===- ModuleDebugFragmentVisitor.cpp ---------------------------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/DebugInfo/CodeView/ModuleDebugFragmentVisitor.h"
|
|
|
|
#include "llvm/DebugInfo/CodeView/ModuleDebugFileChecksumFragment.h"
|
|
#include "llvm/DebugInfo/CodeView/ModuleDebugFragmentRecord.h"
|
|
#include "llvm/DebugInfo/CodeView/ModuleDebugInlineeLinesFragment.h"
|
|
#include "llvm/DebugInfo/CodeView/ModuleDebugLineFragment.h"
|
|
#include "llvm/DebugInfo/CodeView/ModuleDebugUnknownFragment.h"
|
|
#include "llvm/Support/BinaryStreamReader.h"
|
|
#include "llvm/Support/BinaryStreamRef.h"
|
|
|
|
using namespace llvm;
|
|
using namespace llvm::codeview;
|
|
|
|
Error llvm::codeview::visitModuleDebugFragment(
|
|
const ModuleDebugFragmentRecord &R, ModuleDebugFragmentVisitor &V) {
|
|
BinaryStreamReader Reader(R.getRecordData());
|
|
switch (R.kind()) {
|
|
case ModuleDebugFragmentKind::Lines: {
|
|
ModuleDebugLineFragmentRef Fragment;
|
|
if (auto EC = Fragment.initialize(Reader))
|
|
return EC;
|
|
|
|
return V.visitLines(Fragment);
|
|
}
|
|
case ModuleDebugFragmentKind::FileChecksums: {
|
|
ModuleDebugFileChecksumFragmentRef Fragment;
|
|
if (auto EC = Fragment.initialize(Reader))
|
|
return EC;
|
|
|
|
return V.visitFileChecksums(Fragment);
|
|
}
|
|
case ModuleDebugFragmentKind::InlineeLines: {
|
|
ModuleDebugInlineeLineFragmentRef Fragment;
|
|
if (auto EC = Fragment.initialize(Reader))
|
|
return EC;
|
|
return V.visitInlineeLines(Fragment);
|
|
}
|
|
default: {
|
|
ModuleDebugUnknownFragmentRef Fragment(R.kind(), R.getRecordData());
|
|
return V.visitUnknown(Fragment);
|
|
}
|
|
}
|
|
}
|