//===-- W65816ELFStreamer.cpp - W65816 ELF Target Streamer Methods --------===//
//
// 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
//
//===----------------------------------------------------------------------===//
//
// This file provides a stub W65816 ELF target streamer.  The MSP430 reference
// emits a vendor build-attributes section here; the W65816 equivalent (code
// model, DP reservation, etc.) will be added later.
//
//===----------------------------------------------------------------------===//

#include "W65816MCTargetDesc.h"
#include "llvm/MC/MCELFStreamer.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSubtargetInfo.h"

using namespace llvm;

namespace llvm {

class W65816TargetELFStreamer : public MCTargetStreamer {
public:
  W65816TargetELFStreamer(MCStreamer &S, const MCSubtargetInfo &STI)
      : MCTargetStreamer(S) {
    // No vendor attributes are emitted yet; this is intentionally empty.
  }
};

MCTargetStreamer *
createW65816ObjectTargetStreamer(MCStreamer &S, const MCSubtargetInfo &STI) {
  const Triple &TT = STI.getTargetTriple();
  if (TT.isOSBinFormatELF())
    return new W65816TargetELFStreamer(S, STI);
  return nullptr;
}

} // namespace llvm
