1 // RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s 2 // Test that the line table info for Foo<T>::bar() is pointing to the 3 // right header file. 4 // CHECK: define{{.*}}bar 5 // CHECK-NOT: define 6 // CHECK: ret {{.*}}, !dbg [[DBG:.*]] 7 // CHECK: [[HPP:.*]] = metadata !{metadata !"./template.hpp", 8 // CHECK: [[SP:.*]] = metadata !{i32 786478, metadata [[HPP]],{{.*}}[ DW_TAG_subprogram ] [line 22] [def] [bar] 9 // We shouldn't need a lexical block for this function. 10 // CHECK: [[DBG]] = metadata !{i32 23, i32 0, metadata [[SP]], null} 11 12 13 # 1 "./template.h" 1 14 template <typename T> 15 class Foo { 16 public: 17 int bar(); 18 }; 19 # 21 "./template.hpp" 20 template <typename T> 21 int Foo<T>::bar() { 22 return 23; 23 } 24 int main (int argc, const char * argv[]) 25 { 26 Foo<int> f; 27 return f.bar(); 28 } 29