summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/MC/MCAsmStreamer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp
index d1ea3c9044..eabf4c44b2 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);