From 775487c265fcd034c38c1f1aeb3a4a8bd2122fe0 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 7 Sep 2017 05:29:39 +0000 Subject: [PATCH] [modules ts] Add test for [basic.link]p3. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312696 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CXX/modules-ts/basic/basic.link/p3.cppm | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/CXX/modules-ts/basic/basic.link/p3.cppm diff --git a/test/CXX/modules-ts/basic/basic.link/p3.cppm b/test/CXX/modules-ts/basic/basic.link/p3.cppm new file mode 100644 index 0000000000..c1d4d79531 --- /dev/null +++ b/test/CXX/modules-ts/basic/basic.link/p3.cppm @@ -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; } -- 2.40.0