From 5b460ed4cdba9575891757b1796c0a6368b7d942 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 21 Mar 2014 00:55:42 +0000 Subject: [PATCH] Convert a CodeGen test into a MC test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204421 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/no-elf-compact-unwind.ll | 48 ----------------------- test/MC/X86/no-elf-compact-unwind.s | 15 +++++++ 2 files changed, 15 insertions(+), 48 deletions(-) delete mode 100644 test/CodeGen/X86/no-elf-compact-unwind.ll create mode 100644 test/MC/X86/no-elf-compact-unwind.s diff --git a/test/CodeGen/X86/no-elf-compact-unwind.ll b/test/CodeGen/X86/no-elf-compact-unwind.ll deleted file mode 100644 index 8a15817bcfe..00000000000 --- a/test/CodeGen/X86/no-elf-compact-unwind.ll +++ /dev/null @@ -1,48 +0,0 @@ -; RUN: llc < %s -mtriple x86_64-apple-macosx10.8.0 -disable-cfi | FileCheck -check-prefix=MACHO %s -; RUN: llc < %s -mtriple x86_64-unknown-linux -disable-cfi | FileCheck -check-prefix=ELF %s - -; Make sure we don't generate a compact unwind for ELF. - -; MACHO-LABEL: _Z3barv: -; MACHO: __compact_unwind - -; ELF-LABEL: _Z3barv: -; ELF-NOT: __compact_unwind - -@_ZTIi = external constant i8* - -define void @_Z3barv() uwtable { -entry: - invoke void @_Z3foov() - to label %try.cont unwind label %lpad - -lpad: ; preds = %entry - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) - catch i8* bitcast (i8** @_ZTIi to i8*) - %1 = extractvalue { i8*, i32 } %0, 1 - %2 = tail call i32 @llvm.eh.typeid.for(i8* bitcast (i8** @_ZTIi to i8*)) - %matches = icmp eq i32 %1, %2 - br i1 %matches, label %catch, label %eh.resume - -catch: ; preds = %lpad - %3 = extractvalue { i8*, i32 } %0, 0 - %4 = tail call i8* @__cxa_begin_catch(i8* %3) - tail call void @__cxa_end_catch() - br label %try.cont - -try.cont: ; preds = %entry, %catch - ret void - -eh.resume: ; preds = %lpad - resume { i8*, i32 } %0 -} - -declare void @_Z3foov() - -declare i32 @__gxx_personality_v0(...) - -declare i32 @llvm.eh.typeid.for(i8*) - -declare i8* @__cxa_begin_catch(i8*) - -declare void @__cxa_end_catch() diff --git a/test/MC/X86/no-elf-compact-unwind.s b/test/MC/X86/no-elf-compact-unwind.s new file mode 100644 index 00000000000..017c52ae9f3 --- /dev/null +++ b/test/MC/X86/no-elf-compact-unwind.s @@ -0,0 +1,15 @@ +// RUN: llvm-mc < %s -filetype=obj -triple x86_64-apple-macosx10.8.0 | llvm-readobj -s | FileCheck -check-prefix=MACHO %s +// RUN: llvm-mc < %s -filetype=obj -triple x86_64-unknown-linux | llvm-readobj -s | FileCheck -check-prefix=ELF %s + + .globl __Z3barv + .align 4, 0x90 +__Z3barv: + .cfi_startproc + pushq %rax + .cfi_def_cfa_offset 16 + popq %rax + retq + .cfi_endproc + +// MACHO: Name: __compact_unwind +// ELF-NOT: __compact_unwind