brintos

brintos / llvm-project-archived public Read only

0
0
Text · 634 B · eca2428 Raw
25 lines · cpp
1// RUN: %clang_cc1 -fmodules -std=c++14 -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s2 3#pragma clang module build A4module A {}5#pragma clang module contents6#pragma clang module begin A7template<int> int n = 42;8decltype(n<0>) f();9#pragma clang module end10#pragma clang module endbuild11 12#pragma clang module build B13module B {}14#pragma clang module contents15#pragma clang module begin B16#pragma clang module import A17inline int f() { return n<0>; }18#pragma clang module end19#pragma clang module endbuild20 21#pragma clang module import B22 23// CHECK: @_Z1nILi0EE = linkonce_odr global i32 42, comdat24int g() { return f(); }25