diff options
author | Craig Topper <craig.topper@gmail.com> | 2012-02-07 05:05:23 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2012-02-07 05:05:23 +0000 |
commit | 858143816d43e58b17bfd11cb1b57afbd7f0f893 (patch) | |
tree | 661162864d8268b96d58b110187f87a8523f0f65 /lib/MC/MCELFStreamer.cpp | |
parent | bc2198133a1836598b54b943420748e75d5dea94 (diff) | |
download | external_llvm-858143816d43e58b17bfd11cb1b57afbd7f0f893.zip external_llvm-858143816d43e58b17bfd11cb1b57afbd7f0f893.tar.gz external_llvm-858143816d43e58b17bfd11cb1b57afbd7f0f893.tar.bz2 |
Convert assert(0) to llvm_unreachable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149967 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCELFStreamer.cpp')
-rw-r--r-- | lib/MC/MCELFStreamer.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/MC/MCELFStreamer.cpp b/lib/MC/MCELFStreamer.cpp index 42a7ebf..607e01c 100644 --- a/lib/MC/MCELFStreamer.cpp +++ b/lib/MC/MCELFStreamer.cpp @@ -60,24 +60,24 @@ public: virtual void EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol); virtual void EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute); virtual void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) { - assert(0 && "ELF doesn't support this directive"); + llvm_unreachable("ELF doesn't support this directive"); } virtual void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment); virtual void BeginCOFFSymbolDef(const MCSymbol *Symbol) { - assert(0 && "ELF doesn't support this directive"); + llvm_unreachable("ELF doesn't support this directive"); } virtual void EmitCOFFSymbolStorageClass(int StorageClass) { - assert(0 && "ELF doesn't support this directive"); + llvm_unreachable("ELF doesn't support this directive"); } virtual void EmitCOFFSymbolType(int Type) { - assert(0 && "ELF doesn't support this directive"); + llvm_unreachable("ELF doesn't support this directive"); } virtual void EndCOFFSymbolDef() { - assert(0 && "ELF doesn't support this directive"); + llvm_unreachable("ELF doesn't support this directive"); } virtual void EmitELFSize(MCSymbol *Symbol, const MCExpr *Value) { @@ -90,11 +90,11 @@ public: virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0, unsigned Size = 0, unsigned ByteAlignment = 0) { - assert(0 && "ELF doesn't support this directive"); + llvm_unreachable("ELF doesn't support this directive"); } virtual void EmitTBSSSymbol(const MCSection *Section, MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment = 0) { - assert(0 && "ELF doesn't support this directive"); + llvm_unreachable("ELF doesn't support this directive"); } virtual void EmitBytes(StringRef Data, unsigned AddrSpace); virtual void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0, @@ -180,7 +180,7 @@ void MCELFStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) { return; } - assert(0 && "invalid assembler flag!"); + llvm_unreachable("invalid assembler flag!"); } void MCELFStreamer::EmitThumbFunc(MCSymbol *Func) { @@ -250,8 +250,7 @@ void MCELFStreamer::EmitSymbolAttribute(MCSymbol *Symbol, case MCSA_WeakDefAutoPrivate: case MCSA_Invalid: case MCSA_IndirectSymbol: - assert(0 && "Invalid symbol attribute for ELF!"); - break; + llvm_unreachable("Invalid symbol attribute for ELF!"); case MCSA_ELF_TypeGnuUniqueObject: // Ignore for now. |