[llvm] r265815 - [Object] Report an error if .alt_entry is used with ELF or COFF.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 8 10:38:52 PDT 2016
Author: lhames
Date: Fri Apr 8 12:38:51 2016
New Revision: 265815
URL: http://llvm.org/viewvc/llvm-project?rev=265815&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/MC/MCELFStreamer.cpp
llvm/trunk/lib/MC/WinCOFFStreamer.cpp
Modified: llvm/trunk/lib/MC/MCELFStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCELFStreamer.cpp?rev=265815&r1=265814&r2=265815&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCELFStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCELFStreamer.cpp Fri Apr 8 12:38:51 2016
@@ -285,7 +285,7 @@ bool MCELFStreamer::EmitSymbolAttribute(
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;
Modified: llvm/trunk/lib/MC/WinCOFFStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/WinCOFFStreamer.cpp?rev=265815&r1=265814&r2=265815&view=diff
==============================================================================
--- llvm/trunk/lib/MC/WinCOFFStreamer.cpp (original)
+++ llvm/trunk/lib/MC/WinCOFFStreamer.cpp Fri Apr 8 12:38:51 2016
@@ -107,6 +107,8 @@ bool MCWinCOFFStreamer::EmitSymbolAttrib
case MCSA_Global:
Symbol->setExternal(true);
break;
+ case MCSA_AltEntry:
+ report_fatal_error("COFF doesn't support the .alt_entry attribute");
}
return true;
More information about the llvm-commits
mailing list