File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
llvm/lib/Target/AVR/MCTargetDesc Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -81,16 +81,16 @@ bool AVRMCExpr::evaluateAsRelocatableImpl(MCValue &Result,
8181 return false ;
8282
8383 MCContext &Context = Asm->getContext ();
84- const MCSymbolRefExpr *Sym = Value. getSymA () ;
85- MCSymbolRefExpr::VariantKind Modifier = Sym-> getKind () ;
86- if (Modifier != MCSymbolRefExpr::VK_None)
84+ const MCSymbolRefExpr *Sym = nullptr ;
85+ auto Spec = AVRMCExpr::VK_None ;
86+ if (Value. getSymSpecifier () != MCSymbolRefExpr::VK_None)
8787 return false ;
8888 assert (!Value.getSubSym ());
89- if (specifier == VK_PM) {
90- Modifier = MCSymbolRefExpr::VariantKind (AVRMCExpr::VK_PM);
91- }
89+ if (specifier == VK_PM)
90+ Spec = AVRMCExpr::VK_PM;
9291
93- Sym = MCSymbolRefExpr::create (&Sym->getSymbol (), Modifier, Context);
92+ // TODO: don't attach specifier to MCSymbolRefExpr.
93+ Sym = MCSymbolRefExpr::create (Value.getAddSym (), Spec, Context);
9494 Result = MCValue::get (Sym, nullptr , Value.getConstant ());
9595 }
9696
You can’t perform that action at this time.
0 commit comments