LLVM  13.0.0git
Namespaces | Enumerations | Functions | Variables
AsmParser.cpp File Reference
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/DebugInfo/CodeView/SymbolRecord.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCCodeView.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDirectives.h"
#include "llvm/MC/MCDwarf.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInstPrinter.h"
#include "llvm/MC/MCInstrDesc.h"
#include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCObjectFileInfo.h"
#include "llvm/MC/MCParser/AsmCond.h"
#include "llvm/MC/MCParser/AsmLexer.h"
#include "llvm/MC/MCParser/MCAsmLexer.h"
#include "llvm/MC/MCParser/MCAsmParser.h"
#include "llvm/MC/MCParser/MCAsmParserExtension.h"
#include "llvm/MC/MCParser/MCAsmParserUtils.h"
#include "llvm/MC/MCParser/MCParsedAsmOperand.h"
#include "llvm/MC/MCParser/MCTargetAsmParser.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/MCTargetOptions.h"
#include "llvm/MC/MCValue.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MD5.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/SMLoc.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cstddef>
#include <cstdint>
#include <deque>
#include <memory>
#include <sstream>
#include <string>
#include <tuple>
#include <utility>
#include <vector>

Go to the source code of this file.

Namespaces

 llvm
 
 llvm::MCParserUtils
 

Enumerations

enum  { DEFAULT_ADDRSPACE = 0 }
 

Functions

MCAsmParserExtensionllvm::createDarwinAsmParser ()
 
MCAsmParserExtensionllvm::createELFAsmParser ()
 
MCAsmParserExtensionllvm::createCOFFAsmParser ()
 
MCAsmParserExtensionllvm::createWasmAsmParser ()
 
static bool isAngleBracketString (SMLoc &StrLoc, SMLoc &EndLoc)
 This function checks if the next token is <string> type or arithmetic. More...
 
static std::string angleBracketString (StringRef AltMacroStr)
 creating a string without the escape characters '!'. More...
 
static unsigned getDarwinBinOpPrecedence (AsmToken::TokenKind K, MCBinaryExpr::Opcode &Kind, bool ShouldUseLogicalShr)
 
static unsigned getGNUBinOpPrecedence (const MCAsmInfo &MAI, AsmToken::TokenKind K, MCBinaryExpr::Opcode &Kind, bool ShouldUseLogicalShr)
 
static bool isIdentifierChar (char c)
 
static bool isOperator (AsmToken::TokenKind kind)
 
static bool parseHexOcta (AsmParser &Asm, uint64_t &hi, uint64_t &lo)
 
static bool isValidEncoding (int64_t Encoding)
 
static int rewritesSort (const AsmRewrite *AsmRewriteA, const AsmRewrite *AsmRewriteB)
 
static bool llvm::MCParserUtils::isSymbolUsedInExpression (const MCSymbol *Sym, const MCExpr *Value)
 Returns whether the given symbol is used anywhere in the given expression, or subexpressions. More...
 
bool llvm::MCParserUtils::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. More...
 

Variables

cl::opt< unsigned > AsmMacroMaxNestingDepth
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
DEFAULT_ADDRSPACE 

Definition at line 715 of file AsmParser.cpp.

Function Documentation

◆ angleBracketString()

static std::string angleBracketString ( StringRef  AltMacroStr)
static

creating a string without the escape characters '!'.

Definition at line 1411 of file AsmParser.cpp.

References llvm::StringRef::size().

◆ getDarwinBinOpPrecedence()

static unsigned getDarwinBinOpPrecedence ( AsmToken::TokenKind  K,
MCBinaryExpr::Opcode Kind,
bool  ShouldUseLogicalShr 
)
static

◆ getGNUBinOpPrecedence()

static unsigned getGNUBinOpPrecedence ( const MCAsmInfo MAI,
AsmToken::TokenKind  K,
MCBinaryExpr::Opcode Kind,
bool  ShouldUseLogicalShr 
)
static

◆ isAngleBracketString()

static bool isAngleBracketString ( SMLoc StrLoc,
SMLoc EndLoc 
)
static

This function checks if the next token is <string> type or arithmetic.

string that begin with character '<' must end with character '>'. otherwise it is arithmetics. If the function returns a 'true' value, the End argument will be filled with the last location pointed to the '>' character. There is a gap between the AltMacro's documentation and the single quote implementation. GCC does not fully support this feature and so we will not support it. TODO: Adding single quote as a string.

Definition at line 1393 of file AsmParser.cpp.

References assert(), llvm::SMLoc::getFromPointer(), and llvm::SMLoc::getPointer().

◆ isIdentifierChar()

static bool isIdentifierChar ( char  c)
static

Definition at line 2424 of file AsmParser.cpp.

References c.

◆ isOperator()

static bool isOperator ( AsmToken::TokenKind  kind)
static

◆ isValidEncoding()

static bool isValidEncoding ( int64_t  Encoding)
static

◆ parseHexOcta()

static bool parseHexOcta ( AsmParser &  Asm,
uint64_t &  hi,
uint64_t &  lo 
)
static

◆ rewritesSort()

static int rewritesSort ( const AsmRewrite AsmRewriteA,
const AsmRewrite AsmRewriteB 
)
static

Variable Documentation

◆ AsmMacroMaxNestingDepth

cl::opt<unsigned> AsmMacroMaxNestingDepth