Give AsmPrinter the most common expected implementation of
[oota-llvm.git] / lib / Target / PowerPC / PPCMachOWriterInfo.cpp
index b5b71e5a80392b8f6bcc38603d979aa8875c2912..4c14454096caab6047b76ee494d1fcfdad9f5b4d 100644 (file)
@@ -16,6 +16,8 @@
 #include "PPCTargetMachine.h"
 #include "llvm/CodeGen/MachORelocation.h"
 #include "llvm/Support/OutputBuffer.h"
+#include "llvm/Support/ErrorHandling.h"
+#include <cstdio>
 using namespace llvm;
 
 PPCMachOWriterInfo::PPCMachOWriterInfo(const PPCTargetMachine &TM)
@@ -45,9 +47,9 @@ unsigned PPCMachOWriterInfo::GetTargetRelocation(MachineRelocation &MR,
     Addr = (uintptr_t)MR.getResultPointer() + ToAddr;
 
   switch ((PPC::RelocationType)MR.getRelocationType()) {
-  default: assert(0 && "Unknown PPC relocation type!");
+  default: llvm_unreachable("Unknown PPC relocation type!");
   case PPC::reloc_absolute_low_ix:
-    assert(0 && "Unhandled PPC relocation type!");
+    llvm_unreachable("Unhandled PPC relocation type!");
     break;
   case PPC::reloc_vanilla:
     {