From 2faef9ccb0cb994a84fe400ef33fd75c82c5b959 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 22 Jun 2015 01:29:24 +0000 Subject: [PATCH] Add the testcase from pr23900. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240253 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/pr23900.ll | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 test/CodeGen/X86/pr23900.ll diff --git a/test/CodeGen/X86/pr23900.ll b/test/CodeGen/X86/pr23900.ll new file mode 100644 index 00000000000..cbc77161c04 --- /dev/null +++ b/test/CodeGen/X86/pr23900.ll @@ -0,0 +1,29 @@ +; RUN: llc -filetype=obj %s -o %t.o +; RUN: llvm-nm %t.o | FileCheck %s + +; Test that it doesn't crash (and produces an object file). +; This use to pass a symbol with a null name to code that expected a valid +; C string. + +; CHECK: U __CxxFrameHandler3 +; CHECK: T f +; CHECK: t f.cleanup +; CHECK: U g +; CHECK: U h + + +target triple = "x86_64-pc-windows-msvc18.0.0" +define void @f(i32 %x) personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { + invoke void @h() + to label %invoke.cont unwind label %lpad +invoke.cont: + ret void +lpad: + landingpad { i8*, i32 } + cleanup + call void @g(i32 %x) + ret void +} +declare void @h() +declare i32 @__CxxFrameHandler3(...) +declare void @g(i32 %x) -- 2.34.1