From 30507ef3c33690e8377e88a2278a8c20bc7a7a5c Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 17 Jun 2011 21:31:43 +0000 Subject: [PATCH] Support only DwarfCFI or SjLj exception handling in LSDA decoder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133297 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/MCAsmStreamer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp index d1ea3c90440..eabf4c44b2d 100644 --- a/lib/MC/MCAsmStreamer.cpp +++ b/lib/MC/MCAsmStreamer.cpp @@ -1605,7 +1605,11 @@ MCStreamer *llvm::createAsmStreamer(MCContext &Context, bool useCFI, MCInstPrinter *IP, MCCodeEmitter *CE, TargetAsmBackend *TAB, bool ShowInst) { - if (isVerboseAsm) + ExceptionHandling::ExceptionsType ET = + Context.getAsmInfo().getExceptionHandlingType(); + + if (isVerboseAsm && + (ET == ExceptionHandling::SjLj || ET == ExceptionHandling::DwarfCFI)) return new MCLSDADecoderAsmStreamer(Context, OS, isVerboseAsm, useLoc, useCFI, IP, CE, TAB, ShowInst);