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,
81
81
return false ;
82
82
83
83
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)
87
87
return false ;
88
88
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;
92
91
93
- Sym = MCSymbolRefExpr::create (&Sym->getSymbol (), Modifier, Context);
92
+ // TODO: don't attach specifier to MCSymbolRefExpr.
93
+ Sym = MCSymbolRefExpr::create (Value.getAddSym (), Spec, Context);
94
94
Result = MCValue::get (Sym, nullptr , Value.getConstant ());
95
95
}
96
96
You can’t perform that action at this time.
0 commit comments