blob: 8f8e4c9c7890409934bac079a028b984d72ab0e4 [file] [log] [blame]
Adrian Prantlbebb8932014-03-21 21:01:58 +00001// 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{{.*}} @_ZN3FooIiE3barEv
5// CHECK-NOT: define
6// CHECK: ret {{.*}}, !dbg ![[DBG:.*]]
7// CHECK: ![[HPP:.*]] = metadata !{metadata !"./template.hpp",
8// CHECK:![[BLOCK:.*]] = metadata !{{{.*}}, metadata ![[HPP]], {{.*}}} ; [ DW_TAG_lexical_block ]
9// CHECK: [[DBG]] = metadata !{i32 23, i32 0, metadata ![[BLOCK]], null}
10# 1 "./template.h" 1
11template <typename T>
12class Foo {
13public:
14 int bar();
15};
16# 21 "./template.hpp"
17template <typename T>
18int Foo<T>::bar() {
19}
20int main (int argc, const char * argv[])
21{
22 Foo<int> f;
23 f.bar();
24}