r181546 - Add pragma-comment.c test case for r181426 that I forgot to add

Reid Kleckner reid at kleckner.net
Thu May 9 14:10:06 PDT 2013


Author: rnk
Date: Thu May  9 16:10:06 2013
New Revision: 181546

URL: http://llvm.org/viewvc/llvm-project?rev=181546&view=rev
Log:
Add pragma-comment.c test case for r181426 that I forgot to add

Added:
    cfe/trunk/test/CodeGen/pragma-comment.c

Added: cfe/trunk/test/CodeGen/pragma-comment.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/pragma-comment.c?rev=181546&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/pragma-comment.c (added)
+++ cfe/trunk/test/CodeGen/pragma-comment.c Thu May  9 16:10:06 2013
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 %s -triple i686-pc-win32 -fms-extensions -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple x86_64-pc-win32 -fms-extensions -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple i686-pc-linux -fms-extensions -emit-llvm -o - | FileCheck -check-prefix LINUX %s
+
+#pragma comment(lib, "msvcrt.lib")
+
+#define BAR "2"
+#pragma comment(linker," /bar=" BAR)
+
+// CHECK: !llvm.module.flags = !{!0}
+// CHECK: !0 = metadata !{i32 6, metadata !"Linker Options", metadata ![[link_opts:[0-9]+]]}
+// CHECK: ![[link_opts]] = metadata !{metadata ![[msvcrt:[0-9]+]], metadata ![[bar:[0-9]+]]}
+// CHECK: ![[msvcrt]] = metadata !{metadata !"/DEFAULTLIB:msvcrt.lib"}
+// CHECK: ![[bar]] = metadata !{metadata !" /bar=2"}
+
+// LINUX: metadata !{metadata !"-lmsvcrt.lib"}
+// LINUX: metadata !{metadata !" /bar=2"}





More information about the cfe-commits mailing list