[llvm] r216895 - CodeGen: indicate Windows unwind data format
Saleem Abdulrasool
compnerd at compnerd.org
Mon Sep 1 16:48:40 PDT 2014
Author: compnerd
Date: Mon Sep 1 18:48:39 2014
New Revision: 216895
URL: http://llvm.org/viewvc/llvm-project?rev=216895&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=216895&r1=216894&r2=216895&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Mon Sep 1 18:48:39 2014
@@ -244,7 +244,12 @@ bool AsmPrinter::doInitialization(Module
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)
Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp?rev=216895&r1=216894&r2=216895&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp Mon Sep 1 18:48:39 2014
@@ -142,6 +142,7 @@ X86MCAsmInfoMicrosoft::X86MCAsmInfoMicro
if (Triple.getArch() == Triple::x86_64) {
PrivateGlobalPrefix = ".L";
PointerSize = 8;
+ WinEHEncodingType = WinEH::EncodingType::Itanium;
ExceptionsType = ExceptionHandling::WinEH;
}
@@ -161,6 +162,7 @@ X86MCAsmInfoGNUCOFF::X86MCAsmInfoGNUCOFF
if (Triple.getArch() == Triple::x86_64) {
PrivateGlobalPrefix = ".L";
PointerSize = 8;
+ WinEHEncodingType = WinEH::EncodingType::Itanium;
ExceptionsType = ExceptionHandling::WinEH;
} else {
ExceptionsType = ExceptionHandling::DwarfCFI;
More information about the llvm-commits
mailing list