xref: /freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.cpp (revision 700637cbb5e582861067a11aaca4d053546871d2)
1 //===-- AArch64MCExpr.cpp - AArch64 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 //===----------------------------------------------------------------------===//
8 
9 #include "AArch64MCAsmInfo.h"
10 #include "llvm/MC/MCContext.h"
11 #include "llvm/MC/MCStreamer.h"
12 #include "llvm/Support/Casting.h"
13 #include "llvm/Support/ErrorHandling.h"
14 
15 using namespace llvm;
16 
create(const MCExpr * Expr,uint16_t Discriminator,AArch64PACKey::ID Key,bool HasAddressDiversity,MCContext & Ctx,SMLoc Loc)17 const AArch64AuthMCExpr *AArch64AuthMCExpr::create(const MCExpr *Expr,
18                                                    uint16_t Discriminator,
19                                                    AArch64PACKey::ID Key,
20                                                    bool HasAddressDiversity,
21                                                    MCContext &Ctx, SMLoc Loc) {
22   return new (Ctx)
23       AArch64AuthMCExpr(Expr, Discriminator, Key, HasAddressDiversity, Loc);
24 }
25