1 //===-- ARMMCExpr.cpp - ARM specific MC expression classes ----------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 #include "llvm/MC/MCContext.h"
11 #include "llvm/MC/MCStreamer.h"
14 #define DEBUG_TYPE "armmcexpr"
17 ARMMCExpr::create(VariantKind Kind
, const MCExpr
*Expr
,
19 return new (Ctx
) ARMMCExpr(Kind
, Expr
);
22 void ARMMCExpr::printImpl(raw_ostream
&OS
, const MCAsmInfo
*MAI
) const {
24 default: llvm_unreachable("Invalid kind!");
45 const MCExpr
*Expr
= getSubExpr();
46 if (Expr
->getKind() != MCExpr::SymbolRef
)
49 if (Expr
->getKind() != MCExpr::SymbolRef
)
53 void ARMMCExpr::visitUsedExpr(MCStreamer
&Streamer
) const {
54 Streamer
.visitUsedExpr(*getSubExpr());