[Object] Report an error if .alt_entry is used with ELF or COFF.

I'm looking into a better way to do this long-term, but for now at least don't
crash.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265815 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Lang Hames 2016-04-08 17:38:51 +00:00
parent 0b5334d47b
commit 62e3955adf
2 changed files with 3 additions and 1 deletions

View File

@ -285,7 +285,7 @@ bool MCELFStreamer::EmitSymbolAttribute(MCSymbol *S, MCSymbolAttr Attribute) {
break;
case MCSA_AltEntry:
llvm_unreachable("ELF doesn't support this attribute");
report_fatal_error("ELF doesn't support the .alt_entry attribute");
}
return true;

View File

@ -107,6 +107,8 @@ bool MCWinCOFFStreamer::EmitSymbolAttribute(MCSymbol *Symbol,
case MCSA_Global:
Symbol->setExternal(true);
break;
case MCSA_AltEntry:
report_fatal_error("COFF doesn't support the .alt_entry attribute");
}
return true;