List all exception types in a switch.

llvm-svn: 130944
This commit is contained in:
Rafael Espindola 2011-05-05 19:48:34 +00:00
parent 3dc73aae5e
commit 240c96e2ca
1 changed files with 15 additions and 14 deletions

View File

@ -189,21 +189,22 @@ bool AsmPrinter::doInitialization(Module &M) {
if (MAI->doesSupportDebugInformation()) if (MAI->doesSupportDebugInformation())
DD = new DwarfDebug(this, &M); DD = new DwarfDebug(this, &M);
if (MAI->doesSupportExceptionHandling()) switch (MAI->getExceptionHandlingType()) {
switch (MAI->getExceptionHandlingType()) { case ExceptionHandling::None:
default: return false;
case ExceptionHandling::DwarfTable: case ExceptionHandling::SjLj:
DE = new DwarfTableException(this); case ExceptionHandling::DwarfTable:
break; DE = new DwarfTableException(this);
case ExceptionHandling::DwarfCFI: return false;
DE = new DwarfCFIException(this); case ExceptionHandling::DwarfCFI:
break; DE = new DwarfCFIException(this);
case ExceptionHandling::ARM: return false;
DE = new ARMException(this); case ExceptionHandling::ARM:
break; DE = new ARMException(this);
} return false;
}
return false; llvm_unreachable("Unknown exception type.");
} }
void AsmPrinter::EmitLinkage(unsigned Linkage, MCSymbol *GVSym) const { void AsmPrinter::EmitLinkage(unsigned Linkage, MCSymbol *GVSym) const {