1 // RUN: %clang_cc1 -triple=x86_64-linux-gnu -fmodules -fmodules-codegen -emit-module -fmodule-name=foo %S/Inputs/codegen-extern-template.modulemap -x c++ -o %t.pcm
2 // RUN: %clang_cc1 -triple x86_64-linux-gnu -fmodules -fmodule-file=%t.pcm %s -emit-llvm -o - | FileCheck %s
3 // expected-no-diagnostics
4 
5 #include "codegen-extern-template.h"
6 
7 template int foo<int>();
8 
9 // CHECK: define weak_odr i32 @_Z3fooIiET_v
10