blob: 008bda6f4a4ccf3df12122053a201c529fb231f8 [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.
Adrian Prantl7b622ca2014-03-21 22:58:28 +00004// CHECK: define{{.*}}bar
Adrian Prantlbebb8932014-03-21 21:01:58 +00005// CHECK-NOT: define
6// CHECK: ret {{.*}}, !dbg ![[DBG:.*]]
Bob Wilson5c650652014-03-24 18:14:15 +00007// CHECK-DAG: ![[HPP:.*]] = metadata !{metadata !"./template.hpp",
8// CHECK-DAG: ![[BLOCK:.*]] = metadata !{{{.*}}, metadata ![[HPP]], {{.*}}} ; [ DW_TAG_lexical_block ]
9// CHECK-DAG: ![[DBG]] = metadata !{i32 23, i32 0, metadata ![[BLOCK]], null}
Adrian Prantlbebb8932014-03-21 21:01:58 +000010# 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}