// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
// Test that the line table info for Foo<T>::bar() is pointing to the
// right header file.
// CHECK: define{{.*}}bar
// CHECK-NOT: define
// CHECK: ret {{.*}}, !dbg ![[DBG:.*]]
// CHECK: ![[HPP:.*]] = metadata !{metadata !"./template.hpp",
// CHECK:![[BLOCK:.*]] = metadata !{{{.*}}, metadata ![[HPP]], {{.*}}} ; [ DW_TAG_lexical_block ]
// CHECK: [[DBG]] = metadata !{i32 23, i32 0, metadata ![[BLOCK]], null}
# 1 "./template.h" 1
template <typename T>
class Foo {
public:
 int bar();
};
# 21 "./template.hpp"
template <typename T>
int Foo<T>::bar() {
}
int main (int argc, const char * argv[])
{
  Foo<int> f;
  f.bar();
}

// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
// Test that the line table info for Foo<T>::bar() is pointing to the
// right header file.
// CHECK: define{{.*}}bar
// CHECK-NOT: define
// CHECK: ret {{.*}}, !dbg ![[DBG:.*]]
// CHECK-DAG: ![[HPP:.*]] = metadata !{metadata !"./template.hpp",
// CHECK-DAG: ![[BLOCK:.*]] = metadata !{{{.*}}, metadata ![[HPP]], {{.*}}} ; [ DW_TAG_lexical_block ]
// CHECK-DAG: ![[DBG]] = metadata !{i32 23, i32 0, metadata ![[BLOCK]], null}
# 1 "./template.h" 1
template <typename T>
class Foo {
public:
 int bar();
};
# 21 "./template.hpp"
template <typename T>
int Foo<T>::bar() {
}
int main (int argc, const char * argv[])
{
  Foo<int> f;
  f.bar();
}

Use CHECK-DAG in a test so that it isn't sensitive to metadata order.
Use CHECK-DAG in a test so that it isn't sensitive to metadata order.

This was failing on an internal branch where the order was different for
some reason. <rdar://problem/16407581>

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@204633 91177308-0d34-0410-b5e6-96231b3b80d8
