LLVM 22.0.0git
LoongArchMCAsmInfo.h
Go to the documentation of this file.
1//===-- LoongArchMCAsmInfo.h - LoongArch Asm Info --------------*- C++ -*--===//
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// This file contains the declaration of the LoongArchMCAsmInfo class.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_LOONGARCH_MCTARGETDESC_LOONGARCHMCASMINFO_H
14#define LLVM_LIB_TARGET_LOONGARCH_MCTARGETDESC_LOONGARCHMCASMINFO_H
15
17#include "llvm/MC/MCExpr.h"
18
19namespace llvm {
20class Triple;
21class StringRef;
22
23class LoongArchMCExpr : public MCSpecifierExpr {
24public:
26 enum { VK_None };
27
28private:
29 const bool RelaxHint;
30
31 explicit LoongArchMCExpr(const MCExpr *Expr, Specifier S, bool Hint)
32 : MCSpecifierExpr(Expr, S), RelaxHint(Hint) {}
33
34public:
35 static const LoongArchMCExpr *create(const MCExpr *Expr, uint16_t S,
36 MCContext &Ctx, bool Hint = false);
37
38 bool getRelaxHint() const { return RelaxHint; }
39};
40
42 void anchor() override;
43
44public:
45 explicit LoongArchMCAsmInfo(const Triple &TargetTriple);
47 const MCSpecifierExpr &Expr) const override;
48};
49
50namespace LoongArch {
52} // namespace LoongArch
53
54} // end namespace llvm
55
56#endif // LLVM_LIB_TARGET_LOONGARCH_MCTARGETDESC_LOONGARCHMCASMINFO_H
static const char * name
LoongArchMCAsmInfo(const Triple &TargetTriple)
void printSpecifierExpr(raw_ostream &OS, const MCSpecifierExpr &Expr) const override
static const LoongArchMCExpr * create(const MCExpr *Expr, uint16_t S, MCContext &Ctx, bool Hint=false)
Base class for the full range of assembler expressions which are needed for parsing.
Definition MCExpr.h:34
MCExpr(ExprKind Kind, SMLoc Loc, unsigned SubclassData=0)
Definition MCExpr.h:67
Extension point for target-specific MCExpr subclasses with a relocation specifier,...
Definition MCExpr.h:495
const MCExpr * Expr
Definition MCExpr.h:497
MCSpecifierExpr(const MCExpr *Expr, Spec S, SMLoc Loc=SMLoc())
Definition MCExpr.h:499
StringRef - Represent a constant reference to a string, i.e.
Definition StringRef.h:55
Triple - Helper class for working with autoconf configuration names.
Definition Triple.h:47
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
uint16_t parseSpecifier(StringRef name)
This is an optimization pass for GlobalISel generic memory operations.