LLVM 23.0.0git
MCAsmParserUtils.h
Go to the documentation of this file.
1//===- llvm/MC/MCAsmParserUtils.h - Asm Parser Utilities --------*- 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#ifndef LLVM_MC_MCPARSER_MCASMPARSERUTILS_H
10#define LLVM_MC_MCPARSER_MCASMPARSERUTILS_H
11
13
14namespace llvm {
15
16class MCAsmParser;
17class MCExpr;
18class MCSymbol;
19class StringRef;
20
21namespace MCParserUtils {
22
23/// Parse a value expression and return whether it can be assigned to a symbol
24/// with the given name.
25///
26/// On success, returns false and sets the Symbol and Value output parameters.
27LLVM_ABI bool parseAssignmentExpression(StringRef Name, bool allow_redef,
28 MCAsmParser &Parser, MCSymbol *&Symbol,
29 const MCExpr *&Value);
30
31} // namespace MCParserUtils
32
33} // namespace llvm
34
35#endif // LLVM_MC_MCPARSER_MCASMPARSERUTILS_H
#define LLVM_ABI
Definition Compiler.h:213
Generic assembler parser interface, for use by target specific assembly parsers.
Base class for the full range of assembler expressions which are needed for parsing.
Definition MCExpr.h:34
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition MCSymbol.h:42
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
LLVM Value Representation.
Definition Value.h:75
LLVM_ABI bool parseAssignmentExpression(StringRef Name, bool allow_redef, MCAsmParser &Parser, MCSymbol *&Symbol, const MCExpr *&Value)
Parse a value expression and return whether it can be assigned to a symbol with the given name.
This is an optimization pass for GlobalISel generic memory operations.