const MCAsmLayout *Layout) const {
MCValue Value;
- if (Layout && !getSubExpr()->EvaluateAsRelocatable(Value, *Layout))
+ if (!Layout || !getSubExpr()->EvaluateAsRelocatable(Value, *Layout))
return false;
if (Value.isAbsolute()) {
break;
}
Res = MCValue::get(Result);
- } else if (Layout) {
+ } else {
MCContext &Context = Layout->getAssembler().getContext();
const MCSymbolRefExpr *Sym = Value.getSymA();
MCSymbolRefExpr::VariantKind Modifier = Sym->getKind();
}
Sym = MCSymbolRefExpr::Create(&Sym->getSymbol(), Modifier, Context);
Res = MCValue::get(Sym, Value.getSymB(), Value.getConstant());
- } else
- return false;
+ }
return true;
}