2017-07-01 03:35:55 +02:00
|
|
|
//===--- DWARFEmitter.h - ---------------------------------------*- C++ -*-===//
|
2017-01-12 22:35:21 +01:00
|
|
|
//
|
2019-01-19 09:50:56 +01:00
|
|
|
// 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
|
2017-01-12 22:35:21 +01:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
/// \file
|
2018-05-01 17:54:18 +02:00
|
|
|
/// Common declarations for yaml2obj
|
2017-01-12 22:35:21 +01:00
|
|
|
//===----------------------------------------------------------------------===//
|
2017-07-01 03:35:55 +02:00
|
|
|
|
2017-01-12 22:35:21 +01:00
|
|
|
#ifndef LLVM_OBJECTYAML_DWARFEMITTER_H
|
|
|
|
#define LLVM_OBJECTYAML_DWARFEMITTER_H
|
|
|
|
|
2017-01-20 20:03:14 +01:00
|
|
|
#include "llvm/ADT/StringMap.h"
|
|
|
|
#include "llvm/ADT/StringRef.h"
|
|
|
|
#include "llvm/Support/Error.h"
|
|
|
|
#include "llvm/Support/Host.h"
|
|
|
|
#include "llvm/Support/MemoryBuffer.h"
|
|
|
|
#include <memory>
|
|
|
|
|
2017-01-12 22:35:21 +01:00
|
|
|
namespace llvm {
|
2017-07-01 03:35:55 +02:00
|
|
|
|
2017-01-12 22:35:21 +01:00
|
|
|
class raw_ostream;
|
|
|
|
|
|
|
|
namespace DWARFYAML {
|
2017-07-01 03:35:55 +02:00
|
|
|
|
2017-01-12 22:35:21 +01:00
|
|
|
struct Data;
|
|
|
|
struct PubSection;
|
|
|
|
|
2017-07-01 03:35:55 +02:00
|
|
|
void EmitDebugAbbrev(raw_ostream &OS, const Data &DI);
|
|
|
|
void EmitDebugStr(raw_ostream &OS, const Data &DI);
|
2017-01-12 22:35:21 +01:00
|
|
|
|
2017-07-01 03:35:55 +02:00
|
|
|
void EmitDebugAranges(raw_ostream &OS, const Data &DI);
|
|
|
|
void EmitPubSection(raw_ostream &OS, const PubSection &Sect,
|
2017-01-12 22:35:21 +01:00
|
|
|
bool IsLittleEndian);
|
2017-07-01 03:35:55 +02:00
|
|
|
void EmitDebugInfo(raw_ostream &OS, const Data &DI);
|
|
|
|
void EmitDebugLine(raw_ostream &OS, const Data &DI);
|
2017-01-12 22:35:21 +01:00
|
|
|
|
2017-01-20 20:03:14 +01:00
|
|
|
Expected<StringMap<std::unique_ptr<MemoryBuffer>>>
|
2018-04-20 14:33:49 +02:00
|
|
|
EmitDebugSections(StringRef YAMLString, bool ApplyFixups = false,
|
2017-01-20 20:03:14 +01:00
|
|
|
bool IsLittleEndian = sys::IsLittleEndianHost);
|
2018-04-20 14:33:49 +02:00
|
|
|
StringMap<std::unique_ptr<MemoryBuffer>>
|
|
|
|
EmitDebugSections(llvm::DWARFYAML::Data &DI, bool ApplyFixups);
|
2017-01-20 20:03:14 +01:00
|
|
|
|
2017-07-01 03:35:55 +02:00
|
|
|
} // end namespace DWARFYAML
|
|
|
|
} // end namespace llvm
|
2017-01-12 22:35:21 +01:00
|
|
|
|
2017-07-01 03:35:55 +02:00
|
|
|
#endif // LLVM_OBJECTYAML_DWARFEMITTER_H
|