[Alignment][NFC] Use Align with TargetLowering::setMinFunctionAlignment
[llvm-core.git] / lib / Target / ARM / MCTargetDesc / ARMMCExpr.cpp
blobfbad05fb1759fece1fccf417c93e750ebc2e7910
1 //===-- ARMMCExpr.cpp - ARM specific MC expression classes ----------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
9 #include "ARMMCExpr.h"
10 #include "llvm/MC/MCContext.h"
11 #include "llvm/MC/MCStreamer.h"
12 using namespace llvm;
14 #define DEBUG_TYPE "armmcexpr"
16 const ARMMCExpr*
17 ARMMCExpr::create(VariantKind Kind, const MCExpr *Expr,
18 MCContext &Ctx) {
19 return new (Ctx) ARMMCExpr(Kind, Expr);
22 void ARMMCExpr::printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const {
23 switch (Kind) {
24 default: llvm_unreachable("Invalid kind!");
25 case VK_ARM_HI16: OS << ":upper16:"; break;
26 case VK_ARM_LO16: OS << ":lower16:"; break;
29 const MCExpr *Expr = getSubExpr();
30 if (Expr->getKind() != MCExpr::SymbolRef)
31 OS << '(';
32 Expr->print(OS, MAI);
33 if (Expr->getKind() != MCExpr::SymbolRef)
34 OS << ')';
37 void ARMMCExpr::visitUsedExpr(MCStreamer &Streamer) const {
38 Streamer.visitUsedExpr(*getSubExpr());