From d1a4ed6a7c333d102ea537a227dc72c6ba90b1df Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Mon, 1 Sep 2014 23:48:39 +0000 Subject: CodeGen: indicate Windows unwind data format The structures for Windows unwinding are shared across multiple platforms. Indicate the encoding to be used for the particular target. Use this to switch the unwind emitter instantiated by the AsmPrinter. llvm-svn: 216895 --- llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index c2fd91830f5..4319a577117 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -244,7 +244,12 @@ bool AsmPrinter::doInitialization(Module &M) { ES = new ARMException(this); break; case ExceptionHandling::WinEH: - ES = new Win64Exception(this); + switch (MAI->getWinEHEncodingType()) { + default: llvm_unreachable("unsupported unwinding information encoding"); + case WinEH::EncodingType::Itanium: + ES = new Win64Exception(this); + break; + } break; } if (ES) -- cgit v1.2.3