X86: Assembly files with .cfi_cfa_def shouldn't hit llvm_unreachable()

On darwin, when trying to create compact unwind info, a .cfi_cfa_def
directive would case an llvm_unreachable() to be hit. Back off when we
see this directive and generate the regular DWARF style eh_frame.

rdar://15406518

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194285 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach
2013-11-08 22:33:06 +00:00
parent de753f4853
commit dc7eb3e023
2 changed files with 76 additions and 1 deletions

View File

@@ -450,7 +450,9 @@ protected:
switch (Inst.getOperation()) {
default:
llvm_unreachable("cannot handle CFI directive for compact unwind!");
// Any other CFI directives indicate a frame that we aren't prepared
// to represent via compact unwind, so just bail out.
return 0;
case MCCFIInstruction::OpDefCfaRegister: {
// Defines a frame pointer. E.g.
//