diff --git a/llvm/lib/Target/X86/X86AsmPrinter.cpp b/llvm/lib/Target/X86/X86AsmPrinter.cpp index 7049cf190ba1..85840495beda 100644 --- a/llvm/lib/Target/X86/X86AsmPrinter.cpp +++ b/llvm/lib/Target/X86/X86AsmPrinter.cpp @@ -352,7 +352,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) { O << "\n"; - if (TAI->doesSupportExceptionHandling() && MMI) { + if (ExceptionHandling && TAI->doesSupportExceptionHandling() && MMI) { // Add the (possibly multiple) personalities to the set of global values. const std::vector& Personalities = MMI->getPersonalities();