forked from OSchip/llvm-project
[MC] Add Subtarget for MAsmParser call to emitCodeAlignment
The call to emitCodeAlignment was missing a STI which is required after D45962. emitCodeAlignment has a default parameter of 0 for MaxBytesToEmit. Explicitly passing 0 here was interpreted as as nullptr for the STI. This could possibly be avoided by taking STI as a const reference in emitCodeAlignment. Differential Revision: https://reviews.llvm.org/D109425
This commit is contained in:
parent
35cc4ad354
commit
b026ce9c8a
|
@ -4772,7 +4772,8 @@ bool MasmParser::emitAlignTo(int64_t Alignment) {
|
|||
const MCSection *Section = getStreamer().getCurrentSectionOnly();
|
||||
assert(Section && "must have section to emit alignment");
|
||||
if (Section->UseCodeAlign()) {
|
||||
getStreamer().emitCodeAlignment(Alignment, /*MaxBytesToEmit=*/0);
|
||||
getStreamer().emitCodeAlignment(Alignment, &getTargetParser().getSTI(),
|
||||
/*MaxBytesToEmit=*/0);
|
||||
} else {
|
||||
// FIXME: Target specific behavior about how the "extra" bytes are filled.
|
||||
getStreamer().emitValueToAlignment(Alignment, /*Value=*/0,
|
||||
|
|
Loading…
Reference in New Issue