forked from OSchip/llvm-project
[WebAssembly] Add an assertion to catch unexpected MCFixupKindInfo flags.
llvm-svn: 257657
This commit is contained in:
parent
983ad65220
commit
a39ca60126
|
@ -73,6 +73,8 @@ void WebAssemblyAsmBackend::applyFixup(const MCFixup &Fixup, char *Data,
|
||||||
unsigned DataSize, uint64_t Value,
|
unsigned DataSize, uint64_t Value,
|
||||||
bool IsPCRel) const {
|
bool IsPCRel) const {
|
||||||
const MCFixupKindInfo &Info = getFixupKindInfo(Fixup.getKind());
|
const MCFixupKindInfo &Info = getFixupKindInfo(Fixup.getKind());
|
||||||
|
assert(Info.Flags == 0 && "WebAssembly does not use MCFixupKindInfo flags");
|
||||||
|
|
||||||
unsigned NumBytes = (Info.TargetSize + 7) / 8;
|
unsigned NumBytes = (Info.TargetSize + 7) / 8;
|
||||||
if (Value == 0)
|
if (Value == 0)
|
||||||
return; // Doesn't change encoding.
|
return; // Doesn't change encoding.
|
||||||
|
|
Loading…
Reference in New Issue