LLVM
8.0.1
|
Functions | |
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. More... | |
static bool | isSymbolUsedInExpression (const MCSymbol *Sym, const MCExpr *Value) |
Returns whether the given symbol is used anywhere in the given expression, or subexpressions. More... | |
|
static |
Returns whether the given symbol is used anywhere in the given expression, or subexpressions.
Definition at line 5853 of file AsmParser.cpp.
References llvm::MCExpr::Binary, llvm::MCExpr::Constant, llvm::MCExpr::getKind(), llvm::MCBinaryExpr::getLHS(), llvm::MCBinaryExpr::getRHS(), llvm::object::getSymbol(), llvm::MCSymbol::getVariableValue(), llvm::MCSymbol::isVariable(), llvm_unreachable, llvm::MCExpr::SymbolRef, llvm::MCExpr::Target, and llvm::MCExpr::Unary.
Referenced by parseAssignmentExpression().
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.
On success, returns false and sets the Symbol and Value output parameters.
Definition at line 5878 of file AsmParser.cpp.
References llvm::MCStreamer::emitValueToOffset(), llvm::AsmToken::EndOfStatement, llvm::MCAsmParser::Error(), llvm::MCAsmParser::getContext(), llvm::AsmToken::getLoc(), llvm::MCContext::getOrCreateSymbol(), llvm::MCAsmParser::getStreamer(), llvm::MCAsmParser::getTok(), llvm::MCSymbol::getVariableValue(), isSymbolUsedInExpression(), llvm::MCSymbol::isUndefined(), llvm::MCSymbol::isUsed(), llvm::MCSymbol::isVariable(), llvm::MCContext::lookupSymbol(), llvm::MCAsmParser::parseExpression(), llvm::MCAsmParser::parseToken(), llvm::MCSymbol::setRedefinable(), and llvm::MCAsmParser::TokError().
Referenced by llvm::IsCPSRDead< MCInst >(), and isOperator().