Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/MC/MCParser/MasmParser.cpp
Show First 20 Lines • Show All 1,675 Lines • ▼ Show 20 Lines | if (Split.second.empty()) { | ||||
lookUpField(Base, Member, Info); | lookUpField(Base, Member, Info); | ||||
} else if (Structs.count(SymbolName.lower())) { | } else if (Structs.count(SymbolName.lower())) { | ||||
// This is actually a reference to a field offset. | // This is actually a reference to a field offset. | ||||
Res = MCConstantExpr::create(Info.Offset, getContext()); | Res = MCConstantExpr::create(Info.Offset, getContext()); | ||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
MCSymbol *Sym = getContext().getInlineAsmLabel(SymbolName); | MCSymbol *Sym = getContext().lookupSymbol(SymbolName); | ||||
if (!Sym) { | if (!Sym) { | ||||
// If this is a built-in numeric value, treat it as a constant. | // If this is a built-in numeric value, treat it as a constant. | ||||
auto BuiltinIt = BuiltinSymbolMap.find(SymbolName.lower()); | auto BuiltinIt = BuiltinSymbolMap.find(SymbolName.lower()); | ||||
const BuiltinSymbol Symbol = (BuiltinIt == BuiltinSymbolMap.end()) | const BuiltinSymbol Symbol = (BuiltinIt == BuiltinSymbolMap.end()) | ||||
? BI_NO_SYMBOL | ? BI_NO_SYMBOL | ||||
: BuiltinIt->getValue(); | : BuiltinIt->getValue(); | ||||
if (Symbol != BI_NO_SYMBOL) { | if (Symbol != BI_NO_SYMBOL) { | ||||
const MCExpr *Value = evaluateBuiltinValue(Symbol, FirstTokenLoc); | const MCExpr *Value = evaluateBuiltinValue(Symbol, FirstTokenLoc); | ||||
▲ Show 20 Lines • Show All 6,036 Lines • Show Last 20 Lines |