//===- MCExpr.h - Assembly Level Expressions --------------------*- C++ -*-===// // // 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 // //===----------------------------------------------------------------------===// #ifndef LLVM_MC_MCEXPR_H #define LLVM_MC_MCEXPR_H #include "llvm/ADT/DenseMap.h" #include "llvm/Support/SMLoc.h" #include <cstdint> namespace llvm { class MCAsmInfo; class MCAssembler; class MCContext; class MCFixup; class MCFragment; class MCSection; class MCStreamer; class MCSymbol; class MCValue; class raw_ostream; class StringRef; SectionAddrMap; /// Base class for the full range of assembler expressions which are /// needed for parsing. class MCExpr { … }; inline raw_ostream &operator<<(raw_ostream &OS, const MCExpr &E) { … } //// Represent a constant integer expression. class MCConstantExpr : public MCExpr { … }; /// Represent a reference to a symbol from inside an expression. /// /// A symbol reference in an expression may be a use of a label, a use of an /// assembler variable (defined constant), or constitute an implicit definition /// of the symbol as external. class MCSymbolRefExpr : public MCExpr { … }; /// Unary assembler expressions. class MCUnaryExpr : public MCExpr { … }; /// Binary assembler expressions. class MCBinaryExpr : public MCExpr { … }; /// This is an extension point for target-specific MCExpr subclasses to /// implement. /// /// NOTE: All subclasses are required to have trivial destructors because /// MCExprs are bump pointer allocated and not destructed. class MCTargetExpr : public MCExpr { … }; } // end namespace llvm #endif // LLVM_MC_MCEXPR_H