r312696 - [modules ts] Add test for [basic.link]p3.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 6 22:29:40 PDT 2017
Author: rsmith
Date: Wed Sep 6 22:29:39 2017
New Revision: 312696
URL: http://llvm.org/viewvc/llvm-project?rev=312696&view=rev
Log:
[modules ts] Add test for [basic.link]p3.
Added:
cfe/trunk/test/CXX/modules-ts/basic/basic.link/p3.cppm
Added: cfe/trunk/test/CXX/modules-ts/basic/basic.link/p3.cppm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/modules-ts/basic/basic.link/p3.cppm?rev=312696&view=auto
==============================================================================
--- cfe/trunk/test/CXX/modules-ts/basic/basic.link/p3.cppm (added)
+++ cfe/trunk/test/CXX/modules-ts/basic/basic.link/p3.cppm Wed Sep 6 22:29:39 2017
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -fmodules-ts %s -emit-module-interface -o %t
+// RUN: %clang_cc1 -fmodules-ts -x pcm %t -emit-llvm -o - | FileCheck %s
+
+export module M;
+
+// CHECK-DAG: @_ZW1ME1a = constant i32 1
+const int a = 1;
+// CHECK-DAG: @b = constant i32 2
+export const int b = 2;
+
+export int f() { return a + b; }
More information about the cfe-commits
mailing list