summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-05-05 19:48:34 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-05-05 19:48:34 +0000
commit240c96e2ca2a81531a4a3f0bc2c8a6e9d8ea366d (patch)
tree0d66401b55c510e857ef22462ce32c4cba232e22 /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parent3dc73aae5ea5a66412039350d21c68ae3d74f709 (diff)
downloadbcm5719-llvm-240c96e2ca2a81531a4a3f0bc2c8a6e9d8ea366d.tar.gz
bcm5719-llvm-240c96e2ca2a81531a4a3f0bc2c8a6e9d8ea366d.zip
List all exception types in a switch.
llvm-svn: 130944
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 8116f8d5925..63bfa2f258f 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -189,21 +189,22 @@ bool AsmPrinter::doInitialization(Module &M) {
if (MAI->doesSupportDebugInformation())
DD = new DwarfDebug(this, &M);
- if (MAI->doesSupportExceptionHandling())
- switch (MAI->getExceptionHandlingType()) {
- default:
- case ExceptionHandling::DwarfTable:
- DE = new DwarfTableException(this);
- break;
- case ExceptionHandling::DwarfCFI:
- DE = new DwarfCFIException(this);
- break;
- case ExceptionHandling::ARM:
- DE = new ARMException(this);
- break;
- }
+ switch (MAI->getExceptionHandlingType()) {
+ case ExceptionHandling::None:
+ return false;
+ case ExceptionHandling::SjLj:
+ case ExceptionHandling::DwarfTable:
+ DE = new DwarfTableException(this);
+ return false;
+ case ExceptionHandling::DwarfCFI:
+ DE = new DwarfCFIException(this);
+ return false;
+ case ExceptionHandling::ARM:
+ DE = new ARMException(this);
+ return false;
+ }
- return false;
+ llvm_unreachable("Unknown exception type.");
}
void AsmPrinter::EmitLinkage(unsigned Linkage, MCSymbol *GVSym) const {
OpenPOWER on IntegriCloud