Improve CHECK-NOT robustness of dllexport tests

This changes some dllexport tests, to verify that some symbols that
should not be exported are not, in a way that improves the robustness
of CHECK-SAME interaction with CHECK-NOT.

We plan to enable dllimport/dllexport support for the PS4, and these
changes are for points we noticed in our internal testing.

Patch by Warren Ristow!

llvm-svn: 265106
This commit is contained in:
Sean Silva 2016-04-01 03:54:03 +00:00
parent 7bab713188
commit 3de5ef96c9
2 changed files with 20 additions and 5 deletions

View File

@ -1,5 +1,7 @@
; RUN: llc -mtriple x86_64-pc-win32 < %s | FileCheck -check-prefix=CHECK -check-prefix=WIN32 %s
; RUN: llc -mtriple x86_64-pc-win32 < %s | FileCheck -check-prefix=CHECK -check-prefix=WIN32 %s
; RUN: llc -mtriple x86_64-pc-mingw32 < %s | FileCheck -check-prefix=CHECK -check-prefix=MINGW %s
; RUN: llc -mtriple x86_64-pc-win32 < %s | FileCheck -check-prefix=NOTEXPORTED %s
; RUN: llc -mtriple x86_64-pc-mingw32 < %s | FileCheck -check-prefix=NOTEXPORTED %s
; CHECK: .text
@ -70,6 +72,11 @@ define weak_odr dllexport void @weak1() {
@blob = global [6 x i8] c"\B8*\00\00\00\C3", section ".text", align 16
@blob_alias = dllexport alias i32 (), bitcast ([6 x i8]* @blob to i32 ()*)
; Verify item that should not be exported does not appear in the export table.
; We use a separate check prefix to avoid confusion between -NOT and -SAME.
; NOTEXPORTED: .section .drectve
; NOTEXPORTED-NOT: notExported
; CHECK: .section .drectve
; WIN32: /EXPORT:f1
; WIN32-SAME: /EXPORT:f2

View File

@ -4,6 +4,12 @@
; RUN: | FileCheck -check-prefix CHECK -check-prefix CHECK-GCC %s
; RUN: llc -mtriple i686-pc-cygwin %s -o - \
; RUN: | FileCheck -check-prefix CHECK -check-prefix CHECK-GCC %s
; RUN: llc -mtriple i386-pc-win32 < %s \
; RUN: | FileCheck -check-prefix NOTEXPORTED %s
; RUN: llc -mtriple i386-pc-mingw32 < %s \
; RUN: | FileCheck -check-prefix NOTEXPORTED %s
; RUN: llc -mtriple i686-pc-cygwin %s -o - \
; RUN: | FileCheck -check-prefix NOTEXPORTED %s
; CHECK: .text
@ -88,8 +94,13 @@ define weak_odr dllexport void @weak1() {
; CHECK: _weak_alias = _f1
@weak_alias = weak_odr dllexport alias void(), void()* @f1
; Verify items that should not be exported do not appear in the export table.
; We use a separate check prefix to avoid confusion between -NOT and -SAME.
; NOTEXPORTED: .section .drectve
; NOTEXPORTED-NOT: notExported
; NOTEXPORTED-NOT: notDefined
; CHECK: .section .drectve
; CHECK-CL-NOT: notExported
; CHECK-CL: /EXPORT:_f1
; CHECK-CL-SAME: /EXPORT:_f2
; CHECK-CL-SAME: /EXPORT:_stdfun@0
@ -107,8 +118,6 @@ define weak_odr dllexport void @weak1() {
; CHECK-CL-SAME: /EXPORT:_alias2
; CHECK-CL-SAME: /EXPORT:_alias3
; CHECK-CL-SAME: /EXPORT:_weak_alias"
; CHECK-CL-NOT: notExported
; CHECK-GCC-NOT: notExported
; CHECK-GCC: -export:f1
; CHECK-GCC-SAME: -export:f2
; CHECK-GCC-SAME: -export:stdfun@0
@ -126,4 +135,3 @@ define weak_odr dllexport void @weak1() {
; CHECK-GCC-SAME: -export:alias2
; CHECK-GCC-SAME: -export:alias3
; CHECK-GCC-SAME: -export:weak_alias"
; CHECK-GCC-NOT: notExported