Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/MC/MCParser/AsmParser.cpp
Show First 20 Lines • Show All 1,239 Lines • ▼ Show 20 Lines | if (!Split.second.empty()) { | ||||
} else if (MAI.doesAllowAtInName() && !MAI.useParensForSymbolVariant()) { | } else if (MAI.doesAllowAtInName() && !MAI.useParensForSymbolVariant()) { | ||||
Variant = MCSymbolRefExpr::VK_None; | Variant = MCSymbolRefExpr::VK_None; | ||||
} else { | } else { | ||||
return Error(SMLoc::getFromPointer(Split.second.begin()), | return Error(SMLoc::getFromPointer(Split.second.begin()), | ||||
"invalid variant '" + Split.second + "'"); | "invalid variant '" + Split.second + "'"); | ||||
} | } | ||||
} | } | ||||
MCSymbol *Sym = getContext().getInlineAsmLabel(SymbolName); | MCSymbol *Sym = getContext().getOrCreateSymbol( | ||||
if (!Sym) | |||||
Sym = getContext().getOrCreateSymbol( | |||||
MAI.shouldEmitLabelsInUpperCase() ? SymbolName.upper() : SymbolName); | MAI.shouldEmitLabelsInUpperCase() ? SymbolName.upper() : SymbolName); | ||||
// If this is an absolute variable reference, substitute it now to preserve | // If this is an absolute variable reference, substitute it now to preserve | ||||
// semantics in the face of reassignment. | // semantics in the face of reassignment. | ||||
if (Sym->isVariable()) { | if (Sym->isVariable()) { | ||||
auto V = Sym->getVariableValue(/*SetUsed*/ false); | auto V = Sym->getVariableValue(/*SetUsed*/ false); | ||||
bool DoInline = isa<MCConstantExpr>(V) && !Variant; | bool DoInline = isa<MCConstantExpr>(V) && !Variant; | ||||
if (auto TV = dyn_cast<MCTargetExpr>(V)) | if (auto TV = dyn_cast<MCTargetExpr>(V)) | ||||
▲ Show 20 Lines • Show All 5,186 Lines • Show Last 20 Lines |