mirror of
https://github.com/RPCS3/llvm.git
synced 2025-05-21 04:46:17 +00:00

Stubs out a number of the classes needed to produce a new object file format (XCOFF) for the powerpc-aix target. For testing input is an empty module which produces an object file with just a file header. Differential Revision: https://reviews.llvm.org/D61694 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365541 91177308-0d34-0410-b5e6-96231b3b80d8
34 lines
1.1 KiB
C++
34 lines
1.1 KiB
C++
//===- lib/MC/MCSectionXCOFF.cpp - XCOFF Code Section Representation ------===//
|
|
//
|
|
// 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/MC/MCSectionXCOFF.h"
|
|
#include "llvm/MC/MCAsmInfo.h"
|
|
#include "llvm/MC/MCExpr.h"
|
|
#include "llvm/Support/raw_ostream.h"
|
|
|
|
using namespace llvm;
|
|
|
|
MCSectionXCOFF::~MCSectionXCOFF() = default;
|
|
|
|
void MCSectionXCOFF::PrintSwitchToSection(const MCAsmInfo &MAI, const Triple &T,
|
|
raw_ostream &OS,
|
|
const MCExpr *Subsection) const {
|
|
if (getKind().isText()) {
|
|
OS << "\t.csect " << getSectionName() << "["
|
|
<< "PR"
|
|
<< "]" << '\n';
|
|
return;
|
|
}
|
|
|
|
report_fatal_error("Printing for this SectionKind is unimplemented.");
|
|
}
|
|
|
|
bool MCSectionXCOFF::UseCodeAlign() const { return getKind().isText(); }
|
|
|
|
bool MCSectionXCOFF::isVirtualSection() const { return !getKind().isCommon(); }
|