unsigned MaxBytesToEmit = 0) override;
void EmitCodeAlignment(unsigned ByteAlignment,
unsigned MaxBytesToEmit = 0) override;
- bool EmitValueToOffset(const MCExpr *Offset, unsigned char Value) override;
+ void emitValueToOffset(const MCExpr *Offset, unsigned char Value) override;
void EmitDwarfLocDirective(unsigned FileNo, unsigned Line,
unsigned Column, unsigned Flags,
unsigned Isa, unsigned Discriminator,
/// expression must be associated with the current section.
/// \param Value - The value to use when filling bytes.
/// \return false on success, true if the offset was invalid.
- virtual bool EmitValueToOffset(const MCExpr *Offset,
- unsigned char Value = 0);
+ virtual void emitValueToOffset(const MCExpr *Offset, unsigned char Value = 0);
/// @}
void EmitCodeAlignment(unsigned ByteAlignment,
unsigned MaxBytesToEmit = 0) override;
- bool EmitValueToOffset(const MCExpr *Offset,
+ void emitValueToOffset(const MCExpr *Offset,
unsigned char Value = 0) override;
void EmitFileDirective(StringRef Filename) override;
1, MaxBytesToEmit);
}
-bool MCAsmStreamer::EmitValueToOffset(const MCExpr *Offset,
+void MCAsmStreamer::emitValueToOffset(const MCExpr *Offset,
unsigned char Value) {
// FIXME: Verify that Offset is associated with the current section.
OS << ".org ";
Offset->print(OS, MAI);
OS << ", " << (unsigned)Value;
EmitEOL();
- return false;
}
void MCAsmStreamer::EmitFileDirective(StringRef Filename) {
cast<MCAlignFragment>(getCurrentFragment())->setEmitNops(true);
}
-bool MCObjectStreamer::EmitValueToOffset(const MCExpr *Offset,
+void MCObjectStreamer::emitValueToOffset(const MCExpr *Offset,
unsigned char Value) {
insert(new MCOrgFragment(*Offset, Value));
- return false;
}
// Associate GPRel32 fixup with data and resize data area
checkForValidSection();
const MCExpr *Offset;
- SMLoc Loc = getTok().getLoc();
if (parseExpression(Offset))
return true;
}
Lex();
-
- // Only limited forms of relocatable expressions are accepted here, it
- // has to be relative to the current section. The streamer will return
- // 'true' if the expression wasn't evaluatable.
- if (getStreamer().EmitValueToOffset(Offset, FillExpr))
- return Error(Loc, "expected assembly-time absolute expression");
-
+ getStreamer().emitValueToOffset(Offset, FillExpr);
return false;
}
"invalid reassignment of non-absolute variable '" +
Name + "'");
} else if (Name == ".") {
- if (Parser.getStreamer().EmitValueToOffset(Value, 0)) {
- Parser.Error(EqualLoc, "expected absolute expression");
- Parser.eatToEndOfStatement();
- return true;
- }
+ Parser.getStreamer().emitValueToOffset(Value, 0);
return false;
} else
Sym = Parser.getContext().getOrCreateSymbol(Name);
unsigned MaxBytesToEmit) {}
void MCStreamer::EmitCodeAlignment(unsigned ByteAlignment,
unsigned MaxBytesToEmit) {}
-bool MCStreamer::EmitValueToOffset(const MCExpr *Offset, unsigned char Value) {
- return false;
-}
+void MCStreamer::emitValueToOffset(const MCExpr *Offset, unsigned char Value) {}
void MCStreamer::EmitBundleAlignMode(unsigned AlignPow2) {}
void MCStreamer::EmitBundleLock(bool AlignToEnd) {}
void MCStreamer::FinishImpl() {}