[PATCH] D17776: Improve CHECK-NOT robustness of dllexport tests

Warren Ristow via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 30 23:28:23 PDT 2016


wristow retitled this revision from "Improve CHECK-NOT robustness of dllimport/dllexport tests" to "Improve CHECK-NOT robustness of dllexport tests".
wristow updated the summary for this revision.
wristow updated this revision to Diff 52172.

http://reviews.llvm.org/D17776

Files:
  llvm/test/CodeGen/X86/dllexport-x86_64.ll
  llvm/test/CodeGen/X86/dllexport.ll

Index: llvm/test/CodeGen/X86/dllexport.ll
===================================================================
--- llvm/test/CodeGen/X86/dllexport.ll
+++ llvm/test/CodeGen/X86/dllexport.ll
@@ -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 @@
 ; 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 at 0
@@ -107,8 +118,6 @@
 ; 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 at 0
@@ -126,4 +135,3 @@
 ; CHECK-GCC-SAME: -export:alias2
 ; CHECK-GCC-SAME: -export:alias3
 ; CHECK-GCC-SAME: -export:weak_alias"
-; CHECK-GCC-NOT: notExported
Index: llvm/test/CodeGen/X86/dllexport-x86_64.ll
===================================================================
--- llvm/test/CodeGen/X86/dllexport-x86_64.ll
+++ llvm/test/CodeGen/X86/dllexport-x86_64.ll
@@ -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 @@
 @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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17776.52172.patch
Type: text/x-patch
Size: 2824 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160331/c7a29da6/attachment.bin>


More information about the llvm-commits mailing list