2017-06-21 22:58:17 +02:00
|
|
|
//===- llvm/MC/MCWinCOFFStreamer.cpp --------------------------------------===//
|
2010-07-12 00:05:00 +02:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2014-04-27 05:48:05 +02:00
|
|
|
// This file contains an implementation of a Windows COFF object file streamer.
|
2010-07-12 00:05:00 +02:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2017-02-08 00:02:00 +01:00
|
|
|
#include "llvm/ADT/SmallString.h"
|
|
|
|
#include "llvm/ADT/SmallVector.h"
|
|
|
|
#include "llvm/ADT/Triple.h"
|
|
|
|
#include "llvm/ADT/Twine.h"
|
2017-06-07 05:48:56 +02:00
|
|
|
#include "llvm/BinaryFormat/COFF.h"
|
2012-12-03 17:50:05 +01:00
|
|
|
#include "llvm/MC/MCAsmBackend.h"
|
|
|
|
#include "llvm/MC/MCAssembler.h"
|
|
|
|
#include "llvm/MC/MCCodeEmitter.h"
|
2010-07-12 00:05:00 +02:00
|
|
|
#include "llvm/MC/MCContext.h"
|
2012-12-03 17:50:05 +01:00
|
|
|
#include "llvm/MC/MCExpr.h"
|
2017-02-08 00:02:00 +01:00
|
|
|
#include "llvm/MC/MCFixup.h"
|
|
|
|
#include "llvm/MC/MCFragment.h"
|
2014-01-23 23:49:25 +01:00
|
|
|
#include "llvm/MC/MCObjectFileInfo.h"
|
2012-12-03 17:50:05 +01:00
|
|
|
#include "llvm/MC/MCObjectStreamer.h"
|
2018-05-18 20:26:45 +02:00
|
|
|
#include "llvm/MC/MCObjectWriter.h"
|
2010-07-12 00:05:00 +02:00
|
|
|
#include "llvm/MC/MCSection.h"
|
2015-06-08 19:17:12 +02:00
|
|
|
#include "llvm/MC/MCSymbolCOFF.h"
|
2014-04-27 05:48:05 +02:00
|
|
|
#include "llvm/MC/MCWinCOFFStreamer.h"
|
2017-06-06 13:49:48 +02:00
|
|
|
#include "llvm/Support/Casting.h"
|
2010-07-12 00:05:00 +02:00
|
|
|
#include "llvm/Support/ErrorHandling.h"
|
2014-10-07 21:37:57 +02:00
|
|
|
#include "llvm/Support/MathExtras.h"
|
2017-02-08 00:02:00 +01:00
|
|
|
#include "llvm/Support/SMLoc.h"
|
2017-06-06 13:49:48 +02:00
|
|
|
#include "llvm/Support/raw_ostream.h"
|
2017-02-08 00:02:00 +01:00
|
|
|
#include <algorithm>
|
|
|
|
#include <cassert>
|
|
|
|
#include <cstdint>
|
2011-12-17 02:14:52 +01:00
|
|
|
|
2010-07-12 00:05:00 +02:00
|
|
|
using namespace llvm;
|
|
|
|
|
2014-04-22 05:04:17 +02:00
|
|
|
#define DEBUG_TYPE "WinCOFFStreamer"
|
|
|
|
|
2017-10-11 03:57:21 +02:00
|
|
|
MCWinCOFFStreamer::MCWinCOFFStreamer(MCContext &Context,
|
|
|
|
std::unique_ptr<MCAsmBackend> MAB,
|
2017-10-12 01:34:47 +02:00
|
|
|
std::unique_ptr<MCCodeEmitter> CE,
|
2018-05-18 20:26:45 +02:00
|
|
|
std::unique_ptr<MCObjectWriter> OW)
|
|
|
|
: MCObjectStreamer(Context, std::move(MAB), std::move(OW), std::move(CE)),
|
2017-10-12 01:34:47 +02:00
|
|
|
CurSymbol(nullptr) {}
|
2010-07-19 08:13:10 +02:00
|
|
|
|
2014-04-27 05:48:05 +02:00
|
|
|
void MCWinCOFFStreamer::EmitInstToData(const MCInst &Inst,
|
|
|
|
const MCSubtargetInfo &STI) {
|
|
|
|
MCDataFragment *DF = getOrCreateDataFragment();
|
|
|
|
|
|
|
|
SmallVector<MCFixup, 4> Fixups;
|
|
|
|
SmallString<256> Code;
|
|
|
|
raw_svector_ostream VecOS(Code);
|
2015-05-15 21:13:16 +02:00
|
|
|
getAssembler().getEmitter().encodeInstruction(Inst, VecOS, Fixups, STI);
|
2014-04-27 05:48:05 +02:00
|
|
|
|
|
|
|
// Add the fixups and data.
|
|
|
|
for (unsigned i = 0, e = Fixups.size(); i != e; ++i) {
|
|
|
|
Fixups[i].setOffset(Fixups[i].getOffset() + DF->getContents().size());
|
|
|
|
DF->getFixups().push_back(Fixups[i]);
|
|
|
|
}
|
2018-06-06 11:40:06 +02:00
|
|
|
DF->setHasInstructions(STI);
|
2014-04-27 05:48:05 +02:00
|
|
|
DF->getContents().append(Code.begin(), Code.end());
|
|
|
|
}
|
2010-07-12 00:05:00 +02:00
|
|
|
|
2014-10-15 18:12:52 +02:00
|
|
|
void MCWinCOFFStreamer::InitSections(bool NoExecStack) {
|
2014-01-24 03:28:11 +01:00
|
|
|
// FIXME: this is identical to the ELF one.
|
|
|
|
// This emulates the same behavior of GNU as. This makes it easier
|
|
|
|
// to compare the output as the major sections are in the same order.
|
|
|
|
SwitchSection(getContext().getObjectFileInfo()->getTextSection());
|
2014-02-04 19:34:04 +01:00
|
|
|
EmitCodeAlignment(4);
|
2014-01-24 03:28:11 +01:00
|
|
|
|
|
|
|
SwitchSection(getContext().getObjectFileInfo()->getDataSection());
|
2014-02-04 19:34:04 +01:00
|
|
|
EmitCodeAlignment(4);
|
2014-01-24 03:28:11 +01:00
|
|
|
|
|
|
|
SwitchSection(getContext().getObjectFileInfo()->getBSSSection());
|
2014-02-04 19:34:04 +01:00
|
|
|
EmitCodeAlignment(4);
|
2014-01-24 03:28:11 +01:00
|
|
|
|
|
|
|
SwitchSection(getContext().getObjectFileInfo()->getTextSection());
|
2010-09-15 23:48:40 +02:00
|
|
|
}
|
|
|
|
|
2017-02-10 16:13:12 +01:00
|
|
|
void MCWinCOFFStreamer::EmitLabel(MCSymbol *S, SMLoc Loc) {
|
2016-07-08 23:54:16 +02:00
|
|
|
auto *Symbol = cast<MCSymbolCOFF>(S);
|
2017-02-10 16:13:12 +01:00
|
|
|
MCObjectStreamer::EmitLabel(Symbol, Loc);
|
2010-11-28 17:22:59 +01:00
|
|
|
}
|
|
|
|
|
2014-04-27 05:48:05 +02:00
|
|
|
void MCWinCOFFStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) {
|
2010-07-19 08:13:10 +02:00
|
|
|
llvm_unreachable("not implemented");
|
2010-07-12 00:05:00 +02:00
|
|
|
}
|
|
|
|
|
2014-04-27 05:48:05 +02:00
|
|
|
void MCWinCOFFStreamer::EmitThumbFunc(MCSymbol *Func) {
|
2010-11-05 23:08:08 +01:00
|
|
|
llvm_unreachable("not implemented");
|
|
|
|
}
|
|
|
|
|
2016-07-08 23:54:16 +02:00
|
|
|
bool MCWinCOFFStreamer::EmitSymbolAttribute(MCSymbol *S,
|
2014-04-27 05:48:05 +02:00
|
|
|
MCSymbolAttr Attribute) {
|
2016-07-08 23:54:16 +02:00
|
|
|
auto *Symbol = cast<MCSymbolCOFF>(S);
|
2015-05-29 22:21:02 +02:00
|
|
|
getAssembler().registerSymbol(*Symbol);
|
2014-04-27 05:48:01 +02:00
|
|
|
|
2010-07-19 08:13:10 +02:00
|
|
|
switch (Attribute) {
|
2014-04-27 05:48:01 +02:00
|
|
|
default: return false;
|
2010-07-19 08:13:10 +02:00
|
|
|
case MCSA_WeakReference:
|
2014-04-27 05:48:01 +02:00
|
|
|
case MCSA_Weak:
|
2016-07-08 23:54:16 +02:00
|
|
|
Symbol->setIsWeakExternal();
|
2015-05-29 23:45:01 +02:00
|
|
|
Symbol->setExternal(true);
|
2010-07-19 08:13:10 +02:00
|
|
|
break;
|
|
|
|
case MCSA_Global:
|
2015-05-29 23:45:01 +02:00
|
|
|
Symbol->setExternal(true);
|
2010-07-19 08:13:10 +02:00
|
|
|
break;
|
2016-04-08 19:38:51 +02:00
|
|
|
case MCSA_AltEntry:
|
2016-04-11 20:33:45 +02:00
|
|
|
llvm_unreachable("COFF doesn't support the .alt_entry attribute");
|
2010-07-19 08:13:10 +02:00
|
|
|
}
|
2013-08-09 03:52:03 +02:00
|
|
|
|
|
|
|
return true;
|
2010-07-12 00:05:00 +02:00
|
|
|
}
|
|
|
|
|
2014-04-27 05:48:05 +02:00
|
|
|
void MCWinCOFFStreamer::EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) {
|
2010-07-19 08:13:10 +02:00
|
|
|
llvm_unreachable("not implemented");
|
2010-07-12 00:05:00 +02:00
|
|
|
}
|
|
|
|
|
2016-07-08 23:54:16 +02:00
|
|
|
void MCWinCOFFStreamer::BeginCOFFSymbolDef(MCSymbol const *S) {
|
|
|
|
auto *Symbol = cast<MCSymbolCOFF>(S);
|
2014-05-22 04:18:10 +02:00
|
|
|
if (CurSymbol)
|
2015-11-17 11:00:43 +01:00
|
|
|
Error("starting a new symbol definition without completing the "
|
|
|
|
"previous one");
|
2010-07-19 08:13:10 +02:00
|
|
|
CurSymbol = Symbol;
|
2010-07-12 00:05:00 +02:00
|
|
|
}
|
|
|
|
|
2014-04-27 05:48:05 +02:00
|
|
|
void MCWinCOFFStreamer::EmitCOFFSymbolStorageClass(int StorageClass) {
|
2015-11-17 11:00:43 +01:00
|
|
|
if (!CurSymbol) {
|
|
|
|
Error("storage class specified outside of symbol definition");
|
|
|
|
return;
|
|
|
|
}
|
2014-05-22 04:18:10 +02:00
|
|
|
|
2015-11-17 11:00:43 +01:00
|
|
|
if (StorageClass & ~COFF::SSC_Invalid) {
|
|
|
|
Error("storage class value '" + Twine(StorageClass) +
|
2014-05-22 04:18:10 +02:00
|
|
|
"' out of range");
|
2015-11-17 11:00:43 +01:00
|
|
|
return;
|
|
|
|
}
|
2010-07-19 08:13:10 +02:00
|
|
|
|
2015-05-29 22:21:02 +02:00
|
|
|
getAssembler().registerSymbol(*CurSymbol);
|
2015-06-08 19:17:19 +02:00
|
|
|
cast<MCSymbolCOFF>(CurSymbol)->setClass((uint16_t)StorageClass);
|
2010-07-12 00:05:00 +02:00
|
|
|
}
|
|
|
|
|
2014-04-27 05:48:05 +02:00
|
|
|
void MCWinCOFFStreamer::EmitCOFFSymbolType(int Type) {
|
2015-11-17 11:00:43 +01:00
|
|
|
if (!CurSymbol) {
|
|
|
|
Error("symbol type specified outside of a symbol definition");
|
|
|
|
return;
|
|
|
|
}
|
2014-05-22 04:18:10 +02:00
|
|
|
|
2015-11-17 11:00:43 +01:00
|
|
|
if (Type & ~0xffff) {
|
|
|
|
Error("type value '" + Twine(Type) + "' out of range");
|
|
|
|
return;
|
|
|
|
}
|
2010-07-19 08:13:10 +02:00
|
|
|
|
2015-05-29 22:21:02 +02:00
|
|
|
getAssembler().registerSymbol(*CurSymbol);
|
2015-06-08 19:17:12 +02:00
|
|
|
cast<MCSymbolCOFF>(CurSymbol)->setType((uint16_t)Type);
|
2010-07-12 00:05:00 +02:00
|
|
|
}
|
|
|
|
|
2014-04-27 05:48:05 +02:00
|
|
|
void MCWinCOFFStreamer::EndCOFFSymbolDef() {
|
2014-05-22 04:18:10 +02:00
|
|
|
if (!CurSymbol)
|
2015-11-17 11:00:43 +01:00
|
|
|
Error("ending symbol definition without starting one");
|
2014-04-13 06:57:38 +02:00
|
|
|
CurSymbol = nullptr;
|
2010-07-12 00:05:00 +02:00
|
|
|
}
|
|
|
|
|
2015-05-30 06:56:02 +02:00
|
|
|
void MCWinCOFFStreamer::EmitCOFFSafeSEH(MCSymbol const *Symbol) {
|
2015-06-01 09:34:26 +02:00
|
|
|
// SafeSEH is a feature specific to 32-bit x86. It does not exist (and is
|
|
|
|
// unnecessary) on all platforms which use table-based exception dispatch.
|
|
|
|
if (getContext().getObjectFileInfo()->getTargetTriple().getArch() !=
|
|
|
|
Triple::x86)
|
|
|
|
return;
|
|
|
|
|
2015-06-10 03:02:30 +02:00
|
|
|
const MCSymbolCOFF *CSymbol = cast<MCSymbolCOFF>(Symbol);
|
|
|
|
if (CSymbol->isSafeSEH())
|
2015-05-30 06:56:02 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
MCSection *SXData = getContext().getObjectFileInfo()->getSXDataSection();
|
|
|
|
getAssembler().registerSection(*SXData);
|
|
|
|
if (SXData->getAlignment() < 4)
|
|
|
|
SXData->setAlignment(4);
|
|
|
|
|
2017-11-08 19:57:02 +01:00
|
|
|
new MCSymbolIdFragment(Symbol, SXData);
|
2015-05-30 06:56:02 +02:00
|
|
|
|
|
|
|
getAssembler().registerSymbol(*Symbol);
|
2015-06-10 03:02:30 +02:00
|
|
|
CSymbol->setIsSafeSEH();
|
|
|
|
|
|
|
|
// The Microsoft linker requires that the symbol type of a handler be
|
|
|
|
// function. Go ahead and oblige it here.
|
|
|
|
CSymbol->setType(COFF::IMAGE_SYM_DTYPE_FUNCTION
|
|
|
|
<< COFF::SCT_COMPLEX_TYPE_SHIFT);
|
2015-05-30 06:56:02 +02:00
|
|
|
}
|
|
|
|
|
2018-01-10 00:49:30 +01:00
|
|
|
void MCWinCOFFStreamer::EmitCOFFSymbolIndex(MCSymbol const *Symbol) {
|
|
|
|
MCSection *Sec = getCurrentSectionOnly();
|
|
|
|
getAssembler().registerSection(*Sec);
|
|
|
|
if (Sec->getAlignment() < 4)
|
|
|
|
Sec->setAlignment(4);
|
|
|
|
|
|
|
|
new MCSymbolIdFragment(Symbol, getCurrentSectionOnly());
|
|
|
|
|
|
|
|
getAssembler().registerSymbol(*Symbol);
|
|
|
|
}
|
|
|
|
|
2017-06-22 23:02:14 +02:00
|
|
|
void MCWinCOFFStreamer::EmitCOFFSectionIndex(const MCSymbol *Symbol) {
|
|
|
|
visitUsedSymbol(*Symbol);
|
2013-12-20 19:15:00 +01:00
|
|
|
MCDataFragment *DF = getOrCreateDataFragment();
|
2015-05-30 03:25:56 +02:00
|
|
|
const MCSymbolRefExpr *SRE = MCSymbolRefExpr::create(Symbol, getContext());
|
2015-05-15 21:13:05 +02:00
|
|
|
MCFixup Fixup = MCFixup::create(DF->getContents().size(), SRE, FK_SecRel_2);
|
2014-04-27 05:48:01 +02:00
|
|
|
DF->getFixups().push_back(Fixup);
|
2014-10-08 20:01:49 +02:00
|
|
|
DF->getContents().resize(DF->getContents().size() + 2, 0);
|
2013-12-20 19:15:00 +01:00
|
|
|
}
|
|
|
|
|
2017-06-22 23:02:14 +02:00
|
|
|
void MCWinCOFFStreamer::EmitCOFFSecRel32(const MCSymbol *Symbol,
|
2017-01-02 04:00:19 +01:00
|
|
|
uint64_t Offset) {
|
2017-06-22 23:02:14 +02:00
|
|
|
visitUsedSymbol(*Symbol);
|
2011-12-17 02:14:52 +01:00
|
|
|
MCDataFragment *DF = getOrCreateDataFragment();
|
2017-01-02 04:00:19 +01:00
|
|
|
// Create Symbol A for the relocation relative reference.
|
|
|
|
const MCExpr *MCE = MCSymbolRefExpr::create(Symbol, getContext());
|
|
|
|
// Add the constant offset, if given.
|
|
|
|
if (Offset)
|
|
|
|
MCE = MCBinaryExpr::createAdd(
|
|
|
|
MCE, MCConstantExpr::create(Offset, getContext()), getContext());
|
|
|
|
// Build the secrel32 relocation.
|
|
|
|
MCFixup Fixup = MCFixup::create(DF->getContents().size(), MCE, FK_SecRel_4);
|
|
|
|
// Record the relocation.
|
2014-04-27 05:48:01 +02:00
|
|
|
DF->getFixups().push_back(Fixup);
|
2017-01-02 04:00:19 +01:00
|
|
|
// Emit 4 bytes (zeros) to the object file.
|
2011-12-17 02:14:52 +01:00
|
|
|
DF->getContents().resize(DF->getContents().size() + 4, 0);
|
|
|
|
}
|
|
|
|
|
2018-07-26 22:11:26 +02:00
|
|
|
void MCWinCOFFStreamer::EmitCOFFImgRel32(const MCSymbol *Symbol,
|
|
|
|
int64_t Offset) {
|
|
|
|
visitUsedSymbol(*Symbol);
|
|
|
|
MCDataFragment *DF = getOrCreateDataFragment();
|
|
|
|
// Create Symbol A for the relocation relative reference.
|
|
|
|
const MCExpr *MCE = MCSymbolRefExpr::create(
|
|
|
|
Symbol, MCSymbolRefExpr::VK_COFF_IMGREL32, getContext());
|
|
|
|
// Add the constant offset, if given.
|
|
|
|
if (Offset)
|
|
|
|
MCE = MCBinaryExpr::createAdd(
|
|
|
|
MCE, MCConstantExpr::create(Offset, getContext()), getContext());
|
|
|
|
// Build the imgrel relocation.
|
|
|
|
MCFixup Fixup = MCFixup::create(DF->getContents().size(), MCE, FK_Data_4);
|
|
|
|
// Record the relocation.
|
|
|
|
DF->getFixups().push_back(Fixup);
|
|
|
|
// Emit 4 bytes (zeros) to the object file.
|
|
|
|
DF->getContents().resize(DF->getContents().size() + 4, 0);
|
|
|
|
}
|
|
|
|
|
2016-07-08 23:54:16 +02:00
|
|
|
void MCWinCOFFStreamer::EmitCommonSymbol(MCSymbol *S, uint64_t Size,
|
2014-04-27 05:48:05 +02:00
|
|
|
unsigned ByteAlignment) {
|
2016-07-08 23:54:16 +02:00
|
|
|
auto *Symbol = cast<MCSymbolCOFF>(S);
|
2014-04-09 00:33:40 +02:00
|
|
|
|
2014-09-21 11:18:07 +02:00
|
|
|
const Triple &T = getContext().getObjectFileInfo()->getTargetTriple();
|
2014-10-08 08:38:53 +02:00
|
|
|
if (T.isKnownWindowsMSVCEnvironment()) {
|
2014-09-21 11:18:07 +02:00
|
|
|
if (ByteAlignment > 32)
|
|
|
|
report_fatal_error("alignment is limited to 32-bytes");
|
2014-10-07 21:37:57 +02:00
|
|
|
|
2014-10-08 08:38:53 +02:00
|
|
|
// Round size up to alignment so that we will honor the alignment request.
|
|
|
|
Size = std::max(Size, static_cast<uint64_t>(ByteAlignment));
|
|
|
|
}
|
2014-04-09 00:33:40 +02:00
|
|
|
|
2015-05-29 22:21:02 +02:00
|
|
|
getAssembler().registerSymbol(*Symbol);
|
2015-05-29 23:45:01 +02:00
|
|
|
Symbol->setExternal(true);
|
2015-05-29 19:48:04 +02:00
|
|
|
Symbol->setCommon(Size, ByteAlignment);
|
2014-10-07 21:37:57 +02:00
|
|
|
|
|
|
|
if (!T.isKnownWindowsMSVCEnvironment() && ByteAlignment > 1) {
|
|
|
|
SmallString<128> Directive;
|
|
|
|
raw_svector_ostream OS(Directive);
|
|
|
|
const MCObjectFileInfo *MFI = getContext().getObjectFileInfo();
|
|
|
|
|
|
|
|
OS << " -aligncomm:\"" << Symbol->getName() << "\","
|
|
|
|
<< Log2_32_Ceil(ByteAlignment);
|
|
|
|
|
|
|
|
PushSection();
|
|
|
|
SwitchSection(MFI->getDrectveSection());
|
|
|
|
EmitBytes(Directive);
|
|
|
|
PopSection();
|
|
|
|
}
|
2010-07-12 00:05:00 +02:00
|
|
|
}
|
|
|
|
|
2016-07-08 23:54:16 +02:00
|
|
|
void MCWinCOFFStreamer::EmitLocalCommonSymbol(MCSymbol *S, uint64_t Size,
|
2014-04-27 05:48:05 +02:00
|
|
|
unsigned ByteAlignment) {
|
2016-07-08 23:54:16 +02:00
|
|
|
auto *Symbol = cast<MCSymbolCOFF>(S);
|
2014-04-09 00:33:40 +02:00
|
|
|
|
2015-05-21 21:20:38 +02:00
|
|
|
MCSection *Section = getContext().getObjectFileInfo()->getBSSSection();
|
2018-01-09 22:55:10 +01:00
|
|
|
PushSection();
|
|
|
|
SwitchSection(Section);
|
|
|
|
EmitValueToAlignment(ByteAlignment, 0, 1, 0);
|
|
|
|
EmitLabel(Symbol);
|
2015-05-29 23:45:01 +02:00
|
|
|
Symbol->setExternal(false);
|
2018-01-09 22:55:10 +01:00
|
|
|
EmitZeros(Size);
|
|
|
|
PopSection();
|
2010-07-12 00:05:00 +02:00
|
|
|
}
|
|
|
|
|
2015-05-21 21:20:38 +02:00
|
|
|
void MCWinCOFFStreamer::EmitZerofill(MCSection *Section, MCSymbol *Symbol,
|
2018-07-02 19:29:43 +02:00
|
|
|
uint64_t Size, unsigned ByteAlignment,
|
|
|
|
SMLoc Loc) {
|
2010-07-19 08:13:10 +02:00
|
|
|
llvm_unreachable("not implemented");
|
2010-07-12 00:05:00 +02:00
|
|
|
}
|
|
|
|
|
2015-05-21 21:20:38 +02:00
|
|
|
void MCWinCOFFStreamer::EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol,
|
|
|
|
uint64_t Size, unsigned ByteAlignment) {
|
2010-07-19 08:13:10 +02:00
|
|
|
llvm_unreachable("not implemented");
|
2010-07-12 00:05:00 +02:00
|
|
|
}
|
|
|
|
|
2013-10-16 03:05:45 +02:00
|
|
|
// TODO: Implement this if you want to emit .comment section in COFF obj files.
|
2014-04-27 05:48:05 +02:00
|
|
|
void MCWinCOFFStreamer::EmitIdent(StringRef IdentString) {
|
2014-04-27 05:48:01 +02:00
|
|
|
llvm_unreachable("not implemented");
|
2013-10-16 03:05:45 +02:00
|
|
|
}
|
|
|
|
|
2017-10-10 03:26:25 +02:00
|
|
|
void MCWinCOFFStreamer::EmitWinEHHandlerData(SMLoc Loc) {
|
2014-04-27 05:48:12 +02:00
|
|
|
llvm_unreachable("not implemented");
|
2011-05-22 05:01:05 +02:00
|
|
|
}
|
|
|
|
|
2014-04-27 05:48:05 +02:00
|
|
|
void MCWinCOFFStreamer::FinishImpl() {
|
2012-01-07 04:13:18 +01:00
|
|
|
MCObjectStreamer::FinishImpl();
|
2010-07-12 00:05:00 +02:00
|
|
|
}
|
2014-05-22 04:18:10 +02:00
|
|
|
|
2015-11-17 11:00:43 +01:00
|
|
|
void MCWinCOFFStreamer::Error(const Twine &Msg) const {
|
|
|
|
getContext().reportError(SMLoc(), Msg);
|
2014-05-22 04:18:10 +02:00
|
|
|
}
|