aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX')
-rw-r--r--clang/test/CodeGenCXX/2006-11-20-GlobalSymbols.cpp11
-rw-r--r--clang/test/CodeGenCXX/2007-01-02-UnboundedArray.cpp14
-rw-r--r--clang/test/CodeGenCXX/2009-03-17-dbg.cpp15
-rw-r--r--clang/test/CodeGenCXX/2009-06-16-DebugInfoCrash.cpp10
-rw-r--r--clang/test/CodeGenCXX/2010-05-10-Var-DbgInfo.cpp42
-rw-r--r--clang/test/CodeGenCXX/2010-05-12-PtrToMember-Dbg.cpp17
-rw-r--r--clang/test/CodeGenCXX/2010-06-21-LocalVarDbg.cpp14
-rw-r--r--clang/test/CodeGenCXX/2010-07-23-DeclLoc.cpp87
-rw-r--r--clang/test/CodeGenCXX/Inputs/debug-info-class-limited.cpp52
-rw-r--r--clang/test/CodeGenCXX/PR20038.cpp14
-rw-r--r--clang/test/CodeGenCXX/aarch64-sve-vector-conditional-op.cpp3
-rw-r--r--clang/test/CodeGenCXX/aix-static-init-debug-info.cpp66
-rw-r--r--clang/test/CodeGenCXX/bpf-debug-structors.cpp14
-rw-r--r--clang/test/CodeGenCXX/cp-blocks-linetables.cpp60
-rw-r--r--clang/test/CodeGenCXX/cxx2b-deducing-this.cpp52
-rw-r--r--clang/test/CodeGenCXX/dbg-info-all-calls-described.cpp87
-rw-r--r--clang/test/CodeGenCXX/debug-info-access.cpp90
-rw-r--r--clang/test/CodeGenCXX/debug-info-alias.cpp48
-rw-r--r--clang/test/CodeGenCXX/debug-info-anon-namespace.cpp25
-rw-r--r--clang/test/CodeGenCXX/debug-info-anon-union-vars.cpp63
-rw-r--r--clang/test/CodeGenCXX/debug-info-artificial-arg.cpp32
-rw-r--r--clang/test/CodeGenCXX/debug-info-atexit-stub.cpp22
-rw-r--r--clang/test/CodeGenCXX/debug-info-auto-return.cpp25
-rw-r--r--clang/test/CodeGenCXX/debug-info-block-invocation-linkage-name.cpp15
-rw-r--r--clang/test/CodeGenCXX/debug-info-blocks.cpp18
-rw-r--r--clang/test/CodeGenCXX/debug-info-byval.cpp31
-rw-r--r--clang/test/CodeGenCXX/debug-info-calling-conventions.cpp26
-rw-r--r--clang/test/CodeGenCXX/debug-info-char16.cpp7
-rw-r--r--clang/test/CodeGenCXX/debug-info-class-limited-plugin.test2
-rw-r--r--clang/test/CodeGenCXX/debug-info-class-limited.test1
-rw-r--r--clang/test/CodeGenCXX/debug-info-class-nolimit.cpp54
-rw-r--r--clang/test/CodeGenCXX/debug-info-class-optzns.cpp26
-rw-r--r--clang/test/CodeGenCXX/debug-info-class.cpp208
-rw-r--r--clang/test/CodeGenCXX/debug-info-codeview-display-name.cpp100
-rw-r--r--clang/test/CodeGenCXX/debug-info-codeview-heapallocsite.cpp38
-rw-r--r--clang/test/CodeGenCXX/debug-info-codeview-injected-class.cpp21
-rw-r--r--clang/test/CodeGenCXX/debug-info-codeview-nested-types.cpp58
-rw-r--r--clang/test/CodeGenCXX/debug-info-codeview-nodebug.cpp20
-rw-r--r--clang/test/CodeGenCXX/debug-info-codeview-template-literal.cpp9
-rw-r--r--clang/test/CodeGenCXX/debug-info-codeview-template-type.cpp12
-rw-r--r--clang/test/CodeGenCXX/debug-info-codeview-unnamed.cpp109
-rw-r--r--clang/test/CodeGenCXX/debug-info-codeview-var-templates.cpp30
-rw-r--r--clang/test/CodeGenCXX/debug-info-coff.cpp37
-rw-r--r--clang/test/CodeGenCXX/debug-info-composite-cc.cpp50
-rw-r--r--clang/test/CodeGenCXX/debug-info-composite-triviality-fwd-decl.cpp11
-rw-r--r--clang/test/CodeGenCXX/debug-info-composite-triviality.cpp96
-rw-r--r--clang/test/CodeGenCXX/debug-info-context.cpp17
-rw-r--r--clang/test/CodeGenCXX/debug-info-ctor-homing-flag.cpp23
-rw-r--r--clang/test/CodeGenCXX/debug-info-ctor.cpp14
-rw-r--r--clang/test/CodeGenCXX/debug-info-ctor2.cpp16
-rw-r--r--clang/test/CodeGenCXX/debug-info-cxx0x.cpp18
-rw-r--r--clang/test/CodeGenCXX/debug-info-cxx1y.cpp45
-rw-r--r--clang/test/CodeGenCXX/debug-info-decl-nested.cpp75
-rw-r--r--clang/test/CodeGenCXX/debug-info-deleted.cpp36
-rw-r--r--clang/test/CodeGenCXX/debug-info-destroy-helper.cpp24
-rw-r--r--clang/test/CodeGenCXX/debug-info-determinism.cpp16
-rw-r--r--clang/test/CodeGenCXX/debug-info-dllimport-base-class.cpp53
-rw-r--r--clang/test/CodeGenCXX/debug-info-dtor-implicit-args.cpp24
-rw-r--r--clang/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp24
-rw-r--r--clang/test/CodeGenCXX/debug-info-enum-class.cpp124
-rw-r--r--clang/test/CodeGenCXX/debug-info-enum-i128.cpp20
-rw-r--r--clang/test/CodeGenCXX/debug-info-enum-metadata-collision.cpp25
-rw-r--r--clang/test/CodeGenCXX/debug-info-enum.cpp68
-rw-r--r--clang/test/CodeGenCXX/debug-info-explicit-cast.cpp46
-rw-r--r--clang/test/CodeGenCXX/debug-info-explicit-this.cpp16
-rw-r--r--clang/test/CodeGenCXX/debug-info-export_symbols.cpp11
-rw-r--r--clang/test/CodeGenCXX/debug-info-fn-template.cpp15
-rw-r--r--clang/test/CodeGenCXX/debug-info-friend.cpp20
-rw-r--r--clang/test/CodeGenCXX/debug-info-function-context.cpp47
-rw-r--r--clang/test/CodeGenCXX/debug-info-fwd-ref.cpp25
-rw-r--r--clang/test/CodeGenCXX/debug-info-fwd-template-param.cpp20
-rw-r--r--clang/test/CodeGenCXX/debug-info-gline-tables-only-codeview.cpp59
-rw-r--r--clang/test/CodeGenCXX/debug-info-gline-tables-only.cpp32
-rw-r--r--clang/test/CodeGenCXX/debug-info-global-ctor-dtor.cpp53
-rw-r--r--clang/test/CodeGenCXX/debug-info-global.cpp22
-rw-r--r--clang/test/CodeGenCXX/debug-info-globalinit.cpp38
-rw-r--r--clang/test/CodeGenCXX/debug-info-hotpatch-aarch64.cpp20
-rw-r--r--clang/test/CodeGenCXX/debug-info-hotpatch-arm.cpp20
-rw-r--r--clang/test/CodeGenCXX/debug-info-hotpatch.cpp20
-rw-r--r--clang/test/CodeGenCXX/debug-info-incomplete-types.cpp12
-rw-r--r--clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp25
-rw-r--r--clang/test/CodeGenCXX/debug-info-inheriting-constructor.cpp25
-rw-r--r--clang/test/CodeGenCXX/debug-info-inlined.cpp27
-rw-r--r--clang/test/CodeGenCXX/debug-info-lambda.cpp16
-rw-r--r--clang/test/CodeGenCXX/debug-info-large-constant.cpp8
-rw-r--r--clang/test/CodeGenCXX/debug-info-limited-ctor.cpp107
-rw-r--r--clang/test/CodeGenCXX/debug-info-limited.cpp37
-rw-r--r--clang/test/CodeGenCXX/debug-info-line-if-2.cpp45
-rw-r--r--clang/test/CodeGenCXX/debug-info-line-if.cpp71
-rw-r--r--clang/test/CodeGenCXX/debug-info-line.cpp331
-rw-r--r--clang/test/CodeGenCXX/debug-info-loops.cpp49
-rw-r--r--clang/test/CodeGenCXX/debug-info-member-call.cpp24
-rw-r--r--clang/test/CodeGenCXX/debug-info-member.cpp7
-rw-r--r--clang/test/CodeGenCXX/debug-info-method-nodebug.cpp12
-rw-r--r--clang/test/CodeGenCXX/debug-info-method-spec.cpp10
-rw-r--r--clang/test/CodeGenCXX/debug-info-method.cpp34
-rw-r--r--clang/test/CodeGenCXX/debug-info-method2.cpp18
-rw-r--r--clang/test/CodeGenCXX/debug-info-ms-abi.cpp54
-rw-r--r--clang/test/CodeGenCXX/debug-info-ms-anonymous-tag.cpp21
-rw-r--r--clang/test/CodeGenCXX/debug-info-ms-bitfields.cpp10
-rw-r--r--clang/test/CodeGenCXX/debug-info-ms-dtor-thunks.cpp15
-rw-r--r--clang/test/CodeGenCXX/debug-info-ms-novtable.cpp16
-rw-r--r--clang/test/CodeGenCXX/debug-info-ms-ptr-to-member.cpp53
-rw-r--r--clang/test/CodeGenCXX/debug-info-ms-vbase.cpp68
-rw-r--r--clang/test/CodeGenCXX/debug-info-namespace.cpp134
-rw-r--r--clang/test/CodeGenCXX/debug-info-nested-exprs.cpp202
-rw-r--r--clang/test/CodeGenCXX/debug-info-nodebug.cpp67
-rw-r--r--clang/test/CodeGenCXX/debug-info-noreturn.cpp19
-rw-r--r--clang/test/CodeGenCXX/debug-info-nrvo.cpp35
-rw-r--r--clang/test/CodeGenCXX/debug-info-nullptr.cpp7
-rw-r--r--clang/test/CodeGenCXX/debug-info-object-pointer.cpp28
-rw-r--r--clang/test/CodeGenCXX/debug-info-objname.cpp41
-rw-r--r--clang/test/CodeGenCXX/debug-info-programming-language.cpp34
-rw-r--r--clang/test/CodeGenCXX/debug-info-ptr-to-member-function.cpp21
-rw-r--r--clang/test/CodeGenCXX/debug-info-ptr-to-ptr.cpp115
-rw-r--r--clang/test/CodeGenCXX/debug-info-qualifiers.cpp36
-rw-r--r--clang/test/CodeGenCXX/debug-info-range-for-var-names.cpp35
-rw-r--r--clang/test/CodeGenCXX/debug-info-rvalue-ref.cpp17
-rw-r--r--clang/test/CodeGenCXX/debug-info-scope.cpp70
-rw-r--r--clang/test/CodeGenCXX/debug-info-scoped-class.cpp15
-rw-r--r--clang/test/CodeGenCXX/debug-info-simple-template-names.cpp132
-rw-r--r--clang/test/CodeGenCXX/debug-info-static-fns.cpp13
-rw-r--r--clang/test/CodeGenCXX/debug-info-static-member.cpp168
-rw-r--r--clang/test/CodeGenCXX/debug-info-struct-align.cpp35
-rw-r--r--clang/test/CodeGenCXX/debug-info-structured-binding-bitfield.cpp317
-rw-r--r--clang/test/CodeGenCXX/debug-info-structured-binding.cpp50
-rw-r--r--clang/test/CodeGenCXX/debug-info-template-align.cpp14
-rw-r--r--clang/test/CodeGenCXX/debug-info-template-array.cpp14
-rw-r--r--clang/test/CodeGenCXX/debug-info-template-deduction-guide.cpp15
-rw-r--r--clang/test/CodeGenCXX/debug-info-template-explicit-specialization.cpp128
-rw-r--r--clang/test/CodeGenCXX/debug-info-template-fwd.cpp28
-rw-r--r--clang/test/CodeGenCXX/debug-info-template-limit.cpp14
-rw-r--r--clang/test/CodeGenCXX/debug-info-template-member.cpp130
-rw-r--r--clang/test/CodeGenCXX/debug-info-template-parameter.cpp83
-rw-r--r--clang/test/CodeGenCXX/debug-info-template-partial-specialization.cpp35
-rw-r--r--clang/test/CodeGenCXX/debug-info-template-quals.cpp31
-rw-r--r--clang/test/CodeGenCXX/debug-info-template-recursive.cpp13
-rw-r--r--clang/test/CodeGenCXX/debug-info-template.cpp272
-rw-r--r--clang/test/CodeGenCXX/debug-info-this.cpp14
-rw-r--r--clang/test/CodeGenCXX/debug-info-thunk-msabi.cpp19
-rw-r--r--clang/test/CodeGenCXX/debug-info-thunk.cpp277
-rw-r--r--clang/test/CodeGenCXX/debug-info-union-template.cpp17
-rw-r--r--clang/test/CodeGenCXX/debug-info-union.cpp20
-rw-r--r--clang/test/CodeGenCXX/debug-info-use-after-free.cpp316
-rw-r--r--clang/test/CodeGenCXX/debug-info-uuid.cpp43
-rw-r--r--clang/test/CodeGenCXX/debug-info-var-template-partial-spec.cpp13
-rw-r--r--clang/test/CodeGenCXX/debug-info-var-template-partial.cpp17
-rw-r--r--clang/test/CodeGenCXX/debug-info-varargs.cpp30
-rw-r--r--clang/test/CodeGenCXX/debug-info-verbose-trap.cpp54
-rw-r--r--clang/test/CodeGenCXX/debug-info-vla.cpp22
-rw-r--r--clang/test/CodeGenCXX/debug-info-vtable-optzn.cpp22
-rw-r--r--clang/test/CodeGenCXX/debug-info-wchar.cpp5
-rw-r--r--clang/test/CodeGenCXX/debug-info-windows-dtor.cpp23
-rw-r--r--clang/test/CodeGenCXX/debug-info-zero-length-arrays.cpp14
-rw-r--r--clang/test/CodeGenCXX/debug-info.cpp170
-rw-r--r--clang/test/CodeGenCXX/debug-lambda-expressions.cpp103
-rw-r--r--clang/test/CodeGenCXX/debug-lambda-this.cpp22
-rw-r--r--clang/test/CodeGenCXX/debug-prefix-map-lambda.cpp10
-rw-r--r--clang/test/CodeGenCXX/defaulted-template-alias.cpp38
-rw-r--r--clang/test/CodeGenCXX/dependent-template-alias.cpp18
-rw-r--r--clang/test/CodeGenCXX/destructor-debug-info.cpp22
-rw-r--r--clang/test/CodeGenCXX/difile_entry.cpp13
-rw-r--r--clang/test/CodeGenCXX/ext-vector-type-conditional.cpp344
-rw-r--r--clang/test/CodeGenCXX/fdebug-info-for-profiling.cpp24
-rw-r--r--clang/test/CodeGenCXX/field-access-debug-info.cpp18
-rw-r--r--clang/test/CodeGenCXX/globalinit-loc.cpp25
-rw-r--r--clang/test/CodeGenCXX/inline-dllexport-member.cpp13
-rw-r--r--clang/test/CodeGenCXX/int64_uint64.cpp8
-rw-r--r--clang/test/CodeGenCXX/lambda-this-2.cpp (renamed from clang/test/CodeGenCXX/debug-info-lambda-this.cpp)0
-rw-r--r--clang/test/CodeGenCXX/linetable-cleanup.cpp61
-rw-r--r--clang/test/CodeGenCXX/linetable-eh.cpp44
-rw-r--r--clang/test/CodeGenCXX/linetable-fnbegin.cpp30
-rw-r--r--clang/test/CodeGenCXX/linetable-virtual-variadic.cpp23
-rw-r--r--clang/test/CodeGenCXX/lpad-linetable.cpp68
-rw-r--r--clang/test/CodeGenCXX/mangle-ms-cxx11.cpp39
-rw-r--r--clang/test/CodeGenCXX/microsoft-abi-member-pointers-debug-info.cpp14
-rw-r--r--clang/test/CodeGenCXX/modules-vtable.cppm2
-rw-r--r--clang/test/CodeGenCXX/pr70585.cppm2
-rw-r--r--clang/test/CodeGenCXX/ptrauth-explicit-vtable-pointer-control.cpp37
-rw-r--r--clang/test/CodeGenCXX/scoped-enums-debug-info.cpp31
-rw-r--r--clang/test/CodeGenCXX/sret_cast_with_nonzero_alloca_as.cpp7
-rw-r--r--clang/test/CodeGenCXX/standalone-debug-attribute.cpp54
-rw-r--r--clang/test/CodeGenCXX/template-alias.cpp47
-rw-r--r--clang/test/CodeGenCXX/trivial_abi_debuginfo.cpp33
-rw-r--r--clang/test/CodeGenCXX/ubsan-check-debuglocs.cpp17
-rw-r--r--clang/test/CodeGenCXX/variadic-template-alias.cpp25
-rw-r--r--clang/test/CodeGenCXX/vtable-debug-info-inheritance-diamond.cpp87
-rw-r--r--clang/test/CodeGenCXX/vtable-debug-info-inheritance-multiple.cpp72
-rw-r--r--clang/test/CodeGenCXX/vtable-debug-info-inheritance-simple-main.cpp152
-rw-r--r--clang/test/CodeGenCXX/vtable-debug-info-inheritance-simple.cpp60
-rw-r--r--clang/test/CodeGenCXX/vtable-debug-info-inheritance-virtual.cpp87
-rw-r--r--clang/test/CodeGenCXX/vtable-debug-info.cpp318
-rw-r--r--clang/test/CodeGenCXX/vtable-holder-self-reference.cpp16
193 files changed, 283 insertions, 9168 deletions
diff --git a/clang/test/CodeGenCXX/2006-11-20-GlobalSymbols.cpp b/clang/test/CodeGenCXX/2006-11-20-GlobalSymbols.cpp
deleted file mode 100644
index 74a7fb6..0000000
--- a/clang/test/CodeGenCXX/2006-11-20-GlobalSymbols.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
-// PR1013
-// Check to make sure debug symbols use the correct name for globals and
-// functions. Will not assemble if it fails to.
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -o - %s | FileCheck %s
-
-// CHECK: f\01oo"
-int foo __asm__("f\001oo");
-
-int bar() {
- return foo;
-}
diff --git a/clang/test/CodeGenCXX/2007-01-02-UnboundedArray.cpp b/clang/test/CodeGenCXX/2007-01-02-UnboundedArray.cpp
deleted file mode 100644
index c76b7ef..0000000
--- a/clang/test/CodeGenCXX/2007-01-02-UnboundedArray.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-// Make sure unbounded arrays compile with debug information.
-//
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o -
-
-// PR1068
-
-struct Object {
- char buffer[];
-};
-
-int main(int argc, char** argv) {
- new Object;
- return 0;
-}
diff --git a/clang/test/CodeGenCXX/2009-03-17-dbg.cpp b/clang/test/CodeGenCXX/2009-03-17-dbg.cpp
deleted file mode 100644
index 22d9059..0000000
--- a/clang/test/CodeGenCXX/2009-03-17-dbg.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm %s -o /dev/null -debug-info-kind=limited
-
-template <typename T1,typename T2>
-inline void f(const T1&,const T2&) { }
-
-template <typename T1,typename T2,void F(const T1&,const T2&)>
-struct A {
- template <typename T> void g(T& i) { }
-};
-
-int main() {
- int i;
- A<int,int,f> a;
- a.g(i);
-}
diff --git a/clang/test/CodeGenCXX/2009-06-16-DebugInfoCrash.cpp b/clang/test/CodeGenCXX/2009-06-16-DebugInfoCrash.cpp
deleted file mode 100644
index 870e15c..0000000
--- a/clang/test/CodeGenCXX/2009-06-16-DebugInfoCrash.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm %s -o /dev/null -debug-info-kind=limited
-// This crashes if we try to emit debug info for TEMPLATE_DECL members.
-template <class T> class K2PtrVectorBase {};
-template <class T> class K2Vector {};
-template <class U > class K2Vector<U*> : public K2PtrVectorBase<U*> {};
-class ScriptInfoManager {
- void PostRegister() ;
- template <class SI> short ReplaceExistingElement(K2Vector<SI*>& v);
-};
-void ScriptInfoManager::PostRegister() {}
diff --git a/clang/test/CodeGenCXX/2010-05-10-Var-DbgInfo.cpp b/clang/test/CodeGenCXX/2010-05-10-Var-DbgInfo.cpp
deleted file mode 100644
index 2b39e7d..0000000
--- a/clang/test/CodeGenCXX/2010-05-10-Var-DbgInfo.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o /dev/null
-// PR 7104
-
-struct A {
- int Ai;
-};
-
-struct B : public A {};
-struct C : public B {};
-
-const char * f(int C::*){ return ""; }
-int f(int B::*) { return 1; }
-
-struct D : public C {};
-
-const char * g(int B::*){ return ""; }
-int g(int D::*) { return 1; }
-
-void test()
-{
- int i = f(&A::Ai);
-
- const char * str = g(&A::Ai);
-}
-
-// conversion of B::* to C::* is better than conversion of A::* to C::*
-typedef void (A::*pmfa)();
-typedef void (B::*pmfb)();
-typedef void (C::*pmfc)();
-
-struct X {
- operator pmfa();
- operator pmfb();
-};
-
-
-void g(pmfc);
-
-void test2(X x)
-{
- g(x);
-}
diff --git a/clang/test/CodeGenCXX/2010-05-12-PtrToMember-Dbg.cpp b/clang/test/CodeGenCXX/2010-05-12-PtrToMember-Dbg.cpp
deleted file mode 100644
index 355c3c9..0000000
--- a/clang/test/CodeGenCXX/2010-05-12-PtrToMember-Dbg.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-//RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -o - %s | FileCheck %s
-//CHECK: DILocalVariable(
-class Foo
-{
- public:
- int x;
- int y;
- Foo (int i, int j) { x = i; y = j; }
-};
-
-
-Foo foo(10, 11);
-
-int main() {
- int Foo::* pmi = &Foo::y;
- return foo.*pmi;
-}
diff --git a/clang/test/CodeGenCXX/2010-06-21-LocalVarDbg.cpp b/clang/test/CodeGenCXX/2010-06-21-LocalVarDbg.cpp
deleted file mode 100644
index c0c8bf6..0000000
--- a/clang/test/CodeGenCXX/2010-06-21-LocalVarDbg.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s
-// Do not use function name to create named metadata used to hold
-// local variable info. For example. llvm.dbg.lv.~A is an invalid name.
-
-// CHECK-NOT: llvm.dbg.lv.~A
-class A {
-public:
- ~A() { int i = 0; i++; }
-};
-
-int foo(int i) {
- A a;
- return 0;
-}
diff --git a/clang/test/CodeGenCXX/2010-07-23-DeclLoc.cpp b/clang/test/CodeGenCXX/2010-07-23-DeclLoc.cpp
deleted file mode 100644
index ef589e0..0000000
--- a/clang/test/CodeGenCXX/2010-07-23-DeclLoc.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
-// Require the template function declaration refer to the correct filename.
-// First, locate the function decl in metadata, and pluck out the file handle:
-// CHECK: !DISubprogram(name: "extract_dwarf_data_from_header
-// CHECK-SAME: file: [[FILE:![0-9]+]]
-// Second: Require that filehandle refer to the correct filename:
-// CHECK: [[FILE]] = !DIFile(filename: "decl_should_be_here.hpp"
-typedef long unsigned int __darwin_size_t;
-typedef __darwin_size_t size_t;
-typedef unsigned char uint8_t;
-typedef unsigned int uint32_t;
-typedef unsigned long long uint64_t;
-namespace std {
- template<typename _Tp> class auto_ptr {
- _Tp* _M_ptr;
- public:
- typedef _Tp element_type;
- auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { }
- element_type& operator*() const throw() { return *_M_ptr; }
- };
-}
-class Pointer32 {
-public:
- typedef uint32_t ptr_t;
- typedef uint32_t size_t;
-};
-class Pointer64 {
-public:
- typedef uint64_t ptr_t;
- typedef uint64_t size_t;
-};
-class BigEndian {};
-class LittleEndian {};
-template <typename _SIZE, typename _ENDIANNESS> class SizeAndEndianness {
-public:
- typedef _SIZE SIZE;
-};
-typedef SizeAndEndianness<Pointer32, LittleEndian> ISA32Little;
-typedef SizeAndEndianness<Pointer32, BigEndian> ISA32Big;
-typedef SizeAndEndianness<Pointer64, LittleEndian> ISA64Little;
-typedef SizeAndEndianness<Pointer64, BigEndian> ISA64Big;
-template <typename SIZE> class TRange {
-protected:
- typename SIZE::ptr_t _location;
- typename SIZE::size_t _length;
- TRange(typename SIZE::ptr_t location, typename SIZE::size_t length) : _location(location), _length(length) { }
-};
-template <typename SIZE, typename T> class TRangeValue : public TRange<SIZE> {
- T _value;
-public:
- TRangeValue(typename SIZE::ptr_t location, typename SIZE::size_t length, T value) : TRange<SIZE>(location, length), _value(value) {};
-};
-template <typename SIZE> class TAddressRelocator {};
-class CSCppSymbolOwner{};
-class CSCppSymbolOwnerData{};
-template <typename SIZE> class TRawSymbolOwnerData
-{
- TRangeValue< SIZE, uint8_t* > _TEXT_text_section;
- const char* _dsym_path;
- uint32_t _dylib_current_version;
- uint32_t _dylib_compatibility_version;
-public:
- TRawSymbolOwnerData() :
- _TEXT_text_section(0, 0, __null), _dsym_path(__null), _dylib_current_version(0), _dylib_compatibility_version(0) {}
-};
-template <typename SIZE_AND_ENDIANNESS> class TExtendedMachOHeader {};
-# 16 "decl_should_be_here.hpp"
-template <typename SIZE_AND_ENDIANNESS> void extract_dwarf_data_from_header(TExtendedMachOHeader<SIZE_AND_ENDIANNESS>& header,
- TRawSymbolOwnerData<typename SIZE_AND_ENDIANNESS::SIZE>& symbol_owner_data,
- TAddressRelocator<typename SIZE_AND_ENDIANNESS::SIZE>* address_relocator) {}
-struct CSCppSymbolOwnerHashFunctor {
- void operator()(const CSCppSymbolOwner& symbol_owner) const {
-# 97 "wrong_place_for_decl.cpp"
- }
-};
-template <typename SIZE_AND_ENDIANNESS> void create_symbol_owner_data_arch_specific(CSCppSymbolOwner* symbol_owner, const char* dsym_path) {
- typedef typename SIZE_AND_ENDIANNESS::SIZE SIZE;
- std::auto_ptr< TRawSymbolOwnerData<SIZE> > data(new TRawSymbolOwnerData<SIZE>());
- std::auto_ptr< TExtendedMachOHeader<SIZE_AND_ENDIANNESS> > header;
- extract_dwarf_data_from_header(*header, *data, (TAddressRelocator<typename SIZE_AND_ENDIANNESS::SIZE>*)__null);
-}
-void create_symbol_owner_data2(CSCppSymbolOwner* symbol_owner, const char* dsym_path) {
- create_symbol_owner_data_arch_specific< ISA32Little >(symbol_owner, dsym_path);
- create_symbol_owner_data_arch_specific< ISA32Big >(symbol_owner, dsym_path);
- create_symbol_owner_data_arch_specific< ISA64Little >(symbol_owner, dsym_path);
- create_symbol_owner_data_arch_specific< ISA64Big >(symbol_owner, dsym_path);
-}
diff --git a/clang/test/CodeGenCXX/Inputs/debug-info-class-limited.cpp b/clang/test/CodeGenCXX/Inputs/debug-info-class-limited.cpp
deleted file mode 100644
index 34a1cfa..0000000
--- a/clang/test/CodeGenCXX/Inputs/debug-info-class-limited.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "PR16214",{{.*}} line: [[@LINE+2]],{{.*}}
-// CHECK-NOT: DIFlagFwdDecl
-struct PR16214 {
- int i;
-};
-
-typedef PR16214 bar;
-
-bar *a;
-bar b;
-
-namespace PR14467 {
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo",{{.*}} line: [[@LINE+2]],{{.*}}
-// CHECK-NOT: DIFlagFwdDecl
-struct foo {
-};
-
-foo *bar(foo *a) {
- foo *b = new foo(*a);
- return b;
-}
-}
-
-namespace test1 {
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagFwdDecl
-struct foo {
-};
-
-extern int bar(foo *a);
-int baz(foo *a) {
- return bar(a);
-}
-}
-
-namespace test2 {
-// FIXME: if we were a bit fancier, we could realize that the 'foo' type is only
-// required because of the 'bar' type which is not required at all (or might
-// only be required to be declared)
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo",{{.*}} line: [[@LINE+2]],{{.*}}
-// CHECK-NOT: DIFlagFwdDecl
-struct foo {
-};
-
-struct bar {
- foo f;
-};
-
-void func() {
- foo *f;
-}
-}
diff --git a/clang/test/CodeGenCXX/PR20038.cpp b/clang/test/CodeGenCXX/PR20038.cpp
deleted file mode 100644
index b6d12f6..0000000
--- a/clang/test/CodeGenCXX/PR20038.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %clang_cc1 -triple %itanium_abi_triple -debug-info-kind=limited -mllvm -no-discriminators -emit-llvm %s -o - | FileCheck %s
-
-struct C {
- ~C();
-};
-extern bool b;
-// CHECK: call {{.*}}, !dbg [[DTOR_CALL1_LOC:![0-9]*]]
-// CHECK: call {{.*}}, !dbg [[DTOR_CALL2_LOC:![0-9]*]]
-// CHECK: [[FUN1:.*]] = distinct !DISubprogram(name: "fun1",{{.*}} DISPFlagDefinition
-// CHECK: [[DTOR_CALL1_LOC]] = !DILocation(line: [[@LINE+1]], column: 15, scope: [[FUN1]])
-void fun1() { b && (C(), 1); }
-// CHECK: [[FUN2:.*]] = distinct !DISubprogram(name: "fun2",{{.*}} DISPFlagDefinition
-// CHECK: [[DTOR_CALL2_LOC]] = !DILocation(line: [[@LINE+1]], column: 15, scope: [[FUN2]])
-bool fun2() { return (C(), b) && 0; }
diff --git a/clang/test/CodeGenCXX/aarch64-sve-vector-conditional-op.cpp b/clang/test/CodeGenCXX/aarch64-sve-vector-conditional-op.cpp
index d6fa26b..5c99393 100644
--- a/clang/test/CodeGenCXX/aarch64-sve-vector-conditional-op.cpp
+++ b/clang/test/CodeGenCXX/aarch64-sve-vector-conditional-op.cpp
@@ -10,8 +10,7 @@
// CHECK-LABEL: @_Z9cond_boolu10__SVBool_tS_(
// CHECK-NEXT: entry:
// CHECK-NEXT: [[CMP:%.*]] = icmp ult <vscale x 16 x i1> [[A:%.*]], [[B:%.*]]
-// CHECK-NEXT: [[VECTOR_COND:%.*]] = icmp ne <vscale x 16 x i1> [[CMP]], zeroinitializer
-// CHECK-NEXT: [[VECTOR_SELECT:%.*]] = select <vscale x 16 x i1> [[VECTOR_COND]], <vscale x 16 x i1> [[A]], <vscale x 16 x i1> [[B]]
+// CHECK-NEXT: [[VECTOR_SELECT:%.*]] = select <vscale x 16 x i1> [[CMP]], <vscale x 16 x i1> [[A]], <vscale x 16 x i1> [[B]]
// CHECK-NEXT: ret <vscale x 16 x i1> [[VECTOR_SELECT]]
//
svbool_t cond_bool(svbool_t a, svbool_t b) {
diff --git a/clang/test/CodeGenCXX/aix-static-init-debug-info.cpp b/clang/test/CodeGenCXX/aix-static-init-debug-info.cpp
deleted file mode 100644
index 6453e43..0000000
--- a/clang/test/CodeGenCXX/aix-static-init-debug-info.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-// RUN: %clang_cc1 -triple powerpc-ibm-aix-xcoff -emit-llvm -x c++ \
-// RUN: -debug-info-kind=limited < %s | \
-// RUN: FileCheck %s
-
-// RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -emit-llvm -x c++ \
-// RUN: -debug-info-kind=limited < %s | \
-// RUN: FileCheck %s
-
-struct X {
- X();
- ~X();
-};
-
-X v;
-
-// CHECK: define internal void @__cxx_global_var_init() [[ATTR:#[0-9]+]] !dbg ![[DBGVAR16:[0-9]+]] {
-// CHECK: entry:
-// CHECK: call void @_ZN1XC1Ev(ptr {{[^,]*}} @v), !dbg ![[DBGVAR19:[0-9]+]]
-// CHECK: %0 = call i32 @atexit(ptr @__dtor_v) [[ATTR:#[0-9]+]], !dbg ![[DBGVAR19b:[0-9]+]]
-// CHECK: ret void, !dbg ![[DBGVAR19]]
-// CHECK: }
-
-// CHECK: define internal void @__dtor_v() [[ATTR:#[0-9]+]] !dbg ![[DBGVAR20:[0-9]+]] {
-// CHECK: entry:
-// CHECK: call void @_ZN1XD1Ev(ptr @v), !dbg ![[DBGVAR21b:[0-9]+]]
-// CHECK: ret void, !dbg ![[DBGVAR21:[0-9]+]]
-// CHECK: }
-
-// CHECK: define internal void @__finalize_v() [[ATTR:#[0-9]+]] !dbg ![[DBGVAR22:[0-9]+]] {
-// CHECK: entry:
-// CHECK: %0 = call i32 @unatexit(ptr @__dtor_v) [[ATTR:#[0-9]+]], !dbg ![[DBGVAR24:[0-9]+]]
-// CHECK: %needs_destruct = icmp eq i32 %0, 0, !dbg ![[DBGVAR24]]
-// CHECK: br i1 %needs_destruct, label %destruct.call, label %destruct.end, !dbg ![[DBGVAR24]]
-
-// CHECK: destruct.call:
-// CHECK: call void @__dtor_v(), !dbg ![[DBGVAR24]]
-// CHECK: br label %destruct.end, !dbg ![[DBGVAR24]]
-
-// CHECK: destruct.end:
-// CHECK: ret void, !dbg ![[DBGVAR24]]
-// CHECK: }
-
-// CHECK: define internal void @_GLOBAL__sub_I__() [[ATTR:#[0-9]+]] !dbg ![[DBGVAR25:[0-9]+]] {
-// CHECK: entry:
-// CHECK: call void @__cxx_global_var_init(), !dbg ![[DBGVAR26:[0-9]+]]
-// CHECK: ret void
-// CHECK: }
-
-// CHECK: define internal void @_GLOBAL__D_a() [[ATTR:#[0-9]+]] !dbg ![[DBGVAR27:[0-9]+]] {
-// CHECK: entry:
-// CHECK: call void @__finalize_v(), !dbg ![[DBGVAR28:[0-9]+]]
-// CHECK: ret void
-// CHECK: }
-
-// CHECK: ![[DBGVAR16]] = distinct !DISubprogram(name: "__cxx_global_var_init", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, type: !{{[0-9]+}}, flags: DIFlagArtificial, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !{{[0-9]+}})
-// CHECK: ![[DBGVAR19]] = !DILocation(line: 14, column: 3, scope: ![[DBGVAR16]])
-// CHECK: ![[DBGVAR19b]] = !DILocation(line: 0, scope: ![[DBGVAR16]])
-// CHECK: ![[DBGVAR20]] = distinct !DISubprogram(name: "__dtor_v", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: 14, type: !{{[0-9]+}}, scopeLine: 14, flags: DIFlagArtificial, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !{{[0-9]+}})
-// CHECK: ![[DBGVAR21b]] = !DILocation(line: 0, scope: ![[DBGVAR20]])
-// CHECK: ![[DBGVAR21]] = !DILocation(line: 14, column: 3, scope: ![[DBGVAR20]])
-// CHECK: ![[DBGVAR22]] = distinct !DISubprogram(linkageName: "__finalize_v", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: 14, type: !{{[0-9]+}}, scopeLine: 14, flags: DIFlagArtificial, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !{{[0-9]+}})
-// CHECK: ![[DBGVAR24]] = !DILocation(line: 14, column: 3, scope: ![[DBGVAR22]])
-// CHECK: ![[DBGVAR25]] = distinct !DISubprogram(linkageName: "_GLOBAL__sub_I__", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, type: !{{[0-9]+}}, flags: DIFlagArtificial, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !{{[0-9]+}})
-// CHECK: ![[DBGVAR26]] = !DILocation(line: 0, scope: ![[DBGVAR25]])
-// CHECK: ![[DBGVAR27]] = distinct !DISubprogram(linkageName: "_GLOBAL__D_a", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, type: !{{[0-9]+}}, flags: DIFlagArtificial, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !{{[0-9]+}})
-// CHECK: ![[DBGVAR28]] = !DILocation(line: 0, scope: ![[DBGVAR27]])
diff --git a/clang/test/CodeGenCXX/bpf-debug-structors.cpp b/clang/test/CodeGenCXX/bpf-debug-structors.cpp
deleted file mode 100644
index c4c9848..0000000
--- a/clang/test/CodeGenCXX/bpf-debug-structors.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %clang_cc1 -debug-info-kind=constructor -triple bpf -emit-llvm %s -o - | FileCheck %s
-
-class Foo {
-public:
- virtual ~Foo() noexcept;
-};
-
-class Bar : public Foo {
-public:
- Bar() noexcept {}
- ~Bar() noexcept override;
-};
-
-// CHECK: declare !dbg !{{[0-9]+}} void @_ZN3FooD2Ev(ptr noundef nonnull align 8 dereferenceable(8))
diff --git a/clang/test/CodeGenCXX/cp-blocks-linetables.cpp b/clang/test/CodeGenCXX/cp-blocks-linetables.cpp
deleted file mode 100644
index ca8cba8..0000000
--- a/clang/test/CodeGenCXX/cp-blocks-linetables.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// RUN: %clang_cc1 -fblocks -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s
-// Ensure that we generate a line table entry for the block cleanup.
-// CHECK: define {{.*}} @__main_block_invoke
-// CHECK: _NSConcreteStackBlock
-// CHECK: call {{.*}} @_Block_object_dispose{{.*}}, !dbg ![[L1:[0-9]+]]
-// CHECK: ret
-
-void * _NSConcreteStackBlock;
-#ifdef __cplusplus
-extern "C" void exit(int);
-#else
-extern void exit(int);
-#endif
-
-enum numbers {
- zero, one, two, three, four
-};
-
-typedef enum numbers (^myblock)(enum numbers);
-
-
-double test(myblock I) {
- return I(three);
-}
-
-int main() {
- __block enum numbers x = one;
- __block enum numbers y = two;
-
- /* Breakpoint for first Block function. */
- myblock CL = ^(enum numbers z)
- { enum numbers savex = x;
- { __block enum numbers x = savex;
- y = z;
- if (y != three)
- exit (6);
- test (
- /* Breakpoint for second Block function. */
- ^ (enum numbers z) {
- if (y != three) {
- exit(1);
- }
- if (x != one)
- exit(2);
- x = z;
- if (x != three)
- exit(3);
- if (y != three)
- exit(4);
- return (enum numbers) four;
- });}
- return x;
- };
-
- enum numbers res = (enum numbers)test(CL);
-
- if (res != one)
- exit (5);
- return 0;
-}
diff --git a/clang/test/CodeGenCXX/cxx2b-deducing-this.cpp b/clang/test/CodeGenCXX/cxx2b-deducing-this.cpp
index 8a78463d..9664a86 100644
--- a/clang/test/CodeGenCXX/cxx2b-deducing-this.cpp
+++ b/clang/test/CodeGenCXX/cxx2b-deducing-this.cpp
@@ -264,3 +264,55 @@ void test() {
// CHECK: call void @_ZNH5P27971C1cERKS0_
// CHECK: call void @_ZN5P27971C1cEi
}
+
+// This used to crash because we weren’t instantiating a dependent 'this'.
+namespace GH154054 {
+struct S {
+ int x;
+ auto byval() {
+ return [*this](this auto) { return this->x; };
+ }
+};
+
+// CHECK-LABEL: define {{.*}} void @_ZN8GH1540544mainEv
+void main() {
+ S s{ 42 };
+
+ // CHECK: call {{.*}} i32 @_ZZN8GH1540541S5byvalEvENHUlT_E_clIS2_EEDaS1_
+ if ( s.byval()() != 42)
+ __builtin_abort();
+}
+
+// CHECK-LABEL: define {{.*}} i32 @_ZZN8GH1540541S5byvalEvENHUlT_E_clIS2_EEDaS1_(i32 %.coerce)
+// CHECK: entry:
+// CHECK: %0 = alloca %class.anon.11, align 4
+// CHECK: %coerce.dive = getelementptr inbounds nuw %class.anon.11, ptr %0, i32 0, i32 0
+// CHECK: %coerce.dive1 = getelementptr inbounds nuw %"struct.GH154054::S", ptr %coerce.dive, i32 0, i32 0
+// CHECK: store i32 %.coerce, ptr %coerce.dive1, align 4
+// CHECK: %1 = getelementptr inbounds nuw %class.anon.11, ptr %0, i32 0, i32 0
+// CHECK: %x = getelementptr inbounds nuw %"struct.GH154054::S", ptr %1, i32 0, i32 0
+// CHECK: %2 = load i32, ptr %x, align 4
+// CHECK: ret i32 %2
+
+struct s {
+ int q;
+ auto f() {
+ return [*this](this auto) { return this; };
+ }
+};
+
+// CHECK-LABEL: define {{.*}} void @_ZN8GH1540541fEv
+void f() {
+ // CHECK: call {{.*}} ptr @_ZZN8GH1540541s1fEvENHUlT_E_clIS2_EEDaS1_
+ s{}.f()();
+}
+
+// CHECK-LABEL: define {{.*}} ptr @_ZZN8GH1540541s1fEvENHUlT_E_clIS2_EEDaS1_(i32 %.coerce)
+// CHECK: entry:
+// CHECK: %0 = alloca %class.anon.12, align 4
+// CHECK: %coerce.dive = getelementptr inbounds nuw %class.anon.12, ptr %0, i32 0, i32 0
+// CHECK: %coerce.dive1 = getelementptr inbounds nuw %"struct.GH154054::s", ptr %coerce.dive, i32 0, i32 0
+// CHECK: store i32 %.coerce, ptr %coerce.dive1, align 4
+// CHECK: %1 = getelementptr inbounds nuw %class.anon.12, ptr %0, i32 0, i32 0
+// CHECK: ret ptr %1
+}
diff --git a/clang/test/CodeGenCXX/dbg-info-all-calls-described.cpp b/clang/test/CodeGenCXX/dbg-info-all-calls-described.cpp
deleted file mode 100644
index e64e07c..0000000
--- a/clang/test/CodeGenCXX/dbg-info-all-calls-described.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-// Test that call site debug info is (un)supported in various configurations.
-
-// Supported: DWARF5, -O1, standalone DI
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o - \
-// RUN: -O1 -disable-llvm-passes \
-// RUN: -debug-info-kind=standalone -dwarf-version=5 \
-// RUN: | FileCheck %s -check-prefix=HAS-ATTR \
-// RUN: -implicit-check-not=DISubprogram -implicit-check-not=DIFlagAllCallsDescribed
-
-// Supported: DWARF4 + LLDB tuning, -O1, limited DI
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o - \
-// RUN: -O1 -disable-llvm-passes \
-// RUN: -debugger-tuning=lldb \
-// RUN: -debug-info-kind=standalone -dwarf-version=4 \
-// RUN: | FileCheck %s -check-prefix=HAS-ATTR \
-// RUN: -implicit-check-not=DISubprogram -implicit-check-not=DIFlagAllCallsDescribed
-
-// Note: DIFlagAllCallsDescribed may have been enabled prematurely when tuning
-// for GDB under -gdwarf-4 in https://reviews.llvm.org/D69743. It's possible
-// this should have been 'Unsupported' until entry values emission was enabled
-// by default.
-//
-// Supported: DWARF4 + GDB tuning
-// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu \
-// RUN: %s -o - -O1 -disable-llvm-passes -debugger-tuning=gdb \
-// RUN: -debug-info-kind=standalone -dwarf-version=4 \
-// RUN: | FileCheck %s -check-prefix=HAS-ATTR \
-// RUN: -implicit-check-not=DIFlagAllCallsDescribed
-
-// Supported: DWARF4 + LLDB, -O1
-// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu \
-// RUN: %s -o - -O1 -disable-llvm-passes -debugger-tuning=lldb \
-// RUN: -debug-info-kind=standalone -dwarf-version=4 \
-// RUN: | FileCheck %s -check-prefix=HAS-ATTR \
-// RUN: -implicit-check-not=DIFlagAllCallsDescribed
-
-// Unsupported: -O0
-// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu \
-// RUN: %s -o - -O0 -disable-llvm-passes -debugger-tuning=gdb \
-// RUN: -debug-info-kind=standalone -dwarf-version=4 \
-// RUN: | FileCheck %s -check-prefix=NO-ATTR
-
-// Supported: DWARF4 + LLDB tuning, -O1, line-tables only DI
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o - \
-// RUN: -O1 -disable-llvm-passes \
-// RUN: -debugger-tuning=lldb \
-// RUN: -debug-info-kind=line-tables-only -dwarf-version=4 \
-// RUN: | FileCheck %s -check-prefix=LINE-TABLES-ONLY
-
-// Unsupported: -O0
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o - \
-// RUN: -O0 \
-// RUN: -debug-info-kind=standalone -dwarf-version=5 \
-// RUN: | FileCheck %s -check-prefix=NO-ATTR
-
-// Unsupported: DWARF4
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o - \
-// RUN: -O1 -disable-llvm-passes \
-// RUN: -debug-info-kind=standalone -dwarf-version=4 \
-// RUN: | FileCheck %s -check-prefix=NO-ATTR
-
-// NO-ATTR-NOT: FlagAllCallsDescribed
-
-// HAS-ATTR-DAG: DISubprogram(name: "declaration1", {{.*}}, flags: DIFlagPrototyped
-// HAS-ATTR-DAG: DISubprogram(name: "declaration2", {{.*}}, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition
-// HAS-ATTR-DAG: DISubprogram(name: "struct1", {{.*}}, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
-// HAS-ATTR-DAG: DISubprogram(name: "struct1", {{.*}}, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition
-// HAS-ATTR-DAG: DISubprogram(name: "method1", {{.*}}, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition
-// HAS-ATTR-DAG: DISubprogram(name: "force_irgen", {{.*}}, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition
-
-// LINE-TABLES-ONLY: DISubprogram(name: "force_irgen", {{.*}}, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition
-
-void declaration1();
-
-void declaration2();
-
-void declaration2() {}
-
-struct struct1 {
- struct1() {}
- void method1() {}
-};
-
-void __attribute__((optnone)) force_irgen() {
- declaration1();
- struct1().method1();
-}
diff --git a/clang/test/CodeGenCXX/debug-info-access.cpp b/clang/test/CodeGenCXX/debug-info-access.cpp
deleted file mode 100644
index 9f2c044..0000000
--- a/clang/test/CodeGenCXX/debug-info-access.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple %itanium_abi_triple %s -o - | FileCheck %s
-// Test the various accessibility flags in the debug info.
-struct A {
- // CHECK: ![[A:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A",
-
- // CHECK-DAG: !DISubprogram(name: "pub_default",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPrototyped,
- void pub_default();
- // CHECK-DAG: !DIDerivedType(tag: DW_TAG_member, name: "pub_default_static",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagStaticMember)
- static int pub_default_static;
-};
-
-// CHECK: !DIDerivedType(tag: DW_TAG_inheritance,{{.*}} baseType: ![[A]],{{.*}} flags: DIFlagPublic, extraData: i32 0)
-class B : public A {
-public:
- // CHECK-DAG: !DISubprogram(name: "pub",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPublic | DIFlagPrototyped,
- void pub();
- // CHECK-DAG: !DIDerivedType(tag: DW_TAG_member, name: "public_static",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPublic | DIFlagStaticMember)
- static int public_static;
-
-protected:
- // CHECK-DAG: !DIDerivedType(tag: DW_TAG_typedef, name: "prot_typedef",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagProtected)
- typedef int prot_typedef;
- // CHECK-DAG: !DIDerivedType(tag: DW_TAG_typedef, name: "prot_using",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagProtected)
- using prot_using = prot_typedef;
- prot_using prot_member;
-
- // CHECK: !DISubprogram(name: "prot",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagProtected | DIFlagPrototyped,
- void prot();
-
-private:
- // CHECK: !DISubprogram(name: "priv_default",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPrototyped,
- void priv_default();
-};
-
-class C {
-public:
- // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "D",{{.*}} flags: DIFlagPublic | DIFlagTypePassByValue,
- struct D {
- };
-protected:
- // CHECK: !DICompositeType(tag: DW_TAG_union_type, name: "E",{{.*}} flags: DIFlagProtected | DIFlagTypePassByValue,
- union E {
- };
-private:
- // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "J",{{.*}} flags: DIFlagTypePassByValue,
- struct J {
- };
-public:
- D d;
- E e;
- J j;
-};
-
-struct F {
-private:
- // CHECK: !DICompositeType(tag: DW_TAG_union_type, name: "G",{{.*}} flags: DIFlagPrivate | DIFlagTypePassByValue,
- union G {
- };
-public:
- G g;
-};
-
-union H {
-private:
- // CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "I",{{.*}} flags: DIFlagPrivate | DIFlagTypePassByValue,
- class I {
- };
-public:
- I i;
-};
-
-union U {
- // CHECK-DAG: !DISubprogram(name: "union_pub_default",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPrototyped,
- void union_pub_default();
-private:
- // CHECK-DAG: !DIDerivedType(tag: DW_TAG_member, name: "union_priv",{{.*}} line: [[@LINE+1]],{{.*}} flags: DIFlagPrivate)
- int union_priv;
-};
-
-// CHECK: !DISubprogram(name: "free",
-// CHECK-SAME: flags: DIFlagPrototyped,
-// CHECK-SAME: spFlags: DISPFlagDefinition
-void free() {}
-
-U u;
-A a;
-B b;
-C c;
-F f;
-H h;
diff --git a/clang/test/CodeGenCXX/debug-info-alias.cpp b/clang/test/CodeGenCXX/debug-info-alias.cpp
deleted file mode 100644
index fbb2ad6..0000000
--- a/clang/test/CodeGenCXX/debug-info-alias.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-// RUN: %clang -g -gno-template-alias -std=c++11 -S -emit-llvm %s -o - | FileCheck %s
-
-template<typename T>
-struct foo {
-};
-
-template<typename T, typename T2 = int>
-struct baz {
-};
-
-namespace x {
-// splitting these over multiple lines to make sure the right token is used for
-// the location
-template<typename T>
-using
-# 42
-bar
-= foo<T*>;
-}
-
-// CHECK: !DIGlobalVariable(name: "bi",{{.*}} type: [[BINT:![0-9]+]]
-x::bar<int> bi;
-// CHECK: !DIGlobalVariable(name: "bf",{{.*}} type: [[BFLOAT:![0-9]+]]
-// CHECK: [[BFLOAT]] = !DIDerivedType(tag: DW_TAG_typedef, name: "bar<float>"
-x::bar<float> bf;
-// CHECK: !DIGlobalVariable(name: "bz",{{.*}} type: [[BBAZ:![0-9]+]]
-// CHECK: [[BBAZ]] = !DIDerivedType(tag: DW_TAG_typedef, name: "bar<baz<int,{{ *}}int> >"
-x::bar<baz<int>> bz;
-
-using
-// CHECK: !DIGlobalVariable(name: "n",{{.*}} type: [[NARF:![0-9]+]]
-# 142
-narf // CHECK: [[NARF]] = !DIDerivedType(tag: DW_TAG_typedef, name: "narf"
-// CHECK-SAME: line: 142
-= int;
-narf n;
-
-template <typename T>
-using tv = void;
-// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "tv<int>"
-tv<int> *tvp;
-
-using v = void;
-// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "v"
-v *vp;
-
-// CHECK: [[BINT]] = !DIDerivedType(tag: DW_TAG_typedef, name: "bar<int>"
-// CHECK-SAME: line: 42,
diff --git a/clang/test/CodeGenCXX/debug-info-anon-namespace.cpp b/clang/test/CodeGenCXX/debug-info-anon-namespace.cpp
deleted file mode 100644
index 56c8528..0000000
--- a/clang/test/CodeGenCXX/debug-info-anon-namespace.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -dwarf-explicit-import -O0 %s -o - | FileCheck --check-prefix=IMPORT %s
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -O0 %s -o - | FileCheck --check-prefix=NOIMPORT %s
-
-namespace
-{
- int a = 5;
-}
-int *b = &a;
-
-namespace
-{
- namespace {
- int a1 = 5;
- }
- int a2 = 7;
-}
-int *b1 = &a1;
-int *b2 = &a2;
-
-// IMPORT: [[NS:![0-9]+]] = !DINamespace
-// IMPORT: [[CU:![0-9]+]] = distinct !DICompileUnit
-// IMPORT: [[NS2:![0-9]+]] = !DINamespace
-// IMPORT: !DIImportedEntity(tag: DW_TAG_imported_module, scope: [[CU]], entity: [[NS]], file: {{![0-9]+}})
-// IMPORT: !DIImportedEntity(tag: DW_TAG_imported_module, scope: [[NS]], entity: [[NS2]], file: {{![0-9]+}}, line: {{[0-9]+}})
-// NOIMPORT-NOT: !DIImportedEntity
diff --git a/clang/test/CodeGenCXX/debug-info-anon-union-vars.cpp b/clang/test/CodeGenCXX/debug-info-anon-union-vars.cpp
deleted file mode 100644
index 61b3c7c..0000000
--- a/clang/test/CodeGenCXX/debug-info-anon-union-vars.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-linux-gnu %s -o - | FileCheck %s
-
-// Make sure that we emit a global variable for each of the members of the
-// anonymous union.
-
-static union {
- int c;
- int d;
- union {
- int a;
- };
- struct {
- int b;
- };
-};
-
-int test_it() {
- c = 1;
- d = 2;
- a = 4;
- return (c == 1);
-}
-
-void foo() {
- union {
- int i;
- char c;
- };
- i = 8;
-}
-
-// A funky reinterpret cast idiom that we used to crash on.
-template <class T>
-unsigned char *buildBytes(const T v) {
- static union {
- unsigned char result[sizeof(T)];
- T value;
- };
- value = v;
- return result;
-}
-
-void instantiate(int x) {
- buildBytes(x);
-}
-
-// CHECK: !DIGlobalVariable(name: "c",{{.*}} file: [[FILE:.*]], line: 6,{{.*}} isLocal: true, isDefinition: true
-// CHECK: !DIGlobalVariable(name: "d",{{.*}} file: [[FILE]], line: 6,{{.*}} isLocal: true, isDefinition: true
-// CHECK: [[FILE]] = !DIFile(filename: "{{.*}}debug-info-anon-union-vars.cpp",
-// CHECK: !DIGlobalVariable(name: "a",{{.*}} file: [[FILE]], line: 6,{{.*}} isLocal: true, isDefinition: true
-// CHECK: !DIGlobalVariable(name: "b",{{.*}} file: [[FILE]], line: 6,{{.*}} isLocal: true, isDefinition: true
-// CHECK: !DIGlobalVariable(name: "result", {{.*}} isLocal: false, isDefinition: true
-// CHECK: !DIGlobalVariable(name: "value", {{.*}} isLocal: false, isDefinition: true
-// CHECK: !DILocalVariable(name: "i", {{.*}}, flags: DIFlagArtificial
-// CHECK: !DILocalVariable(name: "c", {{.*}}, flags: DIFlagArtificial
-// CHECK: !DILocalVariable(
-// CHECK-NOT: name:
-// CHECK: type: ![[UNION:[0-9]+]]
-// CHECK: ![[UNION]] = distinct !DICompositeType(tag: DW_TAG_union_type,
-// CHECK-NOT: name:
-// CHECK: elements
-// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "i", scope: ![[UNION]],
-// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "c", scope: ![[UNION]],
diff --git a/clang/test/CodeGenCXX/debug-info-artificial-arg.cpp b/clang/test/CodeGenCXX/debug-info-artificial-arg.cpp
deleted file mode 100644
index a0cf131..0000000
--- a/clang/test/CodeGenCXX/debug-info-artificial-arg.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
-
-template<class X> class B {
-public:
- explicit B(X* p = 0);
-};
-
-class A
-{
-public:
- A(int value) : m_a_value(value) {};
- A(int value, A* client_A) : m_a_value (value), m_client_A (client_A) {}
-
- virtual ~A() {}
-
-private:
- int m_a_value;
- B<A> m_client_A;
-};
-
-int main(int argc, char **argv) {
- A reallyA (500);
-}
-
-// CHECK: ![[CLASSTYPE:.*]] = distinct !DICompositeType(tag: DW_TAG_class_type, name: "A",
-// CHECK-SAME: identifier: "_ZTS1A"
-// CHECK: ![[ARTARG:.*]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[CLASSTYPE]],{{.*}} DIFlagArtificial
-// CHECK: !DISubprogram(name: "A", scope: ![[CLASSTYPE]]
-// CHECK-SAME: line: 12
-// CHECK-SAME: DIFlagPublic
-// CHECK: !DISubroutineType(types: [[FUNCTYPE:![0-9]*]])
-// CHECK: [[FUNCTYPE]] = !{null, ![[ARTARG]], !{{.*}}, !{{.*}}}
diff --git a/clang/test/CodeGenCXX/debug-info-atexit-stub.cpp b/clang/test/CodeGenCXX/debug-info-atexit-stub.cpp
deleted file mode 100644
index ca9bc3a..0000000
--- a/clang/test/CodeGenCXX/debug-info-atexit-stub.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-windows-msvc -gcodeview -debug-info-kind=limited -o - | FileCheck %s
-
-struct a {
- ~a();
-};
-template <typename b> struct c : a {
- c(void (b::*)());
-};
-struct B {
- virtual void e();
-};
-c<B> *d() {
- static c<B> f(&B::e);
- return &f;
-}
-
-// CHECK: define internal void @"??__Ff@?1??d@@YAPEAU?$c@UB@@@@XZ@YAXXZ"()
-// CHECK-SAME: !dbg ![[SUBPROGRAM:[0-9]+]] {
-// CHECK: call void @"??1?$c@UB@@@@QEAA@XZ"(ptr @"?f@?1??d@@YAPEAU?$c@UB@@@@XZ@4U2@A"), !dbg ![[LOCATION:[0-9]+]]
-// CHECK: ![[SUBPROGRAM]] = distinct !DISubprogram(name: "`dynamic atexit destructor for 'f'"
-// CHECK-SAME: flags: DIFlagArtificial
-// CHECK: ![[LOCATION]] = !DILocation(line: 0, scope: ![[SUBPROGRAM]])
diff --git a/clang/test/CodeGenCXX/debug-info-auto-return.cpp b/clang/test/CodeGenCXX/debug-info-auto-return.cpp
deleted file mode 100644
index c7a97ba1..0000000
--- a/clang/test/CodeGenCXX/debug-info-auto-return.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// Test for debug info for C++11 auto return member functions
-// RUN: %clang_cc1 -dwarf-version=5 -emit-llvm -triple x86_64-linux-gnu %s -o - \
-// RUN: -O0 -disable-llvm-passes \
-// RUN: -debug-info-kind=standalone \
-// RUN: | FileCheck --implicit-check-not="\"auto\"" --implicit-check-not=DISubprogram %s
-
-// CHECK: !DISubprogram(name: "findMax",{{.*}}, type: [[FUN_TYPE:![0-9]+]], {{.*}}spFlags: DISPFlagDefinition, {{.*}} declaration: [[DECL:![0-9]+]]
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "myClass",
-// CHECK-SAME: elements: [[MEMBERS:![0-9]+]],
-
-// CHECK: [[MEMBERS]] = !{}
-
-// CHECK: [[FUN_TYPE]] = !DISubroutineType(types: [[TYPE_NODE:![0-9]+]])
-// CHECK-NEXT: [[TYPE_NODE]] = !{[[DOUBLE_TYPE:![0-9]+]],
-// CHECK-NEXT: [[DOUBLE_TYPE]] = !DIBasicType(name: "double",
-// CHECK: [[DECL]] = !DISubprogram(name: "findMax",{{.*}}, type: [[FUN_TYPE]],
-
-struct myClass {
- auto findMax();
-};
-
-auto myClass::findMax() {
- return 0.0;
-}
diff --git a/clang/test/CodeGenCXX/debug-info-block-invocation-linkage-name.cpp b/clang/test/CodeGenCXX/debug-info-block-invocation-linkage-name.cpp
deleted file mode 100644
index 5fadae9..0000000
--- a/clang/test/CodeGenCXX/debug-info-block-invocation-linkage-name.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -fblocks -triple %itanium_abi_triple %s -o - | FileCheck %s
-
-// CHECK: !DISubprogram(name: "___Z1fU13block_pointerFviE_block_invoke", linkageName: "___Z1fU13block_pointerFviE_block_invoke"
-void g(void (^call)(int));
-
-void f(void (^callback)(int)) {
- g(^(int x) {
- callback(x);
- });
-}
-
-void h() {
- f(^(int x){
- });
-}
diff --git a/clang/test/CodeGenCXX/debug-info-blocks.cpp b/clang/test/CodeGenCXX/debug-info-blocks.cpp
deleted file mode 100644
index e05e2ba..0000000
--- a/clang/test/CodeGenCXX/debug-info-blocks.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-// RUN: %clang_cc1 %s -debug-info-kind=line-tables-only -fblocks -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 %s -debug-info-kind=line-directives-only -fblocks -emit-llvm -o - | FileCheck %s
-
-struct A {
- A();
- A(const A &);
- ~A();
-};
-
-void test() {
- __block A a;
- ^{ (void)a; };
-}
-
-// CHECK: !DISubprogram(linkageName: "__Block_byref_object_copy_",
-// CHECK-SAME: DISPFlagLocalToUnit | DISPFlagDefinition
-// CHECK: !DISubprogram(linkageName: "__Block_byref_object_dispose_",
-// CHECK-SAME: DISPFlagLocalToUnit | DISPFlagDefinition
diff --git a/clang/test/CodeGenCXX/debug-info-byval.cpp b/clang/test/CodeGenCXX/debug-info-byval.cpp
deleted file mode 100644
index ac122ec..0000000
--- a/clang/test/CodeGenCXX/debug-info-byval.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-// FIXME: Check IR rather than asm, then triple is not needed.
-// RUN: %clang --target=%itanium_abi_triple -g -S %s -o - | FileCheck %s
-// Test to check presence of debug info for byval parameter.
-class DAG {
-public:
- int i;
- int j;
-};
-
-class EVT {
-public:
- int a;
- int b;
- int c;
-};
-
-class VAL {
-public:
- int x;
- int y;
-};
-void foo(EVT e);
-EVT bar();
-
-void get(int *i, unsigned dl, VAL v, VAL *p, unsigned n, EVT missing_arg) {
-//CHECK: .{{asciz|string|byte}} "missing_arg"
- EVT e = bar();
- if (dl == n)
- foo(missing_arg);
-}
-
diff --git a/clang/test/CodeGenCXX/debug-info-calling-conventions.cpp b/clang/test/CodeGenCXX/debug-info-calling-conventions.cpp
deleted file mode 100644
index db7fbd2..0000000
--- a/clang/test/CodeGenCXX/debug-info-calling-conventions.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-// RUN: %clang_cc1 %s -triple=i686-pc-windows-msvc -debug-info-kind=limited -emit-llvm -o - | FileCheck %s
-
-struct A {
- void thiscallcc();
-};
-void A::thiscallcc() {}
-
-// CHECK: !DISubprogram(name: "thiscallcc", {{.*}} type: ![[thiscallty:[^,]*]], {{.*}})
-// CHECK: ![[thiscallty]] = !DISubroutineType(cc: DW_CC_BORLAND_thiscall, types: ![[thisargs:[^,)]*]])
-// CHECK: ![[thisargs]] = !{null, ![[thisptrty:[^,}]*]]}
-// CHECK: ![[thisptrty]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !{{.*}}, size: 32, flags: DIFlagArtificial | DIFlagObjectPointer)
-
-void cdeclcc() {}
-void __fastcall fastcallcc() {}
-void __stdcall stdcallcc() {}
-void __vectorcall vectorcallcc() {}
-
-// CHECK: !DISubprogram(name: "cdeclcc", {{.*}} type: ![[cdeclty:[^,]*]], {{.*}})
-// CHECK: ![[cdeclty]] = !DISubroutineType(types: ![[noargs:[^,)]*]])
-// CHECK: ![[noargs]] = !{null}
-// CHECK: !DISubprogram(name: "fastcallcc", {{.*}} type: ![[fastcallty:[^,]*]], {{.*}})
-// CHECK: ![[fastcallty]] = !DISubroutineType(cc: DW_CC_BORLAND_msfastcall, types: ![[noargs]])
-// CHECK: !DISubprogram(name: "stdcallcc", {{.*}} type: ![[stdcallty:[^,]*]], {{.*}})
-// CHECK: ![[stdcallty]] = !DISubroutineType(cc: DW_CC_BORLAND_stdcall, types: ![[noargs]])
-// CHECK: !DISubprogram(name: "vectorcallcc", {{.*}} type: ![[vectorcallty:[^,]*]], {{.*}})
-// CHECK: ![[vectorcallty]] = !DISubroutineType(cc: DW_CC_LLVM_vectorcall, types: ![[noargs]])
diff --git a/clang/test/CodeGenCXX/debug-info-char16.cpp b/clang/test/CodeGenCXX/debug-info-char16.cpp
deleted file mode 100644
index 83ffea6..0000000
--- a/clang/test/CodeGenCXX/debug-info-char16.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -std=c++11 -debug-info-kind=limited %s -o -| FileCheck %s
-
-// 16 is DW_ATE_UTF (0x10) encoding attribute.
-char16_t char_a = u'h';
-
-// CHECK: !{{.*}} = !DIBasicType(name: "char16_t"
-// CHECK-SAME: encoding: DW_ATE_UTF)
diff --git a/clang/test/CodeGenCXX/debug-info-class-limited-plugin.test b/clang/test/CodeGenCXX/debug-info-class-limited-plugin.test
deleted file mode 100644
index 17248d5..0000000
--- a/clang/test/CodeGenCXX/debug-info-class-limited-plugin.test
+++ /dev/null
@@ -1,2 +0,0 @@
-RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -o - -load %llvmshlibdir/PrintFunctionNames%pluginext -add-plugin print-fns %S/Inputs/debug-info-class-limited.cpp 2>&1 | FileCheck %S/Inputs/debug-info-class-limited.cpp
-REQUIRES: plugins, examples
diff --git a/clang/test/CodeGenCXX/debug-info-class-limited.test b/clang/test/CodeGenCXX/debug-info-class-limited.test
deleted file mode 100644
index c2e3328..0000000
--- a/clang/test/CodeGenCXX/debug-info-class-limited.test
+++ /dev/null
@@ -1 +0,0 @@
-RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %S/Inputs/debug-info-class-limited.cpp -o - | FileCheck %S/Inputs/debug-info-class-limited.cpp
diff --git a/clang/test/CodeGenCXX/debug-info-class-nolimit.cpp b/clang/test/CodeGenCXX/debug-info-class-nolimit.cpp
deleted file mode 100644
index b184b9e..0000000
--- a/clang/test/CodeGenCXX/debug-info-class-nolimit.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -debug-info-kind=standalone -o - -emit-llvm %s | FileCheck %s
-
-// We had a bug in -fstandalone-debug where UnicodeString would not be completed
-// when it was required to be complete. This originally manifested as an
-// assertion in CodeView emission on Windows with some dllexport stuff, but it's
-// more general than that.
-
-struct UnicodeString;
-UnicodeString *force_fwd_decl;
-struct UnicodeString {
-private:
- virtual ~UnicodeString();
-};
-struct UseCompleteType {
- UseCompleteType();
- ~UseCompleteType();
- UnicodeString currencySpcAfterSym[1];
-};
-UseCompleteType require_complete;
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "UnicodeString"
-// CHECK-NOT: DIFlagFwdDecl
-// CHECK-SAME: ){{$}}
-
-namespace rdar14101097_1 { // see also PR16214
-// Check that we emit debug info for the definition of a struct if the
-// definition is available, even if it's used via a pointer wrapped in a
-// typedef.
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"
-// CHECK-NOT: DIFlagFwdDecl
-// CHECK-SAME: ){{$}}
-struct foo {
-};
-
-typedef foo *foop;
-
-void bar() {
- foop f;
-}
-}
-
-namespace rdar14101097_2 {
-// As above, except trickier because we first encounter only a declaration of
-// the type and no debug-info related use after we see the definition of the
-// type.
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"
-// CHECK-NOT: DIFlagFwdDecl
-// CHECK-SAME: ){{$}}
-struct foo;
-void bar() {
- foo *f;
-}
-struct foo {
-};
-}
diff --git a/clang/test/CodeGenCXX/debug-info-class-optzns.cpp b/clang/test/CodeGenCXX/debug-info-class-optzns.cpp
deleted file mode 100644
index cf44570..0000000
--- a/clang/test/CodeGenCXX/debug-info-class-optzns.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-unknown_unknown -emit-llvm -debug-info-kind=limited %s -O1 -disable-llvm-passes -o - | FileCheck %s
-
-// Ensure class definitions are not emitted to debug info just because the
-// vtable is emitted for optimization purposes (as available_externally). The
-// class definition debug info should only go where the vtable is actually
-// emitted into the object file.
-
-// CHECK: @_ZTV3foo = available_externally
-
-// Verify that this doesn't involve querying for the vtable of types that aren't
-// dynamic (that would cause an assertion in the case below)
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "bar<int>"
-template <typename> struct bar {};
-extern template struct bar<int>;
-bar<int> *p1;
-bar<int> a;
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"
-// CHECK-SAME: DIFlagFwdDecl
-
-struct foo {
- virtual void f();
-};
-
-foo f;
diff --git a/clang/test/CodeGenCXX/debug-info-class.cpp b/clang/test/CodeGenCXX/debug-info-class.cpp
deleted file mode 100644
index aa24a63..0000000
--- a/clang/test/CodeGenCXX/debug-info-class.cpp
+++ /dev/null
@@ -1,208 +0,0 @@
-struct foo;
-void func(foo *f) {
-}
-class bar;
-void func(bar *f) {
-}
-union baz;
-void func(baz *f) {
-}
-
-class B {
-public:
- virtual ~B();
-};
-
-B::~B() { extern void mayThrow(); mayThrow();
-}
-
-struct C {
- static int s;
- virtual ~C();
-};
-
-C::~C() {
-}
-
-struct D {
- D();
- virtual ~D();
- void func() {
- }
-};
-
-struct E {
- E();
- virtual ~E();
- virtual void func() {
- }
-};
-
-struct F {
- struct inner {
- };
- static const int i = 2;
- virtual ~F();
-};
-
-struct G {
- virtual void func();
- struct inner {
- int j;
- };
-};
-
-struct H {};
-struct I : virtual H {};
-struct J : I {};
-J j;
-
-struct K {
- virtual void func() {
- }
-};
-
-struct A {
- int one;
- static const int HdrSize = 52;
- int two;
- A() {
- int x = 1;
- }
-};
-
-namespace {
-struct L {
- void func() {
- }
-};
-}
-
-void f1() {
- D x;
- x.func();
- E y;
- int i = F::i;
- F::inner z;
- K k;
- k.func();
- L l;
- l.func();
-}
-
-int main(int argc, char **argv) {
- B b;
- G::inner c_i;
- if (argc) {
- A a;
- }
- return 0;
-}
-
-// RUN: %clang_cc1 -triple x86_64-unknown_unknown -emit-llvm -debug-info-kind=limited -fexceptions -std=c++98 %s -o - | FileCheck -check-prefix=CHECK98 -check-prefix=CHECK -check-prefix=CHECKELF %s
-// RUN: %clang_cc1 -triple i686-cygwin -emit-llvm -debug-info-kind=limited -fexceptions -std=c++98 %s -o - | FileCheck -check-prefix=CHECK98 -check-prefix=CHECK -check-prefix=CHECKCOFF %s
-// RUN: %clang_cc1 -triple armv7l-unknown-linux-gnueabihf -emit-llvm -debug-info-kind=limited -fexceptions -std=c++98 %s -o - | FileCheck -check-prefix=CHECK98 -check-prefix=CHECK -check-prefix=CHECKELF %s
-// RUN: %clang_cc1 -triple x86_64-unknown_unknown -emit-llvm -debug-info-kind=limited -fexceptions -std=c++11 %s -o - | FileCheck -check-prefix=CHECK11 -check-prefix=CHECK -check-prefix=CHECKELF %s
-// RUN: %clang_cc1 -triple i686-cygwin -emit-llvm -debug-info-kind=limited -fexceptions -std=c++11 %s -o - | FileCheck -check-prefix=CHECK11 -check-prefix=CHECK -check-prefix=CHECKCOFF %s
-// RUN: %clang_cc1 -triple armv7l-unknown-linux-gnueabihf -emit-llvm -debug-info-kind=limited -fexceptions -std=c++11 %s -o - | FileCheck -check-prefix=CHECK11 -check-prefix=CHECK -check-prefix=CHECKELF %s
-
-// CHECK98: invoke {{.+}} @_ZN1BD1Ev(ptr {{[^,]*}} %b)
-// CHECK98-NEXT: unwind label %{{.+}}, !dbg ![[EXCEPTLOC:.*]]
-// CHECK11: call {{.+}} @_ZN1BD1Ev(ptr {{[^,]*}} %b){{.*}}, !dbg ![[EXCEPTLOC:.*]]
-
-// CHECK: store i32 0, ptr %{{.+}}, !dbg ![[RETLOC:.*]]
-
-// CHECK: [[F:![0-9]*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "F"
-// CHECK-SAME: DIFlagFwdDecl
-// CHECK-NOT: identifier:
-// CHECK-SAME: ){{$}}
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "I"
-// CHECK-NOT: DIFlagFwdDecl
-// CHECK-SAME: ){{$}}
-
-// CHECK: ![[INT:[0-9]+]] = !DIBasicType(name: "int"
-// CHECKCOFF: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"
-// CHECKCOFF: !DICompositeType(tag: DW_TAG_class_type, name: "bar"
-// CHECKCOFF: !DICompositeType(tag: DW_TAG_union_type, name: "baz"
-// CHECKCOFF: !DICompositeType(tag: DW_TAG_class_type, name: "B"
-// CHECKCOFF-NOT: DIFlagFwdDecl
-// CHECKCOFF-SAME: ){{$}}
-// CHECKCOFF: !DIDerivedType(tag: DW_TAG_member, name: "_vptr$B",
-// CHECKCOFF-SAME: DIFlagArtificial
-
-// CHECK: [[C:![0-9]*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "C",
-// CHECK-NOT: DIFlagFwdDecl
-// CHECK-SAME: elements: [[C_MEM:![0-9]*]]
-// CHECK-SAME: vtableHolder: [[C]]
-// CHECK-NOT: identifier:
-// CHECK-SAME: ){{$}}
-// CHECK: [[C_MEM]] = !{[[C_VPTR:![0-9]*]], [[C_S:![0-9]*]], [[C_DTOR:![0-9]*]]}
-// CHECK: [[C_VPTR]] = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$C"
-// CHECK-SAME: DIFlagArtificial
-// CHECK: [[C_S]] = !DIDerivedType(tag: DW_TAG_member, name: "s"
-// CHECK-SAME: baseType: ![[INT]]
-// CHECK-SAME: DIFlagStaticMember
-// CHECK: [[C_DTOR]] = !DISubprogram(name: "~C"
-
-// CHECKELF: !DICompositeType(tag: DW_TAG_structure_type, name: "K"
-// CHECKELF-SAME: identifier: "_ZTS1K"
-// CHECKELF-SAME: ){{$}}
-
-// CHECKELF: !DICompositeType(tag: DW_TAG_class_type, name: "B"
-// CHECKELF-NOT: DIFlagFwdDecl
-// CHECKELF-SAME: ){{$}}
-// CHECKELF: !DIDerivedType(tag: DW_TAG_member, name: "_vptr$B",
-// CHECKELF-SAME: DIFlagArtificial
-
-// CHECKELF: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"
-// CHECKELF: !DICompositeType(tag: DW_TAG_class_type, name: "bar"
-// CHECKELF: !DICompositeType(tag: DW_TAG_union_type, name: "baz"
-
-// CHECK: [[D:![0-9]+]] = !DICompositeType(tag: DW_TAG_structure_type, name: "D"
-// CHECK-SAME: size:
-// CHECK-SAME: DIFlagFwdDecl
-// CHECK-NOT: identifier:
-// CHECK-SAME: ){{$}}
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "E"
-// CHECK-SAME: DIFlagFwdDecl
-// CHECK-NOT: identifier:
-// CHECK-SAME: ){{$}}
-
-// CHECKCOFF: !DICompositeType(tag: DW_TAG_structure_type, name: "K"
-// CHECKCOFF-SAME: identifier: "_ZTS1K"
-// CHECKCOFF-SAME: ){{$}}
-
-// CHECK: [[L:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "L"
-// CHECK-SAME: ){{$}}
-// CHECK: [[L_FUNC_DECL:![0-9]*]] = !DISubprogram(name: "func",{{.*}} scope: [[L]]
-// CHECK-SAME: DISPFlagLocalToUnit
-
-// CHECK: !DISubprogram(name: "func",{{.*}} scope: [[D]]
-// CHECK-SAME: DISPFlagDefinition
-// CHECK-SAME: declaration: [[D_FUNC_DECL:![0-9]*]]
-// CHECK: [[D_FUNC_DECL]] = !DISubprogram(name: "func",{{.*}} scope: [[D]]
-
-// CHECK: !DISubprogram(name: "func",{{.*}} scope: [[L]]
-// CHECK-SAME: DISPFlagLocalToUnit | DISPFlagDefinition
-// CHECK-SAME: declaration: [[L_FUNC_DECL]]
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "inner",{{.*}} line: 50
-// CHECK-NOT: DIFlagFwdDecl
-// CHECK-SAME: elements: [[G_INNER_MEM:![0-9]*]]
-// CHECK-SAME: identifier: "_ZTSN1G5innerE"
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "G"
-// CHECK-SAME: DIFlagFwdDecl
-// CHECK-NOT: identifier:
-// CHECK-SAME: ){{$}}
-// CHECK: [[G_INNER_MEM]] = !{[[G_INNER_I:![0-9]*]]}
-// CHECK: [[G_INNER_I]] = !DIDerivedType(tag: DW_TAG_member, name: "j"
-// CHECK-SAME: baseType: ![[INT]]
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "A"
-// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "HdrSize"
-
-// CHECK: ![[EXCEPTLOC]] = !DILocation(line: 100,
-// CHECK: ![[RETLOC]] = !DILocation(line: 99,
diff --git a/clang/test/CodeGenCXX/debug-info-codeview-display-name.cpp b/clang/test/CodeGenCXX/debug-info-codeview-display-name.cpp
deleted file mode 100644
index 8200a65..0000000
--- a/clang/test/CodeGenCXX/debug-info-codeview-display-name.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-// RUN: %clang_cc1 -fblocks -debug-info-kind=limited -gcodeview -emit-llvm %s \
-// RUN: -o - -triple=x86_64-pc-win32 -Wno-new-returns-null -std=c++98 | \
-// RUN: grep -E 'DISubprogram|DICompositeType' | sed -e 's/.*name: "\(ptr\)".*/"\1"/' | \
-// RUN: FileCheck %s --check-prefixes=CHECK,UNQUAL
-// RUN: %clang_cc1 -fblocks -debug-info-kind=line-tables-only -gcodeview -emit-llvm %s \
-// RUN: -o - -triple=x86_64-pc-win32 -Wno-new-returns-null -std=c++98 | \
-// RUN: grep 'DISubprogram' | sed -e 's/.*name: "\(ptr\)".*/"\1"/' | \
-// RUN: FileCheck %s
-// RUN: %clang_cc1 -fblocks -debug-info-kind=limited -gcodeview -emit-llvm %s \
-// RUN: -o - -triple=x86_64-pc-win32 -Wno-new-returns-null -std=c++11 | \
-// RUN: grep -E 'DISubprogram|DICompositeType' | sed -e 's/.*name: "\(ptr\)".*/"\1"/' | \
-// RUN: FileCheck %s --check-prefixes=CHECK,UNQUAL
-// RUN: %clang_cc1 -fblocks -debug-info-kind=limited -gcodeview -emit-llvm %s \
-// RUN: -o - -triple=x86_64-pc-win32 -Wno-new-returns-null | \
-// RUN: grep -E 'DISubprogram|DICompositeType' | sed -e 's/.*name: "\(ptr\)".*/"\1"/' | \
-// RUN: FileCheck %s --check-prefixes=CHECK,UNQUAL
-
-void freefunc() { }
-// CHECK-DAG: "freefunc"
-
-namespace N {
- int b() { return 0; }
-// CHECK-DAG: "b"
- namespace { void func() { } }
-// CHECK-DAG: "func"
-}
-
-void _c(void) {
- N::func();
-}
-// CHECK-DAG: "_c"
-
-struct foo {
- int operator+(int);
- foo(){}
-// CHECK-DAG: "foo"
-
- ~foo(){}
-// CHECK-DAG: "~foo"
-
- foo(int i){}
-// CHECK-DAG: "foo"
-
- foo(char *q){}
-// CHECK-DAG: "foo"
-
- static foo* static_method() { return 0; }
-// CHECK-DAG: "static_method"
-
-};
-
-void use_foo() {
- foo f1, f2(1), f3((char*)0);
- foo::static_method();
-}
-
-// CHECK-DAG: "operator+"
-int foo::operator+(int a) { return a; }
-
-// PR17371
-struct OverloadedNewDelete {
- // __cdecl
- void *operator new(__SIZE_TYPE__);
- void *operator new[](__SIZE_TYPE__);
- void operator delete(void *);
- void operator delete[](void *);
- // __thiscall
- int operator+(int);
-};
-
-void *OverloadedNewDelete::operator new(__SIZE_TYPE__ s) { return 0; }
-void *OverloadedNewDelete::operator new[](__SIZE_TYPE__ s) { return 0; }
-void OverloadedNewDelete::operator delete(void *) { }
-void OverloadedNewDelete::operator delete[](void *) { }
-int OverloadedNewDelete::operator+(int x) { return x; };
-
-// CHECK-DAG: "operator new"
-// CHECK-DAG: "operator new[]"
-// CHECK-DAG: "operator delete"
-// CHECK-DAG: "operator delete[]"
-// CHECK-DAG: "operator+"
-
-template <typename T, void (*)(void)>
-void fn_tmpl() {}
-
-template void fn_tmpl<int, freefunc>();
-// CHECK-DAG: "fn_tmpl<int,&freefunc>"
-
-template <typename T, void (*)(void)>
-void fn_tmpl_typecheck() {}
-
-template void fn_tmpl_typecheck<int, &freefunc>();
-// CHECK-DAG: "fn_tmpl_typecheck<int,&freefunc>"
-
-template <typename A, typename B, typename C> struct ClassTemplate { A a; B b; C c; };
-ClassTemplate<char, short, ClassTemplate<int, int, int> > f;
-// This will only show up in normal debug builds. The space in `> >` is
-// important for compatibility with Windows debuggers, so it should always be
-// there when generating CodeView.
-// UNQUAL-DAG: "ClassTemplate<char,short,ClassTemplate<int,int,int> >"
diff --git a/clang/test/CodeGenCXX/debug-info-codeview-heapallocsite.cpp b/clang/test/CodeGenCXX/debug-info-codeview-heapallocsite.cpp
deleted file mode 100644
index 6468b9f..0000000
--- a/clang/test/CodeGenCXX/debug-info-codeview-heapallocsite.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// RUN: %clang_cc1 -fexceptions -triple x86_64-windows-msvc -debug-info-kind=limited -gcodeview -fdeclspec -emit-llvm %s -o - | FileCheck %s
-
-struct Foo {
- int x;
-};
-struct Bar {
- int y;
-};
-extern Foo *gv_foo;
-extern Bar *gv_bar;
-extern "C" void doit() {
- gv_foo = new Foo();
- gv_bar = new Bar();
-}
-
-// CHECK-LABEL: define {{.*}}void @doit
-// CHECK: call {{.*}} ptr {{.*}}@"??2@YAPEAX_K@Z"(i64 noundef 4) {{.*}} !heapallocsite [[DBG_FOO:!.*]]
-// CHECK: call {{.*}} ptr {{.*}}@"??2@YAPEAX_K@Z"(i64 noundef 4) {{.*}} !heapallocsite [[DBG_BAR:!.*]]
-
-extern "C" void useinvoke() {
- struct HasDtor {
- ~HasDtor() { delete gv_foo; }
- } o;
- gv_foo = new Foo();
-}
-
-// CHECK-LABEL: define {{.*}}void @useinvoke
-// CHECK: invoke {{.*}} ptr {{.*}}@"??2@YAPEAX_K@Z"(i64 noundef 4)
-// CHECK-NEXT: to label {{.*}} unwind label {{.*}} !heapallocsite [[DBG_FOO]]
-
-// CHECK: [[DBG_FOO]] = distinct !DICompositeType(tag: DW_TAG_structure_type,
-// CHECK-SAME: name: "Foo"
-// CHECK: [[DBG_BAR]] = distinct !DICompositeType(tag: DW_TAG_structure_type,
-// CHECK-SAME: name: "Bar"
-
-// a new expression in a default arg has caused crashes in the past, add here to test that edge case
-void foo(int *a = new int) {}
-void bar() { foo(); }
diff --git a/clang/test/CodeGenCXX/debug-info-codeview-injected-class.cpp b/clang/test/CodeGenCXX/debug-info-codeview-injected-class.cpp
deleted file mode 100644
index b421b2b..0000000
--- a/clang/test/CodeGenCXX/debug-info-codeview-injected-class.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// RUN: %clang_cc1 %s -std=c++11 -triple=i686-pc-windows-msvc -debug-info-kind=limited -gcodeview -emit-llvm -o - | FileCheck %s
-
-// The injected class names in this test were accidentally making it into our
-// nested class record debug info. Make sure they don't appear there.
-
-// PR28790
-
-struct A {
- const char *m_fn1();
- template <typename> class B;
- template <typename> class C;
- template <typename FunctionIdT> class C<B<FunctionIdT>>;
-};
-const char *A::m_fn1() { return nullptr; }
-
-// CHECK: ![[A:[^ ]*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A",
-// CHECK-SAME: elements: ![[elements:[0-9]+]]
-
-// CHECK: ![[elements]] = !{![[m_fn1:[0-9]+]]}
-
-// CHECK: ![[m_fn1]] = !DISubprogram(name: "m_fn1",
diff --git a/clang/test/CodeGenCXX/debug-info-codeview-nested-types.cpp b/clang/test/CodeGenCXX/debug-info-codeview-nested-types.cpp
deleted file mode 100644
index 8caf177..0000000
--- a/clang/test/CodeGenCXX/debug-info-codeview-nested-types.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-// RUN: %clang_cc1 %s -std=c++11 -triple=x86_64-pc-windows-msvc -debug-info-kind=limited -gcodeview -emit-llvm -o - | FileCheck %s
-
-struct HasNested {
- enum InnerEnum { _BUF_SIZE = 1 };
- typedef int InnerTypedef;
- enum { InnerEnumerator = 2 };
- struct InnerStruct { };
-
- union { int i1; };
- union { int i2; } unnamed_union;
- struct { int i3; };
- struct { int i4; } unnamed_struct;
-};
-HasNested f;
-
-// CHECK: ![[INNERENUM:[0-9]+]] = !DICompositeType(tag: DW_TAG_enumeration_type, name: "InnerEnum", {{.*}})
-// CHECK: ![[HASNESTED:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "HasNested",
-// CHECK-SAME: elements: ![[MEMBERS:[0-9]+]],
-//
-// CHECK: ![[MEMBERS]] = !{![[INNERENUM]], ![[INNERTYPEDEF:[0-9]+]], ![[UNNAMEDENUM:[0-9]+]], ![[INNERSTRUCT:[0-9]+]], ![[ANONYMOUS_UNION:[0-9]+]], ![[UNNAMED_UNION_TYPE:[0-9]+]], ![[UNNAMED_UNION:[0-9]+]], ![[ANONYMOUS_STRUCT:[0-9]+]], ![[UNNAMED_STRUCT_TYPE:[0-9]+]], ![[UNNAMED_STRUCT:[0-9]+]]}
-//
-// CHECK: ![[INNERTYPEDEF]] = !DIDerivedType(tag: DW_TAG_typedef, name: "InnerTypedef", scope: ![[HASNESTED]]{{.*}})
-//
-// CHECK: ![[UNNAMEDENUM]] = !DICompositeType(tag: DW_TAG_enumeration_type, scope: ![[HASNESTED]],
-// CHECK-SAME: elements: ![[UNNAMEDMEMBERS:[0-9]+]],
-// CHECK: ![[UNNAMEDMEMBERS]] = !{![[INNERENUMERATOR:[0-9]+]]}
-// CHECK: ![[INNERENUMERATOR]] = !DIEnumerator(name: "InnerEnumerator", value: 2)
-//
-// CHECK: ![[INNERSTRUCT]] = !DICompositeType(tag: DW_TAG_structure_type, name: "InnerStruct"
-// CHECK-SAME: flags: DIFlagFwdDecl
-
-// CHECK: ![[ANONYMOUS_UNION]] = !DIDerivedType(tag: DW_TAG_member,
-// CHECK-SAME: baseType: ![[ANONYMOUS_UNION_TYPE:[0-9]+]]
-// CHECK: ![[ANONYMOUS_UNION_TYPE]] = distinct !DICompositeType(tag: DW_TAG_union_type,
-// CHECK-SAME: elements: ![[ANONYMOUS_UNION_MEMBERS:[0-9]+]], identifier: ".?AT<unnamed-type-$S1>@HasNested@@")
-// CHECK: ![[ANONYMOUS_UNION_MEMBERS]] = !{![[ANONYMOUS_UNION_MEMBER:[0-9]+]]}
-// CHECK: ![[ANONYMOUS_UNION_MEMBER]] = !DIDerivedType(tag: DW_TAG_member, name: "i1"
-
-// CHECK: ![[UNNAMED_UNION_TYPE]] = distinct !DICompositeType(tag: DW_TAG_union_type, name: "<unnamed-type-unnamed_union>"
-// CHECK-SAME: elements: ![[UNNAMED_UNION_MEMBERS:[0-9]+]], identifier: ".?AT<unnamed-type-unnamed_union>@HasNested@@")
-// CHECK: ![[UNNAMED_UNION_MEMBERS]] = !{![[UNNAMED_UNION_MEMBER:[0-9]+]]}
-// CHECK: ![[UNNAMED_UNION_MEMBER]] = !DIDerivedType(tag: DW_TAG_member, name: "i2"
-// CHECK: ![[UNNAMED_UNION]] = !DIDerivedType(tag: DW_TAG_member, name: "unnamed_union"
-// CHECK-SAME: baseType: ![[UNNAMED_UNION_TYPE]]
-
-// CHECK: ![[ANONYMOUS_STRUCT]] = !DIDerivedType(tag: DW_TAG_member
-// CHECK-SAME: baseType: ![[ANONYMOUS_STRUCT_TYPE:[0-9]+]]
-// CHECK: ![[ANONYMOUS_STRUCT_TYPE]] = distinct !DICompositeType(tag: DW_TAG_structure_type
-// CHECK-SAME: elements: ![[ANONYMOUS_STRUCT_MEMBERS:[0-9]+]], identifier: ".?AU<unnamed-type-$S2>@HasNested@@")
-// CHECK: ![[ANONYMOUS_STRUCT_MEMBERS]] = !{![[ANONYMOUS_STRUCT_MEMBER:[0-9]+]]}
-// CHECK: ![[ANONYMOUS_STRUCT_MEMBER]] = !DIDerivedType(tag: DW_TAG_member, name: "i3"
-
-// CHECK: ![[UNNAMED_STRUCT_TYPE]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "<unnamed-type-unnamed_struct>"
-// CHECK-SAME: elements: ![[UNNAMED_STRUCT_MEMBERS:[0-9]+]], identifier: ".?AU<unnamed-type-unnamed_struct>@HasNested@@")
-// CHECK: ![[UNNAMED_STRUCT_MEMBERS]] = !{![[UNNAMED_STRUCT_MEMBER:[0-9]+]]}
-// CHECK: ![[UNNAMED_STRUCT_MEMBER]] = !DIDerivedType(tag: DW_TAG_member, name: "i4"
-// CHECK: ![[UNNAMED_STRUCT]] = !DIDerivedType(tag: DW_TAG_member, name: "unnamed_struct"
-// CHECK-SAME: baseType: ![[UNNAMED_STRUCT_TYPE]]
diff --git a/clang/test/CodeGenCXX/debug-info-codeview-nodebug.cpp b/clang/test/CodeGenCXX/debug-info-codeview-nodebug.cpp
deleted file mode 100644
index c57133d..0000000
--- a/clang/test/CodeGenCXX/debug-info-codeview-nodebug.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// RUN: %clang_cc1 -DSETNODEBUG=0 -gcodeview -emit-llvm -std=c++14 -debug-info-kind=limited %s -o - | FileCheck %s --check-prefix=YESINFO
-// RUN: %clang_cc1 -DSETNODEBUG=1 -gcodeview -emit-llvm -std=c++14 -debug-info-kind=limited %s -o - | FileCheck %s --check-prefix=NOINFO
-
-#if SETNODEBUG
-#define NODEBUG __attribute__((nodebug))
-#else
-#define NODEBUG
-#endif
-
-struct t1 {
- using t2 NODEBUG = void;
-};
-void func6() {
- t1 v1;
-}
-// YESINFO-DAG: !DIDerivedType(tag: DW_TAG_typedef, name: "t2"
-// NOINFO: [[ELEMENTS:!.*]] = !{}
-// NOINFO: !DICompositeType(tag: DW_TAG_structure_type, name: "t1", {{.*}}, elements: [[ELEMENTS]],
-// NOINFO-NOT: !DIDerivedType(tag: DW_TAG_typedef, name: "t2"
-
diff --git a/clang/test/CodeGenCXX/debug-info-codeview-template-literal.cpp b/clang/test/CodeGenCXX/debug-info-codeview-template-literal.cpp
deleted file mode 100644
index 49827f7..0000000
--- a/clang/test/CodeGenCXX/debug-info-codeview-template-literal.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %clang -g -std=c++2a -target x86_64-windows-msvc -Wno-gnu-string-literal-operator-template %s -S -emit-llvm -o - | FileCheck %s
-
-template <typename T, T... cs> struct check;
-template <typename T, T... str> int operator""_x() {
- return 1;
-}
-
-int b = u8"\"тест_𐀀"_x;
-// CHECK: _x<char8_t,34,209,130,208,181,209,129,209,130,95,240,144,128,128>
diff --git a/clang/test/CodeGenCXX/debug-info-codeview-template-type.cpp b/clang/test/CodeGenCXX/debug-info-codeview-template-type.cpp
deleted file mode 100644
index be37190..0000000
--- a/clang/test/CodeGenCXX/debug-info-codeview-template-type.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %clang -std=c++11 -g -target x86_64-windows-msvc -S -emit-llvm -o - %s | FileCheck %s
-
-template <unsigned N>
-void foo() {
-}
-
-void instantiate_foo() {
- foo<10>();
- // CHECK: foo<10>
- foo<true>();
- // CHECK: foo<1>
-}
diff --git a/clang/test/CodeGenCXX/debug-info-codeview-unnamed.cpp b/clang/test/CodeGenCXX/debug-info-codeview-unnamed.cpp
deleted file mode 100644
index 30815bd..0000000
--- a/clang/test/CodeGenCXX/debug-info-codeview-unnamed.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -debug-info-kind=limited -emit-llvm -std=c++11 -o - %s | FileCheck --check-prefix LINUX %s
-// RUN: %clang_cc1 -triple x86_64-windows-msvc -debug-info-kind=limited -gcodeview -emit-llvm -std=c++11 -o - %s | FileCheck --check-prefix MSVC %s
-// RUN: %clang_cc1 -triple x86_64-uefi -debug-info-kind=limited -gcodeview -emit-llvm -std=c++11 -o - %s | FileCheck --check-prefix MSVC %s
-
-int main(int argc, char* argv[], char* arge[]) {
- //
- // In CodeView, the LF_MFUNCTION entry for "bar()" refers to the forward
- // reference of the unnamed struct. Visual Studio requires a unique
- // identifier to match the LF_STRUCTURE forward reference to the definition.
- //
- struct { void bar() {} } one;
- //
- // LINUX: !{{[0-9]+}} = !DILocalVariable(name: "one"
- // LINUX-SAME: type: [[TYPE_OF_ONE:![0-9]+]]
- // LINUX-SAME: )
- // LINUX: [[TYPE_OF_ONE]] = distinct !DICompositeType(
- // LINUX-SAME: tag: DW_TAG_structure_type
- // LINUX-NOT: name:
- // LINUX-NOT: identifier:
- // LINUX-SAME: )
- //
- // MSVC: !{{[0-9]+}} = !DILocalVariable(name: "one"
- // MSVC-SAME: type: [[TYPE_OF_ONE:![0-9]+]]
- // MSVC-SAME: )
- // MSVC: [[TYPE_OF_ONE]] = distinct !DICompositeType
- // MSVC-SAME: tag: DW_TAG_structure_type
- // MSVC-SAME: name: "<unnamed-type-one>"
- // MSVC-SAME: identifier: ".?AU<unnamed-type-one>@?1??main@@9@"
- // MSVC-SAME: )
-
-
- // In CodeView, the LF_POINTER entry for "ptr2unnamed" refers to the forward
- // reference of the unnamed struct. Visual Studio requires a unique
- // identifier to match the LF_STRUCTURE forward reference to the definition.
- //
- struct { int bar; } two = { 42 };
- int decltype(two)::*ptr2unnamed = &decltype(two)::bar;
- //
- // LINUX: !{{[0-9]+}} = !DILocalVariable(name: "two"
- // LINUX-SAME: type: [[TYPE_OF_TWO:![0-9]+]]
- // LINUX-SAME: )
- // LINUX: [[TYPE_OF_TWO]] = distinct !DICompositeType(
- // LINUX-SAME: tag: DW_TAG_structure_type
- // LINUX-NOT: name:
- // LINUX-NOT: identifier:
- // LINUX-SAME: )
- //
- // MSVC: !{{[0-9]+}} = !DILocalVariable(name: "two"
- // MSVC-SAME: type: [[TYPE_OF_TWO:![0-9]+]]
- // MSVC-SAME: )
- // MSVC: [[TYPE_OF_TWO]] = distinct !DICompositeType
- // MSVC-SAME: tag: DW_TAG_structure_type
- // MSVC-SAME: name: "<unnamed-type-two>"
- // MSVC-SAME: identifier: ".?AU<unnamed-type-two>@?2??main@@9@"
- // MSVC-SAME: )
-
-
- // In DWARF, named structures which are not externally visibile do not
- // require an identifier. In CodeView, named structures are given an
- // identifier.
- //
- struct named { int bar; int named::* p2mem; } three = { 42, &named::bar };
- //
- // LINUX: !{{[0-9]+}} = !DILocalVariable(name: "three"
- // LINUX-SAME: type: [[TYPE_OF_THREE:![0-9]+]]
- // LINUX-SAME: )
- // LINUX: [[TYPE_OF_THREE]] = distinct !DICompositeType(
- // LINUX-SAME: tag: DW_TAG_structure_type
- // LINUX-SAME: name: "named"
- // LINUX-NOT: identifier:
- // LINUX-SAME: )
- //
- // MSVC: !{{[0-9]+}} = !DILocalVariable(name: "three"
- // MSVC-SAME: type: [[TYPE_OF_THREE:![0-9]+]]
- // MSVC-SAME: )
- // MSVC: [[TYPE_OF_THREE]] = distinct !DICompositeType
- // MSVC-SAME: tag: DW_TAG_structure_type
- // MSVC-SAME: name: "named"
- // MSVC-SAME: identifier: ".?AUnamed@?1??main@@9@"
- // MSVC-SAME: )
-
-
- // In CodeView, the LF_MFUNCTION entry for the lambda "operator()" routine
- // refers to the forward reference of the unnamed LF_CLASS for the lambda.
- // Visual Studio requires a unique identifier to match the forward reference
- // of the LF_CLASS to its definition.
- //
- auto four = [argc](int i) -> int { return argc == i ? 1 : 0; };
- //
- // LINUX: !{{[0-9]+}} = !DILocalVariable(name: "four"
- // LINUX-SAME: type: [[TYPE_OF_FOUR:![0-9]+]]
- // LINUX-SAME: )
- // LINUX: [[TYPE_OF_FOUR]] = distinct !DICompositeType(
- // LINUX-SAME: tag: DW_TAG_class_type
- // LINUX-NOT: name:
- // LINUX-NOT: identifier:
- // LINUX-SAME: )
- //
- // MSVC: !{{[0-9]+}} = !DILocalVariable(name: "four"
- // MSVC-SAME: type: [[TYPE_OF_FOUR:![0-9]+]]
- // MSVC-SAME: )
- // MSVC: [[TYPE_OF_FOUR]] = distinct !DICompositeType
- // MSVC-SAME: tag: DW_TAG_class_type
- // MSVC-SAME: name: "<lambda_0>"
- // MSVC-SAME: identifier: ".?AV<lambda_0>@?0??main@@9@"
- // MSVC-SAME: )
-
- return 0;
-}
diff --git a/clang/test/CodeGenCXX/debug-info-codeview-var-templates.cpp b/clang/test/CodeGenCXX/debug-info-codeview-var-templates.cpp
deleted file mode 100644
index dec4c01..0000000
--- a/clang/test/CodeGenCXX/debug-info-codeview-var-templates.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-// RUN: %clang_cc1 %s -std=c++14 -triple=i686-pc-windows-msvc -debug-info-kind=limited -gcodeview -emit-llvm -o - | FileCheck %s
-
-// Don't emit static data member debug info for variable templates.
-// PR38004
-
-struct TestImplicit {
- template <typename T>
- static const __SIZE_TYPE__ size_var = sizeof(T);
-};
-int instantiate_test1() { return TestImplicit::size_var<int> + TestImplicit::size_var<TestImplicit>; }
-TestImplicit gv1;
-
-// CHECK: ![[A:[^ ]*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "TestImplicit",
-
-template <typename T> bool vtpl;
-struct TestSpecialization {
- template <typename T, typename U> static const auto sdm = vtpl<T>;
- template <> static const auto sdm<int, int> = false;
-} gv2;
-
-// CHECK: ![[A:[^ ]*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "TestSpecialization",
-
-template <class> bool a;
-template <typename> struct b;
-struct TestPartial {
- template <typename... e> static auto d = a<e...>;
- template <typename... e> static auto d<b<e...>> = d<e...>;
-} c;
-
-// CHECK: ![[A:[^ ]*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "TestPartial",
diff --git a/clang/test/CodeGenCXX/debug-info-coff.cpp b/clang/test/CodeGenCXX/debug-info-coff.cpp
deleted file mode 100644
index 2535c5c..0000000
--- a/clang/test/CodeGenCXX/debug-info-coff.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-// REQUIRES: x86-registered-target
-
-// Check that CodeView compiler version is emitted even when debug info is otherwise disabled.
-
-// RUN: %clang --target=i686-pc-windows-msvc -S -emit-llvm %s -o - | FileCheck --check-prefix=IR %s
-// IR: !llvm.dbg.cu = !{!0}
-// IR: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "{{.*}}", isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, splitDebugInlining: false, nameTableKind: None)
-
-// RUN: %clang --target=i686-pc-windows-msvc -c %s -o %t.o
-// RUN: llvm-readobj --codeview %t.o | FileCheck %s
-// CHECK: CodeViewDebugInfo [
-// CHECK-NEXT: Section: .debug$S (4)
-// CHECK-NEXT: Magic: 0x4
-// CHECK-NEXT: Subsection [
-// CHECK-NEXT: SubSectionType: Symbols (0xF1)
-// CHECK-NEXT: SubSectionSize:
-// CHECK-NEXT: ObjNameSym {
-// CHECK-NEXT: Kind: S_OBJNAME (0x1101)
-// CHECK-NEXT: Signature: 0x0
-// CHECK-NEXT: ObjectName:
-// CHECK-NEXT: }
-// CHECK-NEXT: Compile3Sym {
-// CHECK-NEXT: Kind: S_COMPILE3 (0x113C)
-// CHECK-NEXT: Language: Cpp (0x1)
-// CHECK-NEXT: Flags [ (0x0)
-// CHECK-NEXT: ]
-// CHECK-NEXT: Machine: Pentium3 (0x7)
-// CHECK-NEXT: FrontendVersion:
-// CHECK-NEXT: BackendVersion:
-// CHECK-NEXT: VersionName: {{.*}}clang version
-// CHECK-NEXT: }
-// CHECK-NEXT: ]
-// CHECK-NEXT: ]
-
-int main() {
- return 0;
-}
diff --git a/clang/test/CodeGenCXX/debug-info-composite-cc.cpp b/clang/test/CodeGenCXX/debug-info-composite-cc.cpp
deleted file mode 100644
index d4d4046..0000000
--- a/clang/test/CodeGenCXX/debug-info-composite-cc.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -triple %itanium_abi_triple %s -o - | FileCheck %s
-
-// Not trivially copyable because of the explicit destructor.
-// CHECK-DAG: !DICompositeType({{.*}}, name: "RefDtor",{{.*}}flags: DIFlagTypePassByReference
-struct RefDtor {
- int i;
- ~RefDtor() {}
-} refDtor;
-
-// Not trivially copyable because of the explicit copy constructor.
-// CHECK-DAG: !DICompositeType({{.*}}, name: "RefCopy",{{.*}}flags: DIFlagTypePassByReference
-struct RefCopy {
- int i;
- RefCopy() = default;
- RefCopy(RefCopy &Copy) {}
-} refCopy;
-
-// POD-like type even though it defines a destructor.
-// CHECK-DAG: !DICompositeType({{.*}}, name: "Podlike", {{.*}}flags: DIFlagTypePassByValue
-struct Podlike {
- int i;
- Podlike() = default;
- Podlike(Podlike &&Move) = default;
- ~Podlike() = default;
-} podlike;
-
-
-// This is a POD type.
-// CHECK-DAG: !DICompositeType({{.*}}, name: "Pod",{{.*}}flags: DIFlagTypePassByValue
-struct Pod {
- int i;
-} pod;
-
-// This is definitely not a POD type.
-// CHECK-DAG: !DICompositeType({{.*}}, name: "Complex",{{.*}}flags: DIFlagTypePassByReference
-struct Complex {
- Complex() {}
- Complex(Complex &Copy) : i(Copy.i) {};
- int i;
-} complex;
-
-// This type is manually marked as trivial_abi.
-// CHECK-DAG: !DICompositeType({{.*}}, name: "Marked",{{.*}}flags: DIFlagTypePassByValue
-struct __attribute__((trivial_abi)) Marked {
- int *p;
- Marked();
- ~Marked();
- Marked(const Marked &) noexcept;
- Marked &operator=(const Marked &);
-} marked;
diff --git a/clang/test/CodeGenCXX/debug-info-composite-triviality-fwd-decl.cpp b/clang/test/CodeGenCXX/debug-info-composite-triviality-fwd-decl.cpp
deleted file mode 100644
index 812e3ed..0000000
--- a/clang/test/CodeGenCXX/debug-info-composite-triviality-fwd-decl.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -gcodeview -debug-info-kind=limited -x c %s -o - | FileCheck %s --check-prefix CHECK-C
-// RUN: %clang_cc1 -emit-llvm -gcodeview -debug-info-kind=limited -x c++ %s -o - | FileCheck %s --check-prefix CHECK-CXX
-//
-// Test for DIFlagNonTrivial on forward declared DICompositeTypes.
-
-struct Incomplete;
-struct Incomplete (*func_ptr)(void) = 0;
-// CHECK-C: !DICompositeType({{.*}}name: "Incomplete"
-// CHECK-C-NOT: DIFlagNonTrivial
-// CHECK-CXX: !DICompositeType({{.*}}name: "Incomplete"
-// CHECK-CXX-SAME: DIFlagNonTrivial
diff --git a/clang/test/CodeGenCXX/debug-info-composite-triviality.cpp b/clang/test/CodeGenCXX/debug-info-composite-triviality.cpp
deleted file mode 100644
index 962b827..0000000
--- a/clang/test/CodeGenCXX/debug-info-composite-triviality.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -triple %itanium_abi_triple %s -o - | FileCheck %s
-
-// Cases to show some non-trivial types with flags combined with DIFlagNonTrivial and DIFlagTypePassByValue.
-
-// CHECK-DAG: !DICompositeType({{.*}}, name: "Explicit",{{.*}}flags: DIFlagTypePassByValue | DIFlagNonTrivial
-struct Explicit {
- explicit Explicit();
- int a;
-} Explicit;
-
-// CHECK-DAG: !DICompositeType({{.*}}, name: "Struct",{{.*}}flags: DIFlagTypePassByValue | DIFlagNonTrivial
-struct Struct {
- Struct() {}
-} Struct;
-
-// CHECK-DAG: !DICompositeType({{.*}}, name: "Annotated",{{.*}}flags: DIFlagTypePassByValue | DIFlagNonTrivial
-struct __attribute__((trivial_abi)) Annotated {
- Annotated() {};
-} Annotated;
-
-
-// Check a non-composite type
-// CHECK-DAG: !DIGlobalVariable(name: "GlobalVar", {{.*}}type: {{.*}}, isLocal: false, isDefinition: true)
-int GlobalVar = 0;
-
-// Cases to test composite type's triviality
-
-// CHECK-DAG: {{.*}}!DIGlobalVariable(name: "Union",
-// CHECK-DAG-NEXT: {{^((?!\bDIFlagNonTrivial\b).)*$}}
-union Union {
- int a;
-} Union;
-
-// CHECK-DAG: {{.*}}!DIGlobalVariable(name: "Trivial",
-// CHECK-DAG-NEXT: {{^((?!\bDIFlagNonTrivial\b).)*$}}
-struct Trivial {
- int i;
-} Trivial;
-
-// CHECK-DAG: {{.*}}!DIGlobalVariable(name: "TrivialA",
-// CHECK-DAG-NEXT: {{^((?!\bDIFlagNonTrivial\b).)*$}}
-struct TrivialA {
- TrivialA() = default;
-} TrivialA;
-
-// CHECK-DAG: {{.*}}!DIGlobalVariable(name: "TrivialB",
-// CHECK-DAG-NEXT: {{^((?!\bDIFlagNonTrivial\b).)*$}}
-struct TrivialB {
- int m;
- TrivialB(int x) { m = x; }
- TrivialB() = default;
-} TrivialB;
-
-// CHECK-DAG: {{.*}}!DIGlobalVariable(name: "TrivialC",
-// CHECK-DAG-NEXT: {{^((?!\bDIFlagNonTrivial\b).)*$}}
-struct TrivialC {
- struct Trivial x;
-} TrivialC;
-
-// CHECK-DAG: {{.*}}!DIGlobalVariable(name: "TrivialD",
-// CHECK-DAG-NEXT: {{^((?!\bDIFlagNonTrivial\b).)*$}}
-struct NT {
- NT() {};
-};
-struct TrivialD {
- static struct NT x; // Member is non-trivial but is static.
-} TrivialD;
-
-
-// CHECK-DAG: !DICompositeType({{.*}}, name: "NonTrivial",{{.*}}flags: {{.*}}DIFlagNonTrivial
-struct NonTrivial {
- NonTrivial() {}
-} NonTrivial;
-
-// CHECK-DAG: !DICompositeType({{.*}}, name: "NonTrivialA",{{.*}}flags: {{.*}}DIFlagNonTrivial
-struct NonTrivialA {
- ~NonTrivialA();
-} NonTrivialA;
-
-// CHECK-DAG: !DICompositeType({{.*}}, name: "NonTrivialB",{{.*}}flags: {{.*}}DIFlagNonTrivial
-struct NonTrivialB {
- struct NonTrivial x;
-} NonTrivialB;
-
-// CHECK-DAG: !DICompositeType({{.*}}, name: "NonTrivialC",{{.*}}flags: {{.*}}DIFlagNonTrivial
-struct NonTrivialC {
- virtual void f() {}
-} NonTrivialC;
-
-// CHECK-DAG: !DICompositeType({{.*}}, name: "NonTrivialD",{{.*}}flags: {{.*}}DIFlagNonTrivial
-struct NonTrivialD : NonTrivial {
-} NonTrivialD;
-
-// CHECK-DAG: !DICompositeType({{.*}}, name: "NonTrivialE",{{.*}}flags: {{.*}}DIFlagNonTrivial
-struct NonTrivialE : Trivial, NonTrivial {
-} NonTrivialE;
diff --git a/clang/test/CodeGenCXX/debug-info-context.cpp b/clang/test/CodeGenCXX/debug-info-context.cpp
deleted file mode 100644
index 1f7fa04..0000000
--- a/clang/test/CodeGenCXX/debug-info-context.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
-// PR11345
-
-class locale {
-private:
- void _M_add_reference() const throw() {
- }
-};
-class ios_base {
- locale _M_ios_locale;
-public:
- class Init {
- };
-};
-static ios_base::Init __ioinit;
-
-// CHECK-NOT: _M_ios_locale
diff --git a/clang/test/CodeGenCXX/debug-info-ctor-homing-flag.cpp b/clang/test/CodeGenCXX/debug-info-ctor-homing-flag.cpp
deleted file mode 100644
index 4398fa3..0000000
--- a/clang/test/CodeGenCXX/debug-info-ctor-homing-flag.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-// RUN: %clang_cc1 -debug-info-kind=constructor -emit-llvm %s -o - \
-// RUN: | FileCheck %s -check-prefix=CTOR_HOMING
-// RUN: %clang_cc1 -debug-info-kind=limited -fuse-ctor-homing -emit-llvm %s -o - \
-// RUN: | FileCheck %s -check-prefix=CTOR_HOMING
-// RUN: %clang_cc1 -debug-info-kind=standalone -fuse-ctor-homing -emit-llvm %s -o - \
-// RUN: | FileCheck %s -check-prefix=FULL_DEBUG
-// RUN: %clang_cc1 -debug-info-kind=line-tables-only -fuse-ctor-homing -emit-llvm %s -o - \
-// RUN: | FileCheck %s -check-prefix=NO_DEBUG
-// RUN: %clang_cc1 -fuse-ctor-homing -emit-llvm %s -o - \
-// RUN: | FileCheck %s -check-prefix=NO_DEBUG
-//
-// RUN: %clang_cc1 -debug-info-kind=constructor -fno-use-ctor-homing \
-// RUN: -emit-llvm %s -o - | FileCheck %s -check-prefix=FULL_DEBUG
-
-// This tests that the -fuse-ctor-homing is only used if limited debug info would have
-// been used otherwise.
-
-// CTOR_HOMING: !DICompositeType(tag: DW_TAG_structure_type, name: "A"{{.*}}flags: DIFlagFwdDecl
-// FULL_DEBUG: !DICompositeType(tag: DW_TAG_structure_type, name: "A"{{.*}}DIFlagTypePassByValue
-// NO_DEBUG-NOT: !DICompositeType(tag: DW_TAG_structure_type, name: "A"
-struct A {
- A();
-} TestA;
diff --git a/clang/test/CodeGenCXX/debug-info-ctor.cpp b/clang/test/CodeGenCXX/debug-info-ctor.cpp
deleted file mode 100644
index 16bc54d..0000000
--- a/clang/test/CodeGenCXX/debug-info-ctor.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %clang -emit-llvm -g -S %s -o - | FileCheck %s
-
-struct X {
- X(int v);
-
- int value;
-};
-
-X::X(int v) {
- // CHECK_TEMPORARILY_DISABLED: call void @_ZN1XC2Ei(ptr %this1, i32 %tmp), !dbg
- // TEMPORARY CHECK: X
- value = v;
-}
-
diff --git a/clang/test/CodeGenCXX/debug-info-ctor2.cpp b/clang/test/CodeGenCXX/debug-info-ctor2.cpp
deleted file mode 100644
index 95b0608..0000000
--- a/clang/test/CodeGenCXX/debug-info-ctor2.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-// FIXME: Check IR rather than asm, then triple is not needed.
-// RUN: %clang --target=%itanium_abi_triple -fverbose-asm -g -S %s -o - | grep AT_explicit
-
-
-class MyClass
-{
-public:
- explicit MyClass (int i) :
- m_i (i)
- {}
-private:
- int m_i;
-};
-
-MyClass m(1);
-
diff --git a/clang/test/CodeGenCXX/debug-info-cxx0x.cpp b/clang/test/CodeGenCXX/debug-info-cxx0x.cpp
deleted file mode 100644
index c21a0bb..0000000
--- a/clang/test/CodeGenCXX/debug-info-cxx0x.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm-only -std=c++11 -debug-info-kind=limited %s
-
-namespace PR9414 {
- int f() {
- auto x = 0;
- return x;
- }
-}
-
-// Don't crash.
-namespace PR13570 {
- template<typename T, typename U> struct P {};
- template<typename T> struct A {
- template<typename U> static P<T,U> isa(U);
- decltype(isa(int())) f() { return {}; }
- };
- template struct A<int>;
-}
diff --git a/clang/test/CodeGenCXX/debug-info-cxx1y.cpp b/clang/test/CodeGenCXX/debug-info-cxx1y.cpp
deleted file mode 100644
index 012eb38..0000000
--- a/clang/test/CodeGenCXX/debug-info-cxx1y.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// RUN: %clang_cc1 -triple %itanium_abi_triple-only -std=c++14 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
-
-// CHECK: imports: [[IMPS:![0-9]*]]
-
-// CHECK: [[IMPS]] = !{[[IMP:![0-9]*]]}
-// CHECK: [[IMP]] = !DIImportedEntity(
-// CHECK-SAME: entity: [[F3:![0-9]*]]
-// CHECK: [[F3]] = distinct !DISubprogram(name: "f3"
-// CHECK-SAME: type: [[SUBROUTINE_TYPE:![0-9]*]]
-// CHECK: [[SUBROUTINE_TYPE]] = !DISubroutineType(types: [[TYPE_LIST:![0-9]*]])
-// CHECK: [[TYPE_LIST]] = !{[[INT:![0-9]*]]}
-// CHECK: [[INT]] = !DIBasicType(name: "int"
-
-// CHECK: [[FOO:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "foo",
-// CHECK-SAME: elements: [[EMPTY:![0-9]*]]
-// CHECK: [[EMPTY]] = !{}
-
-// FIXME: The context of this definition should be the CU/file scope, not the class.
-// CHECK: !DISubprogram(name: "func", {{.*}} scope: [[FOO]]
-// CHECK-SAME: type: [[SUBROUTINE_TYPE]]
-// CHECK-SAME: DISPFlagDefinition
-// CHECK-SAME: declaration: [[FUNC_DECL:![0-9]*]]
-// CHECK: [[FUNC_DECL]] = !DISubprogram(name: "func",
-// CHECK-SAME: scope: [[FOO]]
-// CHECK-SAME: type: [[SUBROUTINE_TYPE]]
-// CHECK-SAME: spFlags: 0
-
-struct foo {
- static auto func();
-};
-
-foo f;
-
-auto foo::func() {
- return 1;
-}
-
-namespace ns {
-auto f2();
-auto f3() {
- return 0;
-}
-}
-using ns::f2;
-using ns::f3;
diff --git a/clang/test/CodeGenCXX/debug-info-decl-nested.cpp b/clang/test/CodeGenCXX/debug-info-decl-nested.cpp
deleted file mode 100644
index 8d89f41..0000000
--- a/clang/test/CodeGenCXX/debug-info-decl-nested.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-// RUN: %clang_cc1 -std=c++11 -debug-info-kind=standalone -emit-llvm -triple x86_64-apple-darwin %s -o %t
-// RUN: cat %t | FileCheck %s -check-prefix=CHECK0
-// RUN: cat %t | FileCheck %s -check-prefix=CHECK1
-// RUN: cat %t | FileCheck %s -check-prefix=CHECK2
-//
-// This test ensures that we associate a declaration with the
-// definition of the constructor for OuterClass. The declaration is
-// necessary so the backend can emit the DW_AT_specification attribute
-// for the definition.
-
-class Foo;
-class OuterClass
-{
- static class InnerClass {
- public:
- InnerClass(); // Here createContextChain() generates a limited type for OuterClass.
- } theInnerClass;
-// CHECK0: ![[DECL:[0-9]+]] = !DISubprogram(name: "OuterClass"
-// CHECK0-SAME: line: [[@LINE+2]]
-// CHECK0-SAME: spFlags: 0
- OuterClass(const Foo *); // line 10
-};
-OuterClass::InnerClass OuterClass::theInnerClass; // This toplevel decl causes InnerClass to be generated.
-// CHECK0: !DISubprogram(name: "OuterClass"
-// CHECK0-SAME: line: [[@LINE+3]]
-// CHECK0-SAME: DISPFlagDefinition
-// CHECK0-SAME: declaration: ![[DECL]]
-OuterClass::OuterClass(const Foo *meta) { } // line 13
-
-
-
-
-
-
-class Foo1;
-class OuterClass1
-{
- static class InnerClass1 {
- public:
- InnerClass1();
- } theInnerClass1;
-// CHECK1: ![[DECL:[0-9]+]] = !DISubprogram(name: "Bar"
-// CHECK1-SAME: line: [[@LINE+2]]
-// CHECK1-SAME: spFlags: 0
- void Bar(const Foo1 *);
-};
-OuterClass1::InnerClass1 OuterClass1::theInnerClass1;
-// CHECK1: !DISubprogram(name: "Bar"
-// CHECK1-SAME: line: [[@LINE+3]]
-// CHECK1-SAME: DISPFlagDefinition
-// CHECK1-SAME: declaration: ![[DECL]]
-void OuterClass1::Bar(const Foo1 *meta) { }
-
-
-
-
-
-class Foo2;
-class OuterClass2
-{
- static class InnerClass2 {
- public:
- InnerClass2();
- } theInnerClass2;
-// CHECK2: ![[DECL:[0-9]+]] = !DISubprogram(name: "~OuterClass2"
-// CHECK2-SAME: line: [[@LINE+2]]
-// CHECK2-SAME: spFlags: 0
- ~OuterClass2(); // line 10
-};
-OuterClass2::InnerClass2 OuterClass2::theInnerClass2;
-// CHECK4: !DISubprogram(name: "~OuterClass2"
-// CHECK4-SAME: line: [[@LINE+3]]
-// CHECK4-SAME: DISPFlagDefinition
-// CHECK4-SAME: declaration: ![[DECL]]
-OuterClass2::~OuterClass2() { }
diff --git a/clang/test/CodeGenCXX/debug-info-deleted.cpp b/clang/test/CodeGenCXX/debug-info-deleted.cpp
deleted file mode 100644
index 564f7ff..0000000
--- a/clang/test/CodeGenCXX/debug-info-deleted.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-// Test for debug info for C++11 deleted member functions
-
-//Supported: -O0, standalone DI
-// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu %s -o - \
-// RUN: -O0 -disable-llvm-passes \
-// RUN: -debug-info-kind=standalone \
-// RUN: | FileCheck %s -check-prefix=ATTR
-
-// ATTR: DISubprogram(name: "deleted", {{.*}}, flags: DIFlagPublic | DIFlagPrototyped,
-// ATTR: DISubprogram(name: "deleted", {{.*}}, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagDeleted
-// ATTR: DISubprogram(name: "operator=", linkageName: "_ZN7deletedaSERKS_", {{.*}}, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagDeleted
-// ATTR: DISubprogram(name: "deleted", {{.*}}, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagDeleted
-// ATTR: DISubprogram(name: "operator=", linkageName: "_ZN7deletedaSEOS_", {{.*}}, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagDeleted
-// ATTR: DISubprogram(name: "func", {{.*}}, flags: DIFlagPublic | DIFlagPrototyped | DIFlagRValueReference, spFlags: DISPFlagDeleted
-// ATTR: DISubprogram(name: "bar", {{.*}}, flags: DIFlagPublic | DIFlagPrototyped | DIFlagStaticMember, spFlags: DISPFlagDeleted
-// ATTR: DISubprogram(name: "~deleted", {{.*}}, flags: DIFlagPublic | DIFlagPrototyped,
-class deleted {
-public:
- // Defaulted on purpose, so as to facilitate object creation
- deleted() = default;
-
- deleted(const deleted &) = delete;
- deleted &operator=(const deleted &) = delete;
-
- deleted(deleted &&) = delete;
- deleted &operator=(deleted &&) = delete;
-
- void func() && = delete;
- static int bar() = delete;
-
- ~deleted() = default;
-};
-
-void foo() {
- deleted obj1;
-}
diff --git a/clang/test/CodeGenCXX/debug-info-destroy-helper.cpp b/clang/test/CodeGenCXX/debug-info-destroy-helper.cpp
deleted file mode 100644
index d685e61..0000000
--- a/clang/test/CodeGenCXX/debug-info-destroy-helper.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-windows-msvc -gcodeview -debug-info-kind=limited -o - | FileCheck %s
-
-struct b {
- b(char *);
- ~b();
-};
-struct a {
- ~a();
-};
-struct {
- b c;
- const a &d;
-} e[]{nullptr, {}};
-
-// CHECK: define internal void @__cxx_global_array_dtor(ptr noundef %0)
-// CHECK-SAME: !dbg ![[SUBPROGRAM:[0-9]+]] {
-// CHECK: arraydestroy.body
-// CHECK: %arraydestroy.elementPast =
-// CHECK-SAME: !dbg ![[LOCATION:[0-9]+]]
-// CHECK: call void @"??1<unnamed-type-e>@@QEAA@XZ"(ptr {{[^,]*}} %arraydestroy.element)
-// CHECK-SAME: !dbg ![[LOCATION]]
-// CHECK: ![[SUBPROGRAM]] = distinct !DISubprogram(name: "__cxx_global_array_dtor"
-// CHECK-SAME: flags: DIFlagArtificial
-// CHECK: ![[LOCATION]] = !DILocation(line: 0,
diff --git a/clang/test/CodeGenCXX/debug-info-determinism.cpp b/clang/test/CodeGenCXX/debug-info-determinism.cpp
deleted file mode 100644
index c0a70a0..0000000
--- a/clang/test/CodeGenCXX/debug-info-determinism.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -o %t1.ll %s
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -o %t2.ll %s
-// RUN: diff %t1.ll %t2.ll
-
-template <int N> struct C {
- template <int M> int f() {
- int arr[M] = {};
- return arr[M/2] + C<M/2>().template f<M-1>();
- }
-};
-template <> template <> int C<0>::f<0>() { return 0; }
-template <> template <> int C<0>::f<1>() { return 0; }
-template <> template <> int C<1>::f<0>() { return 0; }
-template <> template <> int C<1>::f<1>() { return 0; }
-
-int x = C<0>().f<64>();
diff --git a/clang/test/CodeGenCXX/debug-info-dllimport-base-class.cpp b/clang/test/CodeGenCXX/debug-info-dllimport-base-class.cpp
deleted file mode 100644
index 855ecaa..0000000
--- a/clang/test/CodeGenCXX/debug-info-dllimport-base-class.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// RUN: %clang_cc1 -triple i386-pc-windows -emit-llvm -gcodeview -debug-info-kind=limited -fms-compatibility %s -x c++ -o - | FileCheck %s
-
-// Ensure we emit debug info for the full definition of base classes that will
-// be imported from a DLL. Otherwise, the debugger wouldn't be able to show the
-// members.
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "ImportedAfterCompletion",
-// CHECK-NOT: DIFlagFwdDecl
-// CHECK-SAME: ){{$}}
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "OutOfLineCtor",
-// CHECK-SAME: DIFlagFwdDecl
-// CHECK-SAME: ){{$}}
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "ImportedBase",
-// CHECK-NOT: DIFlagFwdDecl
-// CHECK-SAME: ){{$}}
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "ImportedMethod",
-// CHECK-NOT: DIFlagFwdDecl
-// CHECK-SAME: ){{$}}
-
-
-struct ImportedAfterCompletion;
-ImportedAfterCompletion *force_fwd_decl;
-struct __declspec(dllimport) ImportedAfterCompletion {
- virtual ~ImportedAfterCompletion();
-};
-
-struct OutOfLineCtor {
- OutOfLineCtor();
- virtual void Foo();
-};
-
-struct __declspec(dllimport) ImportedBase {
- ImportedBase();
- virtual void Foo();
-};
-
-struct DerivedFromImported : public ImportedBase {};
-
-struct ImportedMethod {
- ImportedMethod();
- virtual void Foo();
- static void __declspec(dllimport) create();
-};
-
-int main() {
- ImportedAfterCompletion c;
- OutOfLineCtor o;
- DerivedFromImported d;
- ImportedMethod m;
-}
diff --git a/clang/test/CodeGenCXX/debug-info-dtor-implicit-args.cpp b/clang/test/CodeGenCXX/debug-info-dtor-implicit-args.cpp
deleted file mode 100644
index 4bb51dc..0000000
--- a/clang/test/CodeGenCXX/debug-info-dtor-implicit-args.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
-// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -emit-llvm -debug-info-kind=limited %s -o - | FileCheck --check-prefix MSVC %s
-
-struct B {
- virtual ~B() {}
-};
-
-struct A : virtual B {
-};
-
-A a;
-
-
-// CHECK-DAG: !{{[0-9]+}} = !DILocalVariable(name: "vtt", arg: 2, scope: ![[destructor:[0-9]+]], type: ![[vtttype:[0-9]+]], flags: DIFlagArtificial)
-// CHECK-DAG: ![[destructor]] = distinct !DISubprogram(name: "~A", {{.*}}, type: ![[subroutinetype:[0-9]+]]
-// CHECK-DAG: ![[subroutinetype]] = !DISubroutineType(types: ![[types:[0-9]+]])
-// CHECK-DAG: [[types]] = !{null, !{{[0-9]+}}, ![[vtttype]]}
-
-// MSVC-DAG: ![[inttype:[0-9]+]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-// MSVC-DAG: ![[voidpointertype:[0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
-// MSVC-DAG: ![[destructor:[0-9]+]] = distinct !DISubprogram(name: "~A", linkageName: "??_GA@@UEAAPEAXI@Z", {{.*}}, type: ![[subroutinetype:[0-9]+]]
-// MSVC-DAG: !{{[0-9]+}} = !DILocalVariable(name: "should_call_delete", arg: 2, scope: ![[destructor]], type: ![[inttype]], flags: DIFlagArtificial)
-// MSVC-DAG: ![[subroutinetype]] = !DISubroutineType(types: ![[types:[0-9]+]])
-// MSVC-DAG: [[types]] = !{![[voidpointertype]], !{{[0-9]+}}, ![[inttype]]}
diff --git a/clang/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp b/clang/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp
deleted file mode 100644
index 3b23ebf..0000000
--- a/clang/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -triple x86_64-apple-darwin %s -o - | FileCheck %s
-
-class Test
-{
-public:
- Test () : reserved (new data()) {}
-
- unsigned
- getID() const
- {
- return reserved->objectID;
- }
-protected:
- struct data {
- unsigned objectID;
- };
- data* reserved;
-};
-
-Test t;
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "data"
-// CHECK: !DIDerivedType(tag: DW_TAG_pointer_type
-// CHECK-NOT: !DICompositeType(tag: DW_TAG_structure_type, name: "data"
diff --git a/clang/test/CodeGenCXX/debug-info-enum-class.cpp b/clang/test/CodeGenCXX/debug-info-enum-class.cpp
deleted file mode 100644
index 4860894..0000000
--- a/clang/test/CodeGenCXX/debug-info-enum-class.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin -std=c++11 %s -o - | FileCheck %s
-
-enum class A { A1=1 }; // underlying type is int by default
-enum class B: unsigned long { B1=1 }; // underlying type is unsigned long
-enum C { C1 = 1 };
-enum D : short; // enum forward declaration
-enum Z : int;
-A a;
-B b;
-C c;
-D d;
-
-// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "A"
-// CHECK-SAME: line: 3
-// CHECK-SAME: baseType: ![[INT:[0-9]+]]
-// CHECK-SAME: size: 32
-// CHECK-NOT: offset:
-// CHECK-SAME: flags: DIFlagEnumClass
-// CHECK-SAME: ){{$}}
-// CHECK: ![[INT]] = !DIBasicType(name: "int"
-// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "B"
-// CHECK-SAME: line: 4
-// CHECK-SAME: baseType: ![[ULONG:[0-9]+]]
-// CHECK-SAME: size: 64
-// CHECK-NOT: offset:
-// CHECK-SAME: flags: DIFlagEnumClass
-// CHECK-SAME: ){{$}}
-// CHECK: ![[ULONG]] = !DIBasicType(name: "unsigned long"
-// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "C"
-// CHECK-SAME: line: 5
-// CHECK-SAME: baseType: ![[ULONG:[0-9]+]]
-// CHECK-SAME: size: 32
-// CHECK-NOT: offset:
-// CHECK-NOT: flags:
-// CHECK-SAME: ){{$}}
-
-namespace PR14029 {
- // Make sure this doesn't crash/assert.
- template <typename T> struct Test {
- enum class Tag {
- test = 0
- };
- Test() {
- auto t = Tag::test;
- }
- Tag tag() const { return static_cast<Tag>(1); }
- };
- Test<int> t;
-}
-
-namespace test2 {
-// FIXME: this should just be a declaration under -fno-standalone-debug
-// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E"
-// CHECK-SAME: scope: [[TEST2:![0-9]+]]
-// CHECK-NOT: DIFlagEnumClass
-// CHECK-SAME: elements: [[TEST_ENUMS:![0-9]+]]
-// CHECK-SAME: identifier: "_ZTSN5test21EE"
-// CHECK: [[TEST2]] = !DINamespace(name: "test2"
-// CHECK: [[TEST_ENUMS]] = !{[[TEST_E:![0-9]*]]}
-// CHECK: [[TEST_E]] = !DIEnumerator(name: "e", value: 0)
-enum E : int;
-void func(E *) {
-}
-enum E : int { e };
-}
-
-namespace test3 {
-// FIXME: this should just be a declaration under -fno-standalone-debug
-// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E"
-// CHECK-SAME: scope: [[TEST3:![0-9]+]]
-// CHECK-NOT: DIFlagEnumClass
-// CHECK-SAME: elements: [[TEST_ENUMS]]
-// CHECK-SAME: identifier: "_ZTSN5test31EE"
-// CHECK: [[TEST3]] = !DINamespace(name: "test3"
-enum E : int { e };
-void func(E *) {
-}
-}
-
-namespace test4 {
-// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E"
-// CHECK-SAME: scope: [[TEST4:![0-9]+]]
-// CHECK-NOT: DIFlagEnumClass
-// CHECK-SAME: elements: [[TEST_ENUMS]]
-// CHECK-SAME: identifier: "_ZTSN5test41EE"
-// CHECK: [[TEST4]] = !DINamespace(name: "test4"
-enum E : int;
-void f1(E *) {
-}
-enum E : int { e };
-void f2(E) {
-}
-}
-
-// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "D"
-// CHECK-SAME: line: 6
-// CHECK-SAME: size: 16
-// CHECK-NOT: offset:
-// CHECK-SAME: flags: DIFlagFwdDecl
-
-// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "Z"
-// CHECK-NOT: scope:
-// CHECK-SAME: flags: DIFlagFwdDecl
-void fz() { Z z; }
-
-namespace test5 {
-// CHECK: [[TEST5:![0-9]+]] = !DINamespace(name: "test5"
-// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "E"
-// CHECK-SAME: scope: [[TEST5]]
-// CHECK-SAME: flags: DIFlagFwdDecl
-// CHECK-SAME: identifier: "_ZTSN5test51EE"
-enum E : int;
-void f1(E *) {
-}
-}
-
-namespace test6 {
-// Ensure typedef'd enums aren't manifest by debug info generation.
-// This could cause "typedef changes linkage of anonymous type, but linkage was
-// already computed" errors.
-// CHECK-NOT: test6
-typedef enum {
-} E;
-}
diff --git a/clang/test/CodeGenCXX/debug-info-enum-i128.cpp b/clang/test/CodeGenCXX/debug-info-enum-i128.cpp
deleted file mode 100644
index 22aaf03..0000000
--- a/clang/test/CodeGenCXX/debug-info-enum-i128.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// FIXME: llvm.org/pr51221, the APSInt leaks
-// RUN: export LSAN_OPTIONS=detect_leaks=0
-
-// RUN: %clang_cc1 %s -triple x86_64-windows-msvc -gcodeview -debug-info-kind=limited -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 %s -triple x86_64-linux-gnu -debug-info-kind=limited -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 %s -triple powerpc64-ibm-aix-xcoff -debug-info-kind=limited -emit-llvm -o - | FileCheck %s
-
-
-enum class uns : __uint128_t { unsval = __uint128_t(1) << 64 };
-uns t1() { return uns::unsval; }
-
-enum class sig : __int128 { sigval = -(__int128(1) << 64) };
-sig t2() { return sig::sigval; }
-
-
-// CHECK-LABEL: !DICompositeType(tag: DW_TAG_enumeration_type, name: "uns", {{.*}})
-// CHECK: !DIEnumerator(name: "unsval", value: 18446744073709551616, isUnsigned: true)
-
-// CHECK-LABEL: !DICompositeType(tag: DW_TAG_enumeration_type, name: "sig", {{.*}})
-// CHECK: !DIEnumerator(name: "sigval", value: -18446744073709551616)
diff --git a/clang/test/CodeGenCXX/debug-info-enum-metadata-collision.cpp b/clang/test/CodeGenCXX/debug-info-enum-metadata-collision.cpp
deleted file mode 100644
index dd27acd..0000000
--- a/clang/test/CodeGenCXX/debug-info-enum-metadata-collision.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -debug-info-kind=constructor %s -o - | FileCheck %s
-
-// Test that clang doesn't crash while resolving temporary debug metadata of
-// a record with collisions in the record's enum users.
-
-// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type,
-// CHECK-SAME: scope: [[SCOPE:![0-9]+]]
-// CHECK-SAME: elements: [[ELEMENTS:![0-9]+]]
-// CHECK: [[SCOPE]] = !DICompositeType(tag: DW_TAG_structure_type
-// CHECK-SAME: name: "Struct1<Struct3>"
-// CHECK: [[ELEMENTS]] = !{[[ELEMENT:![0-9]+]]}
-// CHECK: [[ELEMENT]] = !DIEnumerator(name: "enumValue1"
-
-template <typename> struct Struct1 {
- enum { enumValue1 };
- Struct1();
-};
-void function2() {
- struct Struct3 {};
- int i = Struct1<Struct3>::enumValue1;
-}
-void function3() {
- struct Struct3 {};
- int i = Struct1<Struct3>::enumValue1;
-}
diff --git a/clang/test/CodeGenCXX/debug-info-enum.cpp b/clang/test/CodeGenCXX/debug-info-enum.cpp
deleted file mode 100644
index 48162b5..0000000
--- a/clang/test/CodeGenCXX/debug-info-enum.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
-// RUN: %clang_cc1 -triple x86_64-windows-msvc -emit-llvm -gcodeview -debug-info-kind=limited %s -o - | FileCheck --check-prefix MSVC %s
-
-// CHECK: !DICompileUnit(
-// CHECK-SAME: enums: [[ENUMS:![0-9]*]]
-// CHECK: [[ENUMS]] = !{[[E1:![0-9]*]], [[E2:![0-9]*]], [[E3:![0-9]*]]}
-
-// In MSVC check that used enum values are emitted as globals.
-// MSVC: !DICompileUnit(
-// MSVC-SAME: globals: [[GLOBALS:![0-9]*]]
-// MSVC: [[GLOBALS]] = !{[[G1:![0-9]*]], [[G2:![0-9]*]]}
-
-namespace test1 {
-// CHECK: [[E1]] = !DICompositeType(tag: DW_TAG_enumeration_type, name: "e"
-// CHECK-SAME: scope: [[TEST1:![0-9]*]]
-// CHECK-SAME: elements: [[TEST1_ENUMS:![0-9]*]]
-// CHECK-SAME: identifier: "_ZTSN5test11eE"
-// CHECK: [[TEST1]] = !DINamespace(name: "test1"
-// CHECK: [[TEST1_ENUMS]] = !{[[TEST1_E:![0-9]*]]}
-// CHECK: [[TEST1_E]] = !DIEnumerator(name: "E", value: 0, isUnsigned: true)
-
-// MSVC: [[G1]] = !DIGlobalVariableExpression(var: [[VAR1:![0-9]*]],
-// MSVC-SAME: expr: !DIExpression(DW_OP_constu, 0
-// MSVC: [[VAR1]] = distinct !DIGlobalVariable(name: "E"
-enum e { E };
-void foo() {
- int v = E;
-}
-}
-
-namespace test2 {
-// CHECK: [[E2]] = !DICompositeType(tag: DW_TAG_enumeration_type, name: "e"
-// CHECK-SAME: scope: [[TEST2:![0-9]+]]
-// CHECK-SAME: elements: [[TEST1_ENUMS]]
-// CHECK-SAME: identifier: "_ZTSN5test21eE"
-// CHECK: [[TEST2]] = !DINamespace(name: "test2"
-
-// MSVC: [[G2]] = !DIGlobalVariableExpression(var: [[VAR2:![0-9]*]],
-// MSVC-SAME: expr: !DIExpression(DW_OP_constu, 0
-// MSVC: [[VAR2]] = distinct !DIGlobalVariable(name: "E"
-enum e { E };
-bool func(int i) {
- return i == E;
-}
-}
-
-namespace test3 {
-// CHECK: [[E3]] = !DICompositeType(tag: DW_TAG_enumeration_type, name: "e"
-// CHECK-SAME: scope: [[TEST3:![0-9]*]]
-// CHECK-SAME: elements: [[TEST3_ENUMS:![0-9]*]]
-// CHECK-SAME: identifier: "_ZTSN5test31eE"
-// CHECK: [[TEST3]] = !DINamespace(name: "test3"
-// CHECK: [[TEST3_ENUMS]] = !{[[TEST3_E:![0-9]*]]}
-// CHECK: [[TEST3_E]] = !DIEnumerator(name: "E", value: -1)
-enum e { E = -1 };
-void func() {
- e x;
-}
-}
-
-namespace test4 {
-// Don't try to build debug info for a dependent enum.
-// CHECK-NOT: test4
-template <typename T>
-struct S {
- enum e { E = T::v };
-};
-}
diff --git a/clang/test/CodeGenCXX/debug-info-explicit-cast.cpp b/clang/test/CodeGenCXX/debug-info-explicit-cast.cpp
deleted file mode 100644
index 028a776..0000000
--- a/clang/test/CodeGenCXX/debug-info-explicit-cast.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-// RUN: %clangxx -c -target %itanium_abi_triple -g %s -emit-llvm -S -o - | FileCheck %s
-// RUN: %clangxx -c -target %ms_abi_triple -g %s -emit-llvm -S -o - | FileCheck %s
-
-struct Foo {
- int A;
- Foo() : A(1){};
-};
-
-struct Bar {
- int B;
- Bar() : B(2){};
-};
-
-struct Baz {
- int C;
- Baz() : C(3){};
-};
-
-struct Qux {
- int d() { return 4; }
- Qux() {};
-};
-
-struct Quux {
- int E;
- Quux() : E(5){};
-};
-
-typedef int(Qux::*TD)();
-typedef int(Qux::*TD1)();
-int Val = reinterpret_cast<Baz *>(0)->C;
-int main() {
- Bar *PB = new Bar;
- TD d = &Qux::d;
- (void)reinterpret_cast<TD1>(d);
-
- return reinterpret_cast<Foo *>(PB)->A + reinterpret_cast<Quux *>(0)->E;
-}
-
-// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "Foo",
-// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "Bar",
-// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "Baz",
-// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "Qux",
-// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "Quux",
-// CHECK-DAG: !DIDerivedType(tag: DW_TAG_typedef, name: "TD",
-// CHECK-DAG: !DIDerivedType(tag: DW_TAG_typedef, name: "TD1",
diff --git a/clang/test/CodeGenCXX/debug-info-explicit-this.cpp b/clang/test/CodeGenCXX/debug-info-explicit-this.cpp
deleted file mode 100644
index 45ab2a0..0000000
--- a/clang/test/CodeGenCXX/debug-info-explicit-this.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -std=c++2b %s -o - | FileCheck %s
-
-struct Foo {
- void Bar(this Foo&& self) {}
-};
-
-void fn() {
- Foo{}.Bar();
-}
-
-// CHECK: distinct !DISubprogram(name: "Bar", {{.*}}, type: ![[BAR_TYPE:[0-9]+]], {{.*}}, declaration: ![[BAR_DECL:[0-9]+]], {{.*}}
-// CHECK: ![[FOO:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Foo"
-// CHECK: ![[BAR_DECL]] = !DISubprogram(name: "Bar", {{.*}}, type: ![[BAR_TYPE]], {{.*}},
-// CHECK: ![[BAR_TYPE]] = !DISubroutineType(types: ![[PARAMS:[0-9]+]])
-// CHECK: ![[PARAMS]] = !{null, ![[SELF:[0-9]+]]}
-// CHECK: ![[SELF]] = !DIDerivedType(tag: DW_TAG_rvalue_reference_type, baseType: ![[FOO]]
diff --git a/clang/test/CodeGenCXX/debug-info-export_symbols.cpp b/clang/test/CodeGenCXX/debug-info-export_symbols.cpp
deleted file mode 100644
index 19697be..0000000
--- a/clang/test/CodeGenCXX/debug-info-export_symbols.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -triple %itanium_abi_triple %s -o - | FileCheck %s
-
-// CHECK: [[SCOPE:![0-9]+]] = distinct !DICompositeType({{.*}}flags: DIFlagTypePassByValue
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, scope: [[SCOPE]]
-// CHECK-SAME: DIFlagExportSymbols | DIFlagTypePassByValue
-struct A {
- // Anonymous class exports its symbols into A
- struct {
- int y;
- };
-} a;
diff --git a/clang/test/CodeGenCXX/debug-info-fn-template.cpp b/clang/test/CodeGenCXX/debug-info-fn-template.cpp
deleted file mode 100644
index 2aed4be..0000000
--- a/clang/test/CodeGenCXX/debug-info-fn-template.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-// RUN: %clang -emit-llvm -g -S %s -o - | FileCheck %s
-
-template<typename T>
-struct XF {
- T member;
-};
-
-template<typename T>
-T fx(XF<T> xi) {
- return xi.member;
-}
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "XF<int>"
-// CHECK: !DITemplateTypeParameter(name: "T"
-template int fx(XF<int>);
diff --git a/clang/test/CodeGenCXX/debug-info-friend.cpp b/clang/test/CodeGenCXX/debug-info-friend.cpp
deleted file mode 100644
index b103b14..0000000
--- a/clang/test/CodeGenCXX/debug-info-friend.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// RUN: %clang -emit-llvm -S -g %s -o - | FileCheck %s
-
-class MyFriend;
-
-class SomeClass {
- friend class MyFriend;
- typedef int SomeType;
-};
-
-SomeClass *x;
-
-struct MyFriend {
- static void func(SomeClass::SomeType) {
- }
-};
-
-// Emitting debug info for friends unnecessarily bloats debug info without any
-// known benefit or debugger feature that requires it. Re-enable this is a
-// use-case appears.
-// CHECK-NOT: DW_TAG_friend
diff --git a/clang/test/CodeGenCXX/debug-info-function-context.cpp b/clang/test/CodeGenCXX/debug-info-function-context.cpp
deleted file mode 100644
index 29c87b6..0000000
--- a/clang/test/CodeGenCXX/debug-info-function-context.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-pc-linux-gnu %s -fdebug-compilation-dir=%S \
-// RUN: -dwarf-version=5 -main-file-name debug-info-function-context.cpp -o - | FileCheck %s
-
-struct C {
- void member_function();
- static int static_member_function();
- static int static_member_variable;
-};
-
-int C::static_member_variable = 0;
-
-void C::member_function() { static_member_variable = 0; }
-
-int C::static_member_function() { return static_member_variable; }
-
-C global_variable;
-
-int global_function() { return -1; }
-
-namespace ns {
-void global_namespace_function() { global_variable.member_function(); }
-int global_namespace_variable = 1;
-}
-
-// Generate the artificial global functions to initialize a global.
-int global_initialized_variable = C::static_member_function();
-
-// Check that the functions that belong to C have C as a context and the
-// functions that belong to the namespace have it as a context, and the global
-// functions (user-defined and artificial) have the file as a context.
-
-// The first DIFile is for the CU, the second is what everything else uses.
-// We're using DWARF v5 so both should have MD5 checksums.
-// CHECK: !DIFile(filename: "{{.*}}context.cpp",{{.*}} checksumkind: CSK_MD5, checksum: [[CKSUM:".*"]]
-// CHECK: ![[FILE:[0-9]+]] = !DIFile(filename: "{{.*}}context.cpp",{{.*}} checksumkind: CSK_MD5, checksum: [[CKSUM]]
-// CHECK: ![[C:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "C",
-// CHECK: ![[NS:.*]] = !DINamespace(name: "ns"
-// CHECK: !DISubprogram(name: "member_function",{{.*}} scope: ![[C]],{{.*}} DISPFlagDefinition
-
-// CHECK: !DISubprogram(name: "static_member_function",{{.*}} scope: ![[C]],{{.*}} DISPFlagDefinition
-
-// CHECK: !DISubprogram(name: "global_function",{{.*}} scope: ![[FILE]],{{.*}} DISPFlagDefinition
-
-// CHECK: !DISubprogram(name: "global_namespace_function",{{.*}} scope: ![[NS]],{{.*}} DISPFlagDefinition
-
-// CHECK: !DISubprogram(name: "__cxx_global_var_init",{{.*}} scope: ![[FILE]],{{.*}} DISPFlagDefinition
-// CHECK: !DISubprogram(linkageName: "_GLOBAL__sub_I_{{.*}}",{{.*}} scope: ![[FILE]],{{.*}} DISPFlagDefinition
diff --git a/clang/test/CodeGenCXX/debug-info-fwd-ref.cpp b/clang/test/CodeGenCXX/debug-info-fwd-ref.cpp
deleted file mode 100644
index 219e796..0000000
--- a/clang/test/CodeGenCXX/debug-info-fwd-ref.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
-
-struct baz {
- int h;
- baz(int a) : h(a) {}
-};
-
-struct bar {
- baz b;
- baz& b_ref;
- bar(int x) : b(x), b_ref(b) {}
-};
-
-int main(int argc, char** argv) {
- bar myBar(1);
- return 0;
-}
-
-// Make sure we have two DW_TAG_structure_types for baz and bar and no forward
-// references.
-// CHECK-NOT: DIFlagFwdDecl
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "bar"
-// CHECK-NOT: DIFlagFwdDecl
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "baz"
-// CHECK-NOT: DIFlagFwdDecl
diff --git a/clang/test/CodeGenCXX/debug-info-fwd-template-param.cpp b/clang/test/CodeGenCXX/debug-info-fwd-template-param.cpp
deleted file mode 100644
index 2983f84..0000000
--- a/clang/test/CodeGenCXX/debug-info-fwd-template-param.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// RUN: %clang_cc1 %s -triple=%itanium_abi_triple -debug-info-kind=limited -debug-forward-template-params -emit-llvm -o - | FileCheck --check-prefix=CHILD %s
-// RUN: %clang_cc1 %s -triple=%itanium_abi_triple -debug-info-kind=limited -emit-llvm -o - | FileCheck --check-prefix=NONE %s
-// A DWARF forward declaration of a template instantiation should have template
-// parameter children (if we ask for them).
-
-template<typename T> class A;
-A<int> *p;
-
-// CHILD: !DICompositeType(tag: DW_TAG_class_type, name: "A<int>"
-// CHILD-SAME: flags: DIFlagFwdDecl
-// CHILD-SAME: templateParams: [[PARAM_LIST:![0-9]*]]
-// CHILD: [[PARAM_LIST]] = !{[[PARAM:![0-9]*]]}
-// CHILD: [[PARAM]] = !DITemplateTypeParameter(name: "T",
-// CHILD-SAME: type: [[BTYPE:![0-9]*]]
-// CHILD: [[BTYPE]] = !DIBasicType(name: "int"
-
-// NONE: !DICompositeType(tag: DW_TAG_class_type, name: "A<int>"
-// NONE-SAME: flags: DIFlagFwdDecl
-// NONE-NOT: templateParams:
-// NONE-SAME: )
diff --git a/clang/test/CodeGenCXX/debug-info-gline-tables-only-codeview.cpp b/clang/test/CodeGenCXX/debug-info-gline-tables-only-codeview.cpp
deleted file mode 100644
index 6b9c9a2..0000000
--- a/clang/test/CodeGenCXX/debug-info-gline-tables-only-codeview.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-// RUN: %clang_cc1 %s -triple x86_64-windows-msvc -gcodeview \
-// RUN: -debug-info-kind=line-tables-only -emit-llvm -o - | FileCheck %s
-// Checks that clang with "-gline-tables-only" with CodeView emits some debug
-// info for variables and types when they appear in function scopes.
-
-namespace NS {
-struct C {
- void m() {}
- // Test externally visible lambda.
- void lambda2() { []() {}(); }
-
- // Test naming for function parameters.
- void lambda_params(int x = [](){ return 0; }(), int y = [](){ return 1; }()) {}
-};
-void f() {}
-}
-
-// Test non- externally visible lambda.
-auto lambda1 = []() { return 1; };
-
-NS::C c;
-
-
-void test() {
- // CHECK: !DISubprogram(name: "f", scope: ![[NS:[0-9]+]],
- // CHECK-SAME: type: ![[F:[0-9]+]]
- // CHECK: ![[NS]] = !DINamespace(name: "NS", scope: null)
- // CHECK: ![[F]] = !DISubroutineType(types: ![[FTYPE:[0-9]+]])
- // CHECK: ![[FTYPE]] = !{null}
- NS::f();
-
- // CHECK: ![[M:[0-9]+]] = distinct !DISubprogram(name: "m", scope: ![[C:[0-9]+]],
- // CHECK-SAME: type: ![[MTYPE:[0-9]+]],
- // CHECK: ![[C]] = !DICompositeType(tag: DW_TAG_structure_type, name: "C",
- // CHECK-SAME: flags: DIFlagFwdDecl
- // CHECK-NOT: identifier
- // CHECK: ![[MTYPE]] = !DISubroutineType({{.*}}types: !{{.*}})
- c.m();
-
- // CHECK: !DISubprogram(name: "operator()", scope: ![[LAMBDA0:[0-9]+]],
- // CHECK: ![[LAMBDA0]] = !DICompositeType(tag: DW_TAG_class_type,
- // CHECK-SAME: name: "<lambda_0>",
- // CHECK-SAME: flags: DIFlagFwdDecl
- lambda1();
-
- // CHECK: !DISubprogram(name: "operator()", scope: ![[LAMBDA1_1:[0-9]+]],
- // CHECK: ![[LAMBDA1_1]] = !DICompositeType(tag: DW_TAG_class_type,
- // CHECK-SAME: name: "<lambda_1_1>",
- // CHECK: !DISubprogram(name: "operator()", scope: ![[LAMBDA2_1:[0-9]+]],
- // CHECK: ![[LAMBDA2_1]] = !DICompositeType(tag: DW_TAG_class_type,
- // CHECK-SAME: name: "<lambda_2_1>",
- c.lambda_params();
-
- // CHECK: !DISubprogram(name: "operator()", scope: ![[LAMBDA1:[0-9]+]],
- // CHECK: ![[LAMBDA1]] = !DICompositeType(tag: DW_TAG_class_type,
- // CHECK-SAME: name: "<lambda_1>",
- // CHECK-SAME: flags: DIFlagFwdDecl
- c.lambda2();
-}
diff --git a/clang/test/CodeGenCXX/debug-info-gline-tables-only.cpp b/clang/test/CodeGenCXX/debug-info-gline-tables-only.cpp
deleted file mode 100644
index 192169b..0000000
--- a/clang/test/CodeGenCXX/debug-info-gline-tables-only.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-// RUN: %clang_cc1 %s -fno-rtti -debug-info-kind=line-tables-only -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 %s -fno-rtti -debug-info-kind=line-directives-only -emit-llvm -o - | FileCheck %s
-// Checks that clang with "-gline-tables-only" or "-gline-directives-only" doesn't emit debug info
-// for variables and types.
-
-// CHECK-NOT: DW_TAG_namespace
-namespace NS {
-// CHECK-NOT: DW_TAG_class_type
-// CHECK-NOT: DW_TAG_friend
-class C { friend class D; };
-class D {};
-// CHECK-NOT: DW_TAG_inheritance
-class E : public C {
- // CHECK-NOT: DW_TAG_reference type
- void x(const D& d);
-};
-// CHECK-NOT: DW_TAG_structure_type
-struct F {
- enum X { };
- void func(X);
- // CHECK-NOT: DW_TAG_member
- virtual ~F();
-};
-F::~F() {
-}
-}
-
-// CHECK-NOT: DW_TAG_variable
-NS::C c;
-NS::D d;
-NS::E e;
-NS::F f;
diff --git a/clang/test/CodeGenCXX/debug-info-global-ctor-dtor.cpp b/clang/test/CodeGenCXX/debug-info-global-ctor-dtor.cpp
deleted file mode 100644
index 6264761..0000000
--- a/clang/test/CodeGenCXX/debug-info-global-ctor-dtor.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// RUN: %clang_cc1 %s -debug-info-kind=limited -triple %itanium_abi_triple -fno-use-cxa-atexit -disable-O0-optnone -emit-llvm -o - \
-// RUN: | FileCheck %s --check-prefix=CHECK-NOKEXT
-// RUN: %clang_cc1 %s -debug-info-kind=limited -triple %itanium_abi_triple -fno-use-cxa-atexit -fapple-kext -disable-O0-optnone -emit-llvm -o - \
-// RUN: | FileCheck %s --check-prefix=CHECK-KEXT
-// RUN: %clang_cc1 %s -gcodeview -debug-info-kind=limited -triple x86_64-windows-msvc -fno-use-cxa-atexit -disable-O0-optnone -emit-llvm -o - \
-// RUN: | FileCheck %s --check-prefix=CHECK-MSVC
-
-class A {
-public:
- A();
- A(int x);
- virtual ~A();
-};
-
-A glob;
-A array[2];
-
-void foo() {
- static A stat;
-}
-
-template <typename T>
-struct FooTpl {
- template <typename U>
- static A sdm_tpl;
-};
-template <typename T>
-template <typename U>
-A FooTpl<T>::sdm_tpl(sizeof(U) + sizeof(T));
-template A FooTpl<int>::sdm_tpl<int>;
-
-// CHECK-NOKEXT: !DISubprogram(name: "__cxx_global_var_init",{{.*}} flags: DIFlagArtificial, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
-// CHECK-NOKEXT: !DISubprogram(name: "__dtor_glob",{{.*}} flags: DIFlagArtificial, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
-// CHECK-NOKEXT: !DISubprogram(name: "__cxx_global_var_init.1",{{.*}} flags: DIFlagArtificial, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
-// CHECK-NOKEXT: !DISubprogram(name: "__cxx_global_array_dtor",{{.*}} flags: DIFlagArtificial, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
-// CHECK-NOKEXT: !DISubprogram(name: "__dtor_array",{{.*}} flags: DIFlagArtificial, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
-// CHECK-NOKEXT: !DISubprogram(name: "__dtor__ZZ3foovE4stat",{{.*}} flags: DIFlagArtificial, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
-// CHECK-NOKEXT: !DISubprogram({{.*}} DISPFlagLocalToUnit | DISPFlagDefinition
-
-// CHECK-KEXT: !DISubprogram({{.*}} DISPFlagLocalToUnit | DISPFlagDefinition
-
-// CHECK-MSVC: !DISubprogram(name: "`dynamic initializer for 'glob'",{{.*}} flags: DIFlagArtificial, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
-// CHECK-MSVC: !DISubprogram(name: "`dynamic atexit destructor for 'glob'",{{.*}} flags: DIFlagArtificial, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
-// CHECK-MSVC: !DISubprogram(name: "`dynamic initializer for 'array'",{{.*}} flags: DIFlagArtificial, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
-// CHECK-MSVC: !DISubprogram(name: "__cxx_global_array_dtor",{{.*}} flags: DIFlagArtificial, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
-// CHECK-MSVC: !DISubprogram(name: "`dynamic atexit destructor for 'array'",{{.*}} flags: DIFlagArtificial, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
-// CHECK-MSVC: !DISubprogram(name: "`dynamic atexit destructor for 'stat'",{{.*}} flags: DIFlagArtificial, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
-
-// MSVC does weird stuff when templates are involved, so we don't match exactly,
-// but these names are reasonable.
-// FIXME: These should not be marked DISPFlagLocalToUnit.
-// CHECK-MSVC: !DISubprogram(name: "FooTpl<int>::`dynamic initializer for 'sdm_tpl<int>'",{{.*}} flags: DIFlagArtificial, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
-// CHECK-MSVC: !DISubprogram(name: "FooTpl<int>::`dynamic atexit destructor for 'sdm_tpl<int>'",{{.*}} flags: DIFlagArtificial, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
diff --git a/clang/test/CodeGenCXX/debug-info-global.cpp b/clang/test/CodeGenCXX/debug-info-global.cpp
deleted file mode 100644
index 5abc050..0000000
--- a/clang/test/CodeGenCXX/debug-info-global.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
-
-// Multiple references to the same constant should result in only one entry in
-// the globals list.
-
-namespace ns {
-const int cnst = 42;
-}
-int f1() {
- return ns::cnst + ns::cnst;
-}
-
-// CHECK: !DICompileUnit(
-// CHECK-SAME: globals: [[GLOBALS:![0-9]*]]
-
-// CHECK: [[GLOBALS]] = !{[[CNST:![0-9]*]]}
-
-// CHECK: [[CNST]] = !DIGlobalVariableExpression(var: [[CNSTV:.*]], expr:
-// CHECK: [[CNSTV]] = distinct !DIGlobalVariable(name: "cnst",
-// CHECK-SAME: scope: [[NS:![0-9]*]]
-// CHECK: [[NS]] = !DINamespace(name: "ns"
-
diff --git a/clang/test/CodeGenCXX/debug-info-globalinit.cpp b/clang/test/CodeGenCXX/debug-info-globalinit.cpp
deleted file mode 100644
index bcadc6b..0000000
--- a/clang/test/CodeGenCXX/debug-info-globalinit.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10.0.0 -emit-llvm -o - %s -std=c++11 -debug-info-kind=limited | FileCheck %s
-
-void crash() {
- volatile char *ptr = 0;
- char x = *ptr;
-}
-
-int test() {
- crash();
- return 1;
-}
-
-static int i = test();
-__attribute__((nodebug)) static int j = test();
-static int k = test();
-
-int main(void) {}
-
-// CHECK-LABEL: define internal void @__cxx_global_var_init()
-// CHECK-NOT: __cxx_global_var_init
-// CHECK: %[[C0:.+]] = call noundef i32 @_Z4testv(), !dbg ![[LINE:.*]]
-// CHECK-NOT: __cxx_global_var_init
-// CHECK: store i32 %[[C0]], ptr @_ZL1i, align 4, !dbg
-//
-// CHECK-LABEL: define internal void @__cxx_global_var_init.1()
-// CHECK-NOT: dbg
-// CHECK: %[[C1:.+]] = call noundef i32 @_Z4testv()
-// CHECK-NOT: dbg
-// CHECK: store i32 %[[C1]], ptr @_ZL1j, align 4
-//
-// CHECK-LABEL: define internal void @__cxx_global_var_init.2()
-// CHECK-NOT: __cxx_global_var_init
-// CHECK: %[[C2:.+]] = call noundef i32 @_Z4testv(), !dbg ![[LINE2:.*]]
-// CHECK-NOT: __cxx_global_var_init
-// CHECK: store i32 %[[C2]], ptr @_ZL1k, align 4, !dbg
-//
-// CHECK: ![[LINE]] = !DILocation(line: 13,
-// CHECK: ![[LINE2]] = !DILocation(line: 15,
diff --git a/clang/test/CodeGenCXX/debug-info-hotpatch-aarch64.cpp b/clang/test/CodeGenCXX/debug-info-hotpatch-aarch64.cpp
deleted file mode 100644
index ff2dfc1..0000000
--- a/clang/test/CodeGenCXX/debug-info-hotpatch-aarch64.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// REQUIRES: aarch64-registered-target
-///
-/// Check that using /hotpatch doesn't generate an error.
-/// Binaries are always hotpatchable on ARM/ARM64.
-///
-// RUN: %clang_cl --target=aarch64-pc-windows-msvc /c /hotpatch /Z7 -- %s 2>&1
-///
-/// Ensure that we set the hotpatchable flag in the debug information.
-///
-// RUN: %clang_cl --target=aarch64-pc-windows-msvc /c /Z7 -o %t.obj -- %s
-// RUN: llvm-pdbutil dump -symbols %t.obj | FileCheck %s --check-prefix=HOTPATCH
-// HOTPATCH: S_COMPILE3 [size = [[#]]]
-// HOTPATCH: flags = hot patchable
-//
-// RUN: %clang_cl --target=aarch64-pc-windows-msvc /c -o %t.obj -- %s
-// RUN: llvm-pdbutil dump -symbols %t.obj | FileCheck %s --check-prefix=HOTPATCH
-
-int main() {
- return 0;
-}
diff --git a/clang/test/CodeGenCXX/debug-info-hotpatch-arm.cpp b/clang/test/CodeGenCXX/debug-info-hotpatch-arm.cpp
deleted file mode 100644
index e31c762..0000000
--- a/clang/test/CodeGenCXX/debug-info-hotpatch-arm.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// REQUIRES: arm-registered-target
-///
-/// Check that using /hotpatch doesn't generate an error.
-/// Binaries are always hotpatchable on ARM/ARM64.
-///
-// RUN: %clang_cl --target=arm-pc-windows-msvc /c /hotpatch /Z7 -- %s 2>&1
-///
-/// Ensure that we set the hotpatchable flag in the debug information.
-///
-// RUN: %clang_cl --target=arm-pc-windows-msvc /c /Z7 -o %t.obj -- %s
-// RUN: llvm-pdbutil dump -symbols %t.obj | FileCheck %s --check-prefix=HOTPATCH
-// HOTPATCH: S_COMPILE3 [size = [[#]]]
-// HOTPATCH: flags = hot patchable
-//
-// RUN: %clang_cl --target=arm-pc-windows-msvc /c -o %t.obj -- %s
-// RUN: llvm-pdbutil dump -symbols %t.obj | FileCheck %s --check-prefix=HOTPATCH
-
-int main() {
- return 0;
-}
diff --git a/clang/test/CodeGenCXX/debug-info-hotpatch.cpp b/clang/test/CodeGenCXX/debug-info-hotpatch.cpp
deleted file mode 100644
index e005c9c..0000000
--- a/clang/test/CodeGenCXX/debug-info-hotpatch.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// REQUIRES: x86-registered-target
-///
-// RUN: %clang_cl --target=x86_64-windows-msvc /c /hotpatch /Z7 -o %t.obj -- %s
-// RUN: llvm-pdbutil dump -symbols %t.obj | FileCheck %s --check-prefix=HOTPATCH
-// HOTPATCH: S_COMPILE3 [size = [[#]]]
-// HOTPATCH: flags = hot patchable
-///
-// RUN: %clang_cl --target=x86_64-windows-msvc /c /Z7 -o %t.obj -- %s
-// RUN: llvm-pdbutil dump -symbols %t.obj | FileCheck %s --check-prefix=NO-HOTPATCH
-// NO-HOTPATCH-NOT: flags = hot patchable
-///
-// RUN: %clang_cl --target=x86_64-windows-msvc /hotpatch -### -- %s 2>&1 \
-// RUN: | FileCheck %s --check-prefix=FUNCTIONPADMIN
-// FUNCTIONPADMIN: clang{{.*}}
-// FUNCTIONPADMIN: {{link[^"]*"}}
-// FUNCTIONPADMIN: -functionpadmin
-
-int main() {
- return 0;
-}
diff --git a/clang/test/CodeGenCXX/debug-info-incomplete-types.cpp b/clang/test/CodeGenCXX/debug-info-incomplete-types.cpp
deleted file mode 100644
index 0bf5923..0000000
--- a/clang/test/CodeGenCXX/debug-info-incomplete-types.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %clang_cc1 -debug-info-kind=limited -gomit-unreferenced-methods %s -emit-llvm -o - | FileCheck %s
-
-struct t1 {
- void f1();
- void f2();
-};
-
-void t1::f1() { }
-
-// CHECK: distinct !DICompositeType(tag: DW_TAG_structure_type, name: "t1"
-// CHECK-SAME: elements: [[ELEMENTS:![0-9]+]]
-// CHECK: [[ELEMENTS]] = !{}
diff --git a/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp b/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp
deleted file mode 100644
index 1b857d8..0000000
--- a/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
-//
-// Test that indirect field decls are handled gracefully.
-template <class T, int T::*ptr> class Foo { };
-
-struct Bar {
- int i1;
- // CHECK: ![[INT:[0-9]+]] = !DIBasicType(name: "int"
- // CHECK: !DIDerivedType(tag: DW_TAG_member, scope:
- // CHECK-SAME: line: [[@LINE+4]]
- // CHECK-SAME: baseType: ![[UNION:[0-9]+]]
- // CHECK-SAME: size: 32, offset: 32
- // CHECK: ![[UNION]] = distinct !DICompositeType(tag: DW_TAG_union_type,{{.*}} identifier: "_ZTSN3BarUt_E")
- union {
- // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "i2",
- // CHECK-SAME: line: [[@LINE+5]]
- // CHECK-SAME: baseType: ![[INT]]
- // CHECK-SAME: size: 32
- // CHECK-NOT: offset:
- // CHECK-SAME: ){{$}}
- int i2;
- };
-};
-
-Foo<Bar, &Bar::i2> the_foo;
diff --git a/clang/test/CodeGenCXX/debug-info-inheriting-constructor.cpp b/clang/test/CodeGenCXX/debug-info-inheriting-constructor.cpp
deleted file mode 100644
index 7918387..0000000
--- a/clang/test/CodeGenCXX/debug-info-inheriting-constructor.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// RUN: %clang_cc1 -debug-info-kind=standalone -std=c++11 -triple x86_64-darwin -emit-llvm -o - %s | FileCheck %s
-
-struct A {
- A(int, ...);
-};
-struct B : A {
- using A::A;
-};
-
-A::A(int i, ...) {}
-// CHECK: define{{.*}} void @{{.*}}foo
-// CHECK-NOT: ret void
-// CHECK: #dbg_declare
-// CHECK-NOT: ret void
-// CHECK: #dbg_declare(ptr %{{[^,]+}},
-// CHECK-SAME: ![[THIS:[0-9]+]], !DIExpression(), ![[LOC:[0-9]+]]
-// CHECK: ret void, !dbg ![[NOINL:[0-9]+]]
-// CHECK: ![[FOO:.*]] = distinct !DISubprogram(name: "foo"
-// CHECK-DAG: ![[A:.*]] = distinct !DISubprogram(name: "A", linkageName: "_ZN1BCI11AEiz"
-void foo() {
-// CHECK-DAG: ![[LOC]] = !DILocation(line: 0, scope: ![[A]], inlinedAt: ![[INL:[0-9]+]])
-// CHECK-DAG: ![[INL]] = !DILocation(line: [[@LINE+1]], column: 5, scope: ![[FOO]])
- B b(0);
-// CHECK: ![[NOINL]] = !DILocation(line: [[@LINE+1]], column: 1, scope: !{{[0-9]+}})
-}
diff --git a/clang/test/CodeGenCXX/debug-info-inlined.cpp b/clang/test/CodeGenCXX/debug-info-inlined.cpp
deleted file mode 100644
index d73a8a6..0000000
--- a/clang/test/CodeGenCXX/debug-info-inlined.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -triple i686-pc-windows-msvc19.0.24213 -gcodeview -debug-info-kind=limited -std=c++14 %s -o - | FileCheck %s
-// PR33997.
-struct WithDtor {
- ~WithDtor();
-};
-struct Base {
- Base(WithDtor);
-};
-class Forward : Base {
- using Base::Base;
-};
-class A : Forward {
- A();
-};
-class B : Forward {
- B();
-};
-A::A() : Forward(WithDtor()) {}
-
-B::B() : Forward(WithDtor()) {}
-
-// CHECK: define{{.*}}A
-// CHECK-NOT: {{ ret }}
-// CHECK: store ptr %{{.*}}, ptr %{{.*}}, !dbg ![[INL:[0-9]+]]
-
-// CHECK: ![[INL]] = !DILocation(line: 10, column: 15, scope: ![[SP:[0-9]+]], inlinedAt:
-// CHECK: ![[SP]] = distinct !DISubprogram(name: "Base", {{.*}} DISPFlagDefinition
diff --git a/clang/test/CodeGenCXX/debug-info-lambda.cpp b/clang/test/CodeGenCXX/debug-info-lambda.cpp
deleted file mode 100644
index 2c266d6..0000000
--- a/clang/test/CodeGenCXX/debug-info-lambda.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm \
-// RUN: -debug-info-kind=line-tables-only -std=c++11 %s -o - | FileCheck %s
-
-// CHECK-LABEL: define{{.*}}lambda_in_func
-void lambda_in_func(int &ref) {
- // CHECK: [[ref_slot:%.*]] = getelementptr inbounds nuw %class.anon, ptr {{.*}}, i32 0, i32 0, !dbg [[lambda_decl_loc:![0-9]+]]
- // CHECK-NEXT: %1 = load ptr, ptr %ref.addr, align {{.*}}, !dbg [[capture_init_loc:![0-9]+]]
- // CHECK-NEXT: store ptr %1, ptr %0, align {{.*}}, !dbg [[lambda_decl_loc]]
- // CHECK-NEXT: call {{.*}}void {{.*}}, !dbg [[lambda_call_loc:![0-9]+]]
-
- auto helper = [ // CHECK: [[lambda_decl_loc]] = !DILocation(line: [[@LINE]], column: 17
- &]() { // CHECK: [[capture_init_loc]] = !DILocation(line: [[@LINE]], column: 18
- ++ref;
- };
- helper(); // CHECK: [[lambda_call_loc]] = !DILocation(line: [[@LINE]]
-}
diff --git a/clang/test/CodeGenCXX/debug-info-large-constant.cpp b/clang/test/CodeGenCXX/debug-info-large-constant.cpp
deleted file mode 100644
index 5a0d4d2..0000000
--- a/clang/test/CodeGenCXX/debug-info-large-constant.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %clang_cc1 -debug-info-kind=limited -triple=x86_64-apple-darwin %s -o /dev/null
-// PR 8913
-
-typedef __uint128_t word128;
-static const word128 m126 = 0xffffffffffffffffULL;
-word128 foo() {
- return m126;
-}
diff --git a/clang/test/CodeGenCXX/debug-info-limited-ctor.cpp b/clang/test/CodeGenCXX/debug-info-limited-ctor.cpp
deleted file mode 100644
index 18adfde..0000000
--- a/clang/test/CodeGenCXX/debug-info-limited-ctor.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-// RUN: %clang_cc1 -debug-info-kind=constructor -emit-llvm %s -o - | FileCheck %s
-// RUN: %clang_cc1 -debug-info-kind=constructor -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=ITANIUM %s
-
-// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "A"{{.*}}DIFlagTypePassByValue
-struct A {
-} TestA;
-
-// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "B"{{.*}}flags: DIFlagFwdDecl
-struct B {
- B();
-} TestB;
-
-// CHECK-DAG: ![[C:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "C"{{.*}}DIFlagTypePassByValue
-struct C {
- C() {}
-} TestC;
-
-// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "D"{{.*}}DIFlagTypePassByValue
-struct D {
- D();
-};
-D::D() {}
-
-// Test for constexpr constructor.
-// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "E"{{.*}}DIFlagTypePassByValue
-struct E {
- constexpr E(){};
-} TestE;
-
-// Test for trivial constructor.
-// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "F"{{.*}}DIFlagTypePassByValue
-struct F {
- F() = default;
- F(int) {}
- int i;
-} TestF;
-
-// Test for trivial constructor.
-// CHECK-DAG: ![[G:.*]] ={{.*}}!DICompositeType({{.*}}name: "G"{{.*}}DIFlagTypePassByValue
-// CHECK-DAG: !DICompositeType({{.*}}scope: ![[G]], {{.*}}DIFlagTypePassByValue
-struct G {
- G() : g_(0) {}
- struct {
- int g_;
- };
-} TestG;
-
-// Test for an aggregate class with an implicit non-trivial default constructor
-// that is not instantiated.
-// CHECK-DAG: !DICompositeType({{.*}}name: "H",{{.*}}DIFlagTypePassByValue
-struct H {
- B b;
-};
-void f(H h) {}
-
-// Test for an aggregate class with an implicit non-trivial default constructor
-// that is instantiated.
-// CHECK-DAG: !DICompositeType({{.*}}name: "J",{{.*}}DIFlagTypePassByValue
-struct J {
- B b;
-};
-void f(decltype(J()) j) {}
-
-// Test for a class with trivial default constructor that is not instantiated.
-// CHECK-DAG: !DICompositeType({{.*}}name: "K",{{.*}}DIFlagTypePassByValue
-class K {
- int i;
-};
-void f(K k) {}
-
-// CHECK-DAG: !DICompositeType({{.*}}name: "DeletedCtors",{{.*}}DIFlagTypePassBy
-struct NonTrivial {
- NonTrivial();
-};
-struct DeletedCtors {
- DeletedCtors() = delete;
- DeletedCtors(const DeletedCtors &) = default;
- void f1();
- NonTrivial t;
-};
-
-const NonTrivial &f(const DeletedCtors &D) {
- return D.t;
-}
-
-// Test that we don't use constructor homing on lambdas.
-// CHECK-DAG: ![[L:.*]] ={{.*}}!DISubprogram({{.*}}name: "L"
-// CHECK-DAG: !DICompositeType({{.*}}scope: ![[L]], {{.*}}DIFlagTypePassByValue
-void L() {
- auto func = [&]() {};
-}
-
-// Check that types are being added to retained types list.
-// CHECK-DAG: !DICompileUnit{{.*}}retainedTypes: ![[RETAINED:[0-9]+]]
-// CHECK-DAG: ![[RETAINED]] = {{.*}}![[C]]
-
-
-struct VTableAndCtor {
- virtual void f1();
- VTableAndCtor();
-};
-
-VTableAndCtor::VTableAndCtor() {
-}
-
-// ITANIUM-DAG: !DICompositeType({{.*}}name: "VTableAndCtor", {{.*}}flags: DIFlagFwdDecl
-
diff --git a/clang/test/CodeGenCXX/debug-info-limited.cpp b/clang/test/CodeGenCXX/debug-info-limited.cpp
deleted file mode 100644
index 4467d20..0000000
--- a/clang/test/CodeGenCXX/debug-info-limited.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-// RUN: %clang -flimit-debug-info -emit-llvm -g -S %s -o - | FileCheck %s
-// RUN: %clang -flimit-debug-info -emit-llvm -g -S %s -o - | FileCheck --check-prefix=CHECK-C %s
-
-// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "A"
-// CHECK-NOT: DIFlagFwdDecl
-// CHECK-SAME: ){{$}}
-class A {
-public:
- int z;
-};
-
-A *foo (A* x) {
- A *a = new A(*x);
- return a;
-}
-
-// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "B"
-// CHECK-SAME: flags: DIFlagFwdDecl
-
-class B {
-public:
- int y;
-};
-
-extern int bar(B *b);
-int baz(B *b) {
- return bar(b);
-}
-
-
-// CHECK-C: !DICompositeType(tag: DW_TAG_structure_type, name: "C"
-// CHECK-C-SAME: flags: DIFlagFwdDecl
-
-struct C {
-};
-
-C (*x)(C);
diff --git a/clang/test/CodeGenCXX/debug-info-line-if-2.cpp b/clang/test/CodeGenCXX/debug-info-line-if-2.cpp
deleted file mode 100644
index 8ab96a7..0000000
--- a/clang/test/CodeGenCXX/debug-info-line-if-2.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// RUN: %clang_cc1 -debug-info-kind=limited -gno-column-info -triple=x86_64-pc-linux -emit-llvm %s -o - | FileCheck %s
-
-// The important thing is that the compare and the conditional branch have
-// locs with the same scope (the lexical block for the 'if'). By turning off
-// column info, they end up with the same !dbg record, which halves the number
-// of checks to verify the scope.
-
-int c = 2;
-
-int f() {
-#line 100
- if (int a = 5; a > c)
- return 1;
- return 0;
-}
-// CHECK-LABEL: define {{.*}} @_Z1fv()
-// CHECK: = icmp {{.*}} !dbg [[F_CMP:![0-9]+]]
-// CHECK-NEXT: br i1 {{.*}} !dbg [[F_CMP]]
-
-int g() {
-#line 200
- if (int a = f())
- return 2;
- return 3;
-}
-// CHECK-LABEL: define {{.*}} @_Z1gv()
-// CHECK: = icmp {{.*}} !dbg [[G_CMP:![0-9]+]]
-// CHECK-NEXT: br i1 {{.*}} !dbg [[G_CMP]]
-
-int h() {
-#line 300
- if (c > 3)
- return 4;
- return 5;
-}
-// CHECK-LABEL: define {{.*}} @_Z1hv()
-// CHECK: = icmp {{.*}} !dbg [[H_CMP:![0-9]+]]
-// CHECK-NEXT: br i1 {{.*}} !dbg [[H_CMP]]
-
-// CHECK-DAG: [[F_CMP]] = !DILocation(line: 100, scope: [[F_SCOPE:![0-9]+]]
-// CHECK-DAG: [[F_SCOPE]] = distinct !DILexicalBlock({{.*}} line: 100)
-// CHECK-DAG: [[G_CMP]] = !DILocation(line: 200, scope: [[G_SCOPE:![0-9]+]]
-// CHECK-DAG: [[G_SCOPE]] = distinct !DILexicalBlock({{.*}} line: 200)
-// CHECK-DAG: [[H_CMP]] = !DILocation(line: 300, scope: [[H_SCOPE:![0-9]+]]
-// CHECK-DAG: [[H_SCOPE]] = distinct !DILexicalBlock({{.*}} line: 300)
diff --git a/clang/test/CodeGenCXX/debug-info-line-if.cpp b/clang/test/CodeGenCXX/debug-info-line-if.cpp
deleted file mode 100644
index 8f52428..0000000
--- a/clang/test/CodeGenCXX/debug-info-line-if.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-// RUN: %clang_cc1 -debug-info-kind=limited -gno-column-info -std=c++11 -emit-llvm %s -o - | FileCheck -allow-deprecated-dag-overlap %s
-// PR19864
-extern int v[2];
-int a = 0, b = 0;
-int main() {
-#line 100
- for (int x : v)
- if (x)
- ++b; // CHECK: add nsw{{.*}}, 1
- else
- ++a; // CHECK: add nsw{{.*}}, 1
- // The continuation block if the if statement should not share the
- // location of the ++a statement. The branch back to the start of the loop
- // should be attributed to the loop header line.
-
- // CHECK: br label
- // CHECK: br label
- // CHECK: br label {{.*}}, !dbg [[DBG1:![0-9]*]], !llvm.loop [[L1:![0-9]*]]
-
-#line 200
- while (a)
- if (b)
- ++b; // CHECK: add nsw{{.*}}, 1
- else
- ++a; // CHECK: add nsw{{.*}}, 1
-
- // CHECK: br label
- // CHECK: br label {{.*}}, !dbg [[DBG2:![0-9]*]], !llvm.loop [[L2:![0-9]*]]
-
-#line 300
- for (; a; )
- if (b)
- ++b; // CHECK: add nsw{{.*}}, 1
- else
- ++a; // CHECK: add nsw{{.*}}, 1
-
- // CHECK: br label
- // CHECK: br label {{.*}}, !dbg [[DBG3:![0-9]*]], !llvm.loop [[L3:![0-9]*]]
-
-#line 400
- int x[] = {1, 2};
- for (int y : x)
- if (b)
- ++b; // CHECK: add nsw{{.*}}, 1
- else
- ++a; // CHECK: add nsw{{.*}}, 1
-
- // CHECK: br label
- // CHECK: br label {{.*}}, !dbg [[DBG4:![0-9]*]], !llvm.loop [[L4:![0-9]*]]
-
- // CHECK-DAG: [[DBG1]] = !DILocation(line: 100, scope: !{{.*}})
- // CHECK-DAG: [[DBG2]] = !DILocation(line: 200, scope: !{{.*}})
- // CHECK-DAG: [[DBG3]] = !DILocation(line: 300, scope: !{{.*}})
- // CHECK-DAG: [[DBG4]] = !DILocation(line: 401, scope: !{{.*}})
-
- // CHECK-DAG: [[L1]] = distinct !{[[L1]], [[SLDBG1:![0-9]*]], [[ELDBG1:![0-9]*]]}
- // CHECK-DAG: [[SLDBG1]] = !DILocation(line: 100, scope: !{{.*}})
- // CHECK-DAG: [[ELDBG1]] = !DILocation(line: 104, scope: !{{.*}})
-
- // CHECK-DAG: [[L2]] = distinct !{[[L2]], [[SLDBG2:![0-9]*]], [[ELDBG2:![0-9]*]], [[MP:![0-9]+]]}
- // CHECK-DAG: [[SLDBG2]] = !DILocation(line: 200, scope: !{{.*}})
- // CHECK-DAG: [[ELDBG2]] = !DILocation(line: 204, scope: !{{.*}})
-
- // CHECK-DAG: [[L3]] = distinct !{[[L3]], [[SLDBG3:![0-9]*]], [[ELDBG3:![0-9]*]], [[MP]]}
- // CHECK-DAG: [[SLDBG3]] = !DILocation(line: 300, scope: !{{.*}})
- // CHECK-DAG: [[ELDBG3]] = !DILocation(line: 304, scope: !{{.*}})
-
- // CHECK-DAG: [[L4]] = distinct !{[[L4]], [[SLDBG4:![0-9]*]], [[ELDBG4:![0-9]*]]}
- // CHECK-DAG: [[SLDBG4]] = !DILocation(line: 401, scope: !{{.*}})
- // CHECK-DAG: [[ELDBG4]] = !DILocation(line: 405, scope: !{{.*}})
-}
diff --git a/clang/test/CodeGenCXX/debug-info-line.cpp b/clang/test/CodeGenCXX/debug-info-line.cpp
deleted file mode 100644
index 8ef0e02..0000000
--- a/clang/test/CodeGenCXX/debug-info-line.cpp
+++ /dev/null
@@ -1,331 +0,0 @@
-// RUN: %clang_cc1 -w -debug-info-kind=line-tables-only -std=c++11 -fexceptions -fcxx-exceptions -mllvm -no-discriminators -emit-llvm %s -o - -triple %itanium_abi_triple | FileCheck %s
-// RUN: %clang_cc1 -w -debug-info-kind=line-tables-only -std=c++11 -fexceptions -fcxx-exceptions -mllvm -no-discriminators -emit-llvm %s -o - -triple i686-linux-gnu | FileCheck %s
-// RUN: %clang_cc1 -w -debug-info-kind=line-directives-only -std=c++11 -fexceptions -fcxx-exceptions -mllvm -no-discriminators -emit-llvm %s -o - -triple %itanium_abi_triple | FileCheck %s
-// RUN: %clang_cc1 -w -debug-info-kind=line-directives-only -std=c++11 -fexceptions -fcxx-exceptions -mllvm -no-discriminators -emit-llvm %s -o - -triple i686-linux-gnu | FileCheck %s
-
-int &src();
-int *sink();
-extern "C" __complex float complex_src();
-extern "C" __complex float *complex_sink();
-
-// CHECK-LABEL: define
-void f1() {
- *sink()
- // CHECK: store {{.*}}, !dbg [[DBG_F1:!.*]]
-#line 100
- = //
- src();
-}
-
-struct foo {
- int i;
- int &j;
- __complex float k;
- foo();
-};
-
-// CHECK-LABEL: define
-foo::foo()
- :
-#line 200
- i // CHECK: store i32 {{.*}} !dbg [[DBG_FOO_VALUE:!.*]]
- (src()),
- j // CHECK: store ptr {{.*}} !dbg [[DBG_FOO_REF:!.*]]
- (src()),
- k // CHECK: store float {{.*}} !dbg [[DBG_FOO_COMPLEX:!.*]]
- (complex_src()) {
-}
-
-// CHECK-LABEL: define {{.*}}f2{{.*}}
-void f2() {
- // CHECK: store float {{.*}} !dbg [[DBG_F2:!.*]]
- *complex_sink()
-#line 300
- = //
- complex_src();
-}
-
-// CHECK-LABEL: define
-void f3() {
- // CHECK: store float {{.*}} !dbg [[DBG_F3:!.*]]
- *complex_sink()
-#line 400
- += //
- complex_src();
-}
-
-// CHECK-LABEL: define
-void f4() {
-#line 500
- auto x // CHECK: store {{.*}} !dbg [[DBG_F4:!.*]]
- = src();
-}
-
-// CHECK-LABEL: define
-void f5() {
-#line 600
- auto x // CHECK: store float {{.*}} !dbg [[DBG_F5:!.*]]
- = complex_src();
-}
-
-struct agg { int i; };
-agg agg_src();
-
-// CHECK-LABEL: define
-void f6() {
- agg x;
- // CHECK: call void @llvm.memcpy{{.*}} !dbg [[DBG_F6:!.*]]
- x
-#line 700
- = //
- agg_src();
-}
-
-// CHECK-LABEL: define
-void f7() {
- int *src1();
- int src2();
-#line 800
- int x = ( // CHECK: load {{.*}} !dbg [[DBG_F7:!.*]]
- src1())[src2()];
-}
-
-// CHECK-LABEL: define
-void f8() {
- int src1[1];
- int src2();
-#line 900
- int x = ( // CHECK: load {{.*}} !dbg [[DBG_F8:!.*]]
- src1)[src2()];
-}
-
-// CHECK-LABEL: define
-void f9(int i) {
- int src1[1][i];
- int src2();
-#line 1000
- auto x = ( // CHECK: getelementptr {{.*}} !dbg [[DBG_F9:!.*]]
- src1)[src2()];
-}
-
-inline void *operator new(decltype(sizeof(1)), void *p) noexcept { return p; }
-
-// CHECK-LABEL: define
-void f10() {
- void *void_src();
- (
- // CHECK: store {{.*}} !dbg [[DBG_F10_STORE:!.*]]
-#line 1100
- new (void_src()) int(src()));
-}
-
-// noexcept just to simplify the codegen a bit
-void fn() noexcept(true);
-
-struct bar {
- bar();
- // noexcept(false) to convolute the global dtor
- ~bar() noexcept(false);
-};
-// global ctor cleanup
-// CHECK-LABEL: define
-// CHECK: invoke{{ }}
-// CHECK: invoke{{ }}
-// CHECK: to label {{.*}}, !dbg [[DBG_GLBL_CTOR_B:!.*]]
-
-// terminate caller
-// CHECK-LABEL: define
-
-// global dtor cleanup
-// CHECK-LABEL: define
-// CHECK: invoke{{ }}
-// CHECK: invoke{{ }}
-// CHECK: to label {{.*}}, !dbg [[DBG_GLBL_DTOR_B:!.*]]
-#line 1200
-bar b[1] = { //
- (fn(), //
- bar())};
-
-// CHECK-LABEL: define{{.*}}f11
-__complex double f11() {
- __complex double f;
-// CHECK: store {{.*}} !dbg [[DBG_F11:!.*]]
-#line 1300
- return f;
-}
-
-// CHECK-LABEL: define
-void f12() {
- int f12_1();
- void f12_2(int = f12_1());
-// CHECK: call {{.*}}{{(signext )?}}i32 noundef {{.*}} !dbg [[DBG_F12:!.*]]
-#line 1400
- f12_2();
-}
-
-// CHECK-LABEL: define
-void f13() {
-// CHECK: call {{.*}} !dbg [[DBG_F13:!.*]]
-#define F13_IMPL 1, src()
- 1,
-#line 1500
- F13_IMPL;
-}
-
-struct f14_impl {
- f14_impl(int);
-};
-
-// CHECK-LABEL: define
-struct f14_use {
-// CHECK: call {{.*}}f14_impl{{.*}}, !dbg [[DBG_F14_CTOR_CALL:![0-9]*]]
-#line 1600
- f14_impl v{//
- 1};
- f14_use();
-};
-
-f14_use::f14_use() = default;
-
-// CHECK-LABEL: define
-// CHECK-LABEL: define
-void func(foo);
-void f15(foo *f) {
- func(
-// CHECK: getelementptr {{.*}}, !dbg [[DBG_F15:![0-9]*]]
-#line 1700
- f[3]);
-}
-
-// CHECK-LABEL: define
-void f16(__complex float f) {
- __complex float g = //
-// CHECK: add {{.*}}, !dbg [[DBG_F16:![0-9]*]]
-#line 1800
- f + 1;
-}
-
-// CHECK-LABEL: define
-void f17(int *x) {
- 1,
-// CHECK: getelementptr {{.*}}, !dbg [[DBG_F17:![0-9]*]]
-#line 1900
- x[1];
-}
-
-// CHECK-LABEL: define
-void f18(int a, int b) {
-// CHECK: icmp {{.*}}, !dbg [[DBG_F18_1:![0-9]*]]
-// CHECK: br {{.*}}, !dbg [[DBG_F18_2:![0-9]*]]
-#line 2000
- if (a //
- && //
- b)
- ;
-}
-
-// CHECK-LABEL: define
-void f19(int a, int b) {
-// CHECK: icmp {{.*}}, !dbg [[DBG_F19_1:![0-9]*]]
-// CHECK: br {{.*}}, !dbg [[DBG_F19_2:![0-9]*]]
-#line 2100
- if (a //
- || //
- b)
- ;
-}
-
-// CHECK-LABEL: define
-void f20(int a, int b, int c) {
-// CHECK: icmp {{.*}}, !dbg [[DBG_F20_1:![0-9]*]]
-// FIXME: Conditional operator's exprloc should be the '?' not the start of the
-// expression, then this would go in the right place. (but adding getExprLoc to
-// the ConditionalOperator breaks the ARC migration tool - need to investigate
-// further).
-// CHECK: br {{.*}}, !dbg [[DBG_F20_1]]
-#line 2200
- if (a //
- ? //
- b : c)
- ;
-}
-
-// CHECK-LABEL: define
-int f21_a(int = 0);
-void f21_b(int = f21_a());
-void f21() {
-// CHECK: call {{.*}}f21_b{{.*}}, !dbg [[DBG_F21:![0-9]*]]
-#line 2300
- f21_b();
-}
-
-// CHECK-LABEL: define
-struct f22_dtor {
- ~f22_dtor();
-};
-void f22() {
- {
- f22_dtor f;
- src();
-// CHECK: invoke {{.*}}src
-// CHECK: call {{.*}}, !dbg [[DBG_F22:![0-9]*]]
-// CHECK: call {{.*}}, !dbg [[DBG_F22]]
-#line 2400
- }
-}
-
-// CHECK-LABEL: define
-struct f23_struct {
-};
-f23_struct f23_a();
-void f23_b(f23_struct = f23_a());
-void f23() {
-// CHECK: call {{.*}}f23_a{{.*}}, !dbg [[DBG_F23:![0-9]*]]
-#line 2500
- f23_b();
-}
-
-// CHECK-LABEL: define
-void f24_a(__complex float = complex_src());
-void f24() {
-// CHECK: call {{.*}}complex_src{{.*}}, !dbg [[DBG_F24:![0-9]*]]
-#line 2600
- f24_a();
-}
-
-// CHECK-LABEL: define
-void f25_a(int x = __builtin_LINE()) {}
-void f25() {
- // CHECK: call void @_Z5f25_ai(i32 noundef {{(signext )?}}2700)
-#line 2700
- f25_a();
-}
-// CHECK: [[DBG_F1]] = !DILocation(line: 100,
-// CHECK: [[DBG_FOO_VALUE]] = !DILocation(line: 200,
-// CHECK: [[DBG_FOO_REF]] = !DILocation(line: 202,
-// CHECK: [[DBG_FOO_COMPLEX]] = !DILocation(line: 204,
-// CHECK: [[DBG_F2]] = !DILocation(line: 300,
-// CHECK: [[DBG_F3]] = !DILocation(line: 400,
-// CHECK: [[DBG_F4]] = !DILocation(line: 500,
-// CHECK: [[DBG_F5]] = !DILocation(line: 600,
-// CHECK: [[DBG_F6]] = !DILocation(line: 700,
-// CHECK: [[DBG_F7]] = !DILocation(line: 800,
-// CHECK: [[DBG_F8]] = !DILocation(line: 900,
-// CHECK: [[DBG_F9]] = !DILocation(line: 1000,
-// CHECK: [[DBG_F10_STORE]] = !DILocation(line: 1100,
-// CHECK: [[DBG_GLBL_CTOR_B]] = !DILocation(line: 1200,
-// CHECK: [[DBG_GLBL_DTOR_B]] = !DILocation(line: 0,
-// CHECK: [[DBG_F11]] = !DILocation(line: 1300,
-// CHECK: [[DBG_F12]] = !DILocation(line: 1400,
-// CHECK: [[DBG_F13]] = !DILocation(line: 1500,
-// CHECK: [[DBG_F14_CTOR_CALL]] = !DILocation(line: 1600,
-// CHECK: [[DBG_F15]] = !DILocation(line: 1700,
-// CHECK: [[DBG_F16]] = !DILocation(line: 1800,
-// CHECK: [[DBG_F17]] = !DILocation(line: 1900,
-// CHECK: [[DBG_F18_1]] = !DILocation(line: 2000,
-// CHECK: [[DBG_F18_2]] = !DILocation(line: 2001,
-// CHECK: [[DBG_F19_1]] = !DILocation(line: 2100,
-// CHECK: [[DBG_F19_2]] = !DILocation(line: 2101,
-// CHECK: [[DBG_F20_1]] = !DILocation(line: 2200,
-// CHECK: [[DBG_F23]] = !DILocation(line: 2500,
-// CHECK: [[DBG_F24]] = !DILocation(line: 2600,
diff --git a/clang/test/CodeGenCXX/debug-info-loops.cpp b/clang/test/CodeGenCXX/debug-info-loops.cpp
deleted file mode 100644
index b46acb2..0000000
--- a/clang/test/CodeGenCXX/debug-info-loops.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-// RUN: %clang -g -gcolumn-info -std=c++11 -S -emit-llvm %s -o - | FileCheck %s
-extern int v[2];
-int a = 0, b = 0;
-int main() {
-#line 100
- for (int x : v) {
- if (x)
- ++b;
- else
- ++a;
- }
-
- // CHECK: br label {{.*}}, !dbg [[DBG1:![0-9]*]], !llvm.loop [[L1:![0-9]*]]
-
-#line 200
- while (a)
- if (b)
- ++b;
- else
- ++a;
- // CHECK: br label {{.*}}, !dbg [[DBG2:![0-9]*]], !llvm.loop [[L2:![0-9]*]]
-
-#line 300
- for (unsigned i = 0; i < 100; i++) {
- a++;
- for (int y : v)
- ++b;
- }
-
- // CHECK: br label {{.*}}, !dbg [[DBG3:![0-9]*]], !llvm.loop [[L3:![0-9]*]]
- // CHECK: br label {{.*}}, !dbg [[DBG3:![0-9]*]], !llvm.loop [[L4:![0-9]*]]
-
-
- // CHECK-DAG: [[L1]] = distinct !{[[L1]], [[SLDBG1:![0-9]*]], [[ELDBG1:![0-9]*]]}
- // CHECK-DAG: [[SLDBG1]] = !DILocation(line: 100, column: 3, scope: !{{.*}})
- // CHECK-DAG: [[ELDBG1]] = !DILocation(line: 105, column: 3, scope: !{{.*}})
-
- // CHECK-DAG: [[L2]] = distinct !{[[L2]], [[SLDBG2:![0-9]*]], [[ELDBG2:![0-9]*]], [[MP:![0-9]+]]}
- // CHECK-DAG: [[SLDBG2]] = !DILocation(line: 200, column: 3, scope: !{{.*}})
- // CHECK-DAG: [[ELDBG2]] = !DILocation(line: 204, column: 9, scope: !{{.*}})
-
- // CHECK-DAG: [[L3]] = distinct !{[[L3]], [[SLDBG3:![0-9]*]], [[ELDBG3:![0-9]*]]}
- // CHECK-DAG: [[SLDBG3]] = !DILocation(line: 302, column: 5, scope: !{{.*}})
- // CHECK-DAG: [[ELDBG3]] = !DILocation(line: 303, column: 9, scope: !{{.*}})
- //
- // CHECK-DAG: [[L4]] = distinct !{[[L4]], [[SLDBG4:![0-9]*]], [[ELDBG4:![0-9]*]], [[MP]]}
- // CHECK-DAG: [[SLDBG4]] = !DILocation(line: 300, column: 3, scope: !{{.*}})
- // CHECK-DAG: [[ELDBG4]] = !DILocation(line: 304, column: 3, scope: !{{.*}})
-}
diff --git a/clang/test/CodeGenCXX/debug-info-member-call.cpp b/clang/test/CodeGenCXX/debug-info-member-call.cpp
deleted file mode 100644
index 2b60de8..0000000
--- a/clang/test/CodeGenCXX/debug-info-member-call.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-unknown_unknown -emit-llvm -debug-info-kind=standalone %s -o - | FileCheck %s
-void ext();
-
-struct Bar {
- void bar() { ext(); }
-};
-
-struct Foo {
- Bar *b;
-
- Bar *foo() { return b; }
-};
-
-void test(Foo *f) {
- f->foo()->bar();
-}
-
-// CHECK-LABEL: @_Z4testP3Foo
-// CHECK: call {{.*}} @_ZN3Foo3fooEv{{.*}}, !dbg ![[CALL1LOC:.*]]
-// CHECK: call void @_ZN3Bar3barEv{{.*}}, !dbg ![[CALL2LOC:.*]]
-
-// CHECK: ![[CALL1LOC]] = !DILocation(line: [[LINE:[0-9]+]], column: 6,
-// CHECK: ![[CALL2LOC]] = !DILocation(line: [[LINE]], column: 13,
-
diff --git a/clang/test/CodeGenCXX/debug-info-member.cpp b/clang/test/CodeGenCXX/debug-info-member.cpp
deleted file mode 100644
index 68d0252..0000000
--- a/clang/test/CodeGenCXX/debug-info-member.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-// FIXME: Check IR rather than asm, then triple is not needed.
-// RUN: %clang --target=%itanium_abi_triple -fverbose-asm -g -S %s -o - | grep DW_ACCESS_public
-class A {
-public:
- int x;
-};
-A a;
diff --git a/clang/test/CodeGenCXX/debug-info-method-nodebug.cpp b/clang/test/CodeGenCXX/debug-info-method-nodebug.cpp
deleted file mode 100644
index 0301e2f..0000000
--- a/clang/test/CodeGenCXX/debug-info-method-nodebug.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
-
-class C {
- void present();
- void absent() __attribute__((nodebug));
-};
-
-C c;
-
-// CHECK-NOT: name: "absent"
-// CHECK: name: "present"
-// CHECK-NOT: name: "absent"
diff --git a/clang/test/CodeGenCXX/debug-info-method-spec.cpp b/clang/test/CodeGenCXX/debug-info-method-spec.cpp
deleted file mode 100644
index a58e8de..0000000
--- a/clang/test/CodeGenCXX/debug-info-method-spec.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-// FIXME: Check IR rather than asm, then triple is not needed.
-// RUN: %clang --target=%itanium_abi_triple -fverbose-asm -g -S %s -o - | grep DW_AT_specification
-class A {
-public:
- void doSomething(int i) { ++i; }
-};
-
-void foo(A *a) {
- a->doSomething(2);
-}
diff --git a/clang/test/CodeGenCXX/debug-info-method.cpp b/clang/test/CodeGenCXX/debug-info-method.cpp
deleted file mode 100644
index af7103e..0000000
--- a/clang/test/CodeGenCXX/debug-info-method.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -std=c++11 -debug-info-kind=limited %s -o - | FileCheck %s
-// CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type
-// CHECK: ![[A:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_class_type, name: "A",{{.*}} identifier: "_ZTS1A")
-// CHECK: !DISubprogram(name: "foo", linkageName: "_ZN1A3fooEiS_3$_0"
-// CHECK-SAME: DIFlagProtected
-// CHECK: ![[THISTYPE:[0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[A]]
-// CHECK-SAME: DIFlagArtificial
-// CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: ![[MEMFUNTYPE:[0-9]+]]
-// CHECK: ![[MEMFUNTYPE]] = !DISubroutineType({{(cc: DW_CC_BORLAND_thiscall, )?}}types: ![[MEMFUNARGS:[0-9]+]])
-// CHECK: ![[MEMFUNARGS]] = {{.*}}, ![[THISTYPE]],
-// CHECK: !DILocalVariable(name: "this", arg: 1
-// CHECK: !DILocalVariable(arg: 2
-// CHECK: !DILocalVariable(arg: 3
-// CHECK: !DILocalVariable(arg: 4
-union {
- int a;
- float b;
-} u;
-
-class A {
-protected:
- void foo(int, A, decltype(u));
- void bar();
-};
-
-void A::foo(int, A, decltype(u)) {
-}
-
-A a;
-
-int A::*x = 0;
-int (A::*y)(int) = 0;
-
-void A::bar() { foo(0, *this, u); }
diff --git a/clang/test/CodeGenCXX/debug-info-method2.cpp b/clang/test/CodeGenCXX/debug-info-method2.cpp
deleted file mode 100644
index cc19184..0000000
--- a/clang/test/CodeGenCXX/debug-info-method2.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-// RUN: %clang_cc1 -x c++ -debug-info-kind=limited -emit-llvm < %s | FileCheck %s
-// Preserve type qualifiers in -flimit-debug-info mode.
-
-// CHECK: DW_TAG_const_type
-class A {
-public:
- int bar(int arg) const;
-};
-
-int A::bar(int arg) const{
- return arg+2;
-}
-
-int main() {
- A a;
- int i = a.bar(2);
- return i;
-}
diff --git a/clang/test/CodeGenCXX/debug-info-ms-abi.cpp b/clang/test/CodeGenCXX/debug-info-ms-abi.cpp
deleted file mode 100644
index 0ce13a02..0000000
--- a/clang/test/CodeGenCXX/debug-info-ms-abi.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-// RUN: %clang_cc1 %s -triple=i686-pc-windows-msvc -debug-info-kind=limited -gcodeview -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 %s -triple=i686-pc-windows-msvc -debug-info-kind=limited -gcodeview -gcodeview-ghash -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,GHASH
-
-// Tests that certain miscellaneous features work in the MS ABI.
-
-struct Foo {
- virtual void f();
- virtual void g();
- virtual void h();
- static void i(int, int);
- struct Nested {};
-};
-Foo f;
-Foo::Nested n;
-
-// CHECK: ![[Nested:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Nested",
-// CHECK-SAME: identifier: ".?AUNested@Foo@@"
-
-// CHECK: ![[Foo:[^ ]*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Foo",
-// CHECK-SAME: elements: ![[elements:[0-9]+]]
-// CHECK-SAME: identifier: ".?AUFoo@@"
-
-// CHECK: ![[elements]] = !{![[vshape:[0-9]+]], ![[vptr:[0-9]+]], ![[Nested]], ![[f:[0-9]+]], ![[g:[0-9]+]], ![[h:[0-9]+]], ![[i:[0-9]+]]}
-
-// CHECK: ![[vshape]] = !DIDerivedType(tag: DW_TAG_pointer_type, name: "__vtbl_ptr_type", baseType: null, size: 96)
-
-// CHECK: ![[vptr]] = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$Foo",
-// CHECK-SAME: baseType: ![[vptr_ty:[0-9]+]],
-
-// CHECK: ![[vptr_ty]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[vshape]], size: 32
-
-// CHECK: ![[f]] = !DISubprogram(name: "f",
-// CHECK-SAME: containingType: ![[Foo]], virtualIndex: 0,
-// CHECK-SAME: flags: DIFlagPrototyped | DIFlagIntroducedVirtual,
-// CHECK-SAME: spFlags: DISPFlagVirtual
-
-// CHECK: ![[g]] = !DISubprogram(name: "g",
-// CHECK-SAME: containingType: ![[Foo]], virtualIndex: 1,
-// CHECK-SAME: flags: DIFlagPrototyped | DIFlagIntroducedVirtual,
-// CHECK-SAME: spFlags: DISPFlagVirtual
-
-// CHECK: ![[h]] = !DISubprogram(name: "h",
-// CHECK-SAME: containingType: ![[Foo]], virtualIndex: 2,
-// CHECK-SAME: flags: DIFlagPrototyped | DIFlagIntroducedVirtual,
-// CHECK-SAME: spFlags: DISPFlagVirtual
-
-// CHECK: ![[i]] = !DISubprogram(name: "i",
-// CHECK-SAME: flags: DIFlagPrototyped | DIFlagStaticMember
-// CHECK-NEXT: ![[dummy:[0-9]+]] = !DISubroutineType(types: ![[Signature:[0-9]+]])
-// CHECK: ![[Signature]] = !{null, ![[BasicInt:[0-9]+]], ![[BasicInt]]}
-// CHECK: ![[BasicInt]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-
-// CHECK: !{{[0-9]+}} = !{i32 2, !"CodeView", i32 1}
-// GHASH: !{{[0-9]+}} = !{i32 2, !"CodeViewGHash", i32 1}
diff --git a/clang/test/CodeGenCXX/debug-info-ms-anonymous-tag.cpp b/clang/test/CodeGenCXX/debug-info-ms-anonymous-tag.cpp
deleted file mode 100644
index 5e2cb21..0000000
--- a/clang/test/CodeGenCXX/debug-info-ms-anonymous-tag.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-pc-win32 -debug-info-kind=limited -gcodeview %s -emit-llvm -o - | FileCheck %s
-
-typedef struct {
-} test1;
-
-test1 gv1;
-
-struct {
-} test2;
-void *use_test2 = &test2;
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "<unnamed-type-test2>"
-
-typedef struct {
-} *test3;
-test3 gv3;
-void *use_test3 = &gv3;
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "<unnamed-type-test3>"
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "test1"
diff --git a/clang/test/CodeGenCXX/debug-info-ms-bitfields.cpp b/clang/test/CodeGenCXX/debug-info-ms-bitfields.cpp
deleted file mode 100644
index e423301..0000000
--- a/clang/test/CodeGenCXX/debug-info-ms-bitfields.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-pc-win32 -debug-info-kind=limited -gcodeview %s -emit-llvm -o - | FileCheck %s
-
-#pragma pack(1)
-struct S {
- char : 8;
- short : 8;
- short x : 8;
-} s;
-
-// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "x", {{.*}}, size: 8, offset: 16, flags: DIFlagBitField, extraData: i64 8)
diff --git a/clang/test/CodeGenCXX/debug-info-ms-dtor-thunks.cpp b/clang/test/CodeGenCXX/debug-info-ms-dtor-thunks.cpp
deleted file mode 100644
index 7018745..0000000
--- a/clang/test/CodeGenCXX/debug-info-ms-dtor-thunks.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-// RUN: %clang_cc1 -triple i686--windows -emit-llvm -debug-info-kind=line-tables-only -x c++ %s -fms-extensions -o - | FileCheck %s
-// RUN: %clang_cc1 -triple i686--windows -emit-llvm -debug-info-kind=line-directives-only -x c++ %s -fms-extensions -o - | FileCheck %s
-
-struct __declspec(dllexport) S { virtual ~S(); };
-struct __declspec(dllexport) T { virtual ~T(); };
-struct __declspec(dllexport) U : S, T { virtual ~U(); };
-
-// CHECK-LABEL: define {{.*}} @"??_GS@@UAEPAXI@Z"
-// CHECK: call x86_thiscallcc void @"??1S@@UAE@XZ"(ptr {{[^,]*}} %this1){{.*}}!dbg !{{[0-9]+}}
-
-// CHECK-LABEL: define {{.*}} @"??_GT@@UAEPAXI@Z"
-// CHECK: call x86_thiscallcc void @"??1T@@UAE@XZ"(ptr {{[^,]*}} %this1){{.*}}!dbg !{{[0-9]+}}
-
-// CHECK-LABEL: define {{.*}} @"??_GU@@UAEPAXI@Z"
-// CHECK: call x86_thiscallcc void @"??1U@@UAE@XZ"(ptr {{[^,]*}} %this1){{.*}}!dbg !{{[0-9]+}}
diff --git a/clang/test/CodeGenCXX/debug-info-ms-novtable.cpp b/clang/test/CodeGenCXX/debug-info-ms-novtable.cpp
deleted file mode 100644
index d880060..0000000
--- a/clang/test/CodeGenCXX/debug-info-ms-novtable.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-// RUN: %clang -g -S -emit-llvm -fms-extensions -fms-compatibility -target x86_64-pc-windows-msvc -o - %s | FileCheck %s
-
-// CHECK-DAG: ![[FOO:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_class_type, name: "Foo", file: !{{[0-9]+}}, line: {{[0-9]+}}, size: 128, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: ![[FOO_ELEMENTS:[0-9]+]], vtableHolder: ![[FOO]], identifier: ".?AVFoo@@")
-// CHECK-DAG: ![[FOO_ELEMENTS]] = !{![[FOO_VTBL_TY:[0-9]+]], ![[FOO_VTBL_MEMBER:[0-9]+]], ![[FOO_MEMBER:[0-9]+]], ![[FOO_DUMMY:[0-9]+]]}
-// CHECK-DAG: ![[FOO_VTBL_TY]] = !DIDerivedType(tag: DW_TAG_pointer_type, name: "__vtbl_ptr_type", baseType: null, size: 64)
-// CHECK-DAG: ![[FOO_VTBL_MEMBER]] = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$Foo", scope: !10, file: !{{[0-9]+}}, baseType: ![[FOO_VTBL_PTR_TY:[0-9]+]], size: 64, flags: DIFlagArtificial)
-// CHECK-DAG: ![[FOO_VTBL_PTR_TY]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[FOO_VTBL_TY]], size: 64)
-// CHECK-DAG: ![[FOO_MEMBER]] = !DIDerivedType(tag: DW_TAG_member, name: "member", scope: ![[FOO]], file: !{{[0-9]+}}, line: {{[0-9]+}}, baseType: !{{[0-9]+}}, size: 32, offset: 64)
-// CHECK-DAG: ![[FOO_DUMMY]] = !DISubprogram(name: "dummy", linkageName: "?dummy@Foo@@EEAAXXZ", scope: ![[FOO]], file: !{{[0-9]+}}, line: {{[0-9]+}}, type: !{{[0-9]+}}, scopeLine: {{[0-9]+}}, containingType: ![[FOO]], virtualIndex: 0, flags: DIFlagPrototyped | DIFlagIntroducedVirtual, spFlags: DISPFlagVirtual)
-class __declspec(novtable) Foo {
- virtual void dummy() noexcept {};
-
- int member = 1;
-};
-
-void foo(Foo) {}
diff --git a/clang/test/CodeGenCXX/debug-info-ms-ptr-to-member.cpp b/clang/test/CodeGenCXX/debug-info-ms-ptr-to-member.cpp
deleted file mode 100644
index 1f4c904..0000000
--- a/clang/test/CodeGenCXX/debug-info-ms-ptr-to-member.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-windows -debug-info-kind=limited -gcodeview %s -emit-llvm -o - | FileCheck %s
-
-// Test member pointer inheritance models.
-
-struct A { int a; };
-struct B { int b; };
-struct C : A, B { int c; };
-struct D : virtual C { int d; };
-struct E;
-int A::*pmd_a;
-int C::*pmd_b;
-int D::*pmd_c;
-int E::*pmd_d;
-void (A::*pmf_a)();
-void (C::*pmf_b)();
-void (D::*pmf_c)();
-void (E::*pmf_d)();
-
-// Test incomplete MPTs, which don't have inheritance models.
-
-struct Incomplete;
-int Incomplete::**ppmd;
-void (Incomplete::**ppmf)();
-
-// CHECK: distinct !DIGlobalVariable(name: "pmd_a", {{.*}} type: ![[pmd_a:[^, ]*]], {{.*}})
-// CHECK: distinct !DIGlobalVariable(name: "pmd_b", {{.*}} type: ![[pmd_b:[^, ]*]], {{.*}})
-// CHECK: ![[pmd_b]] = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !{{.*}}, size: 32, flags: DIFlagMultipleInheritance, {{.*}})
-// CHECK: distinct !DIGlobalVariable(name: "pmd_c", {{.*}} type: ![[pmd_c:[^, ]*]], {{.*}})
-// CHECK: ![[pmd_c]] = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !{{.*}}, size: 64, flags: DIFlagVirtualInheritance, {{.*}})
-// CHECK: distinct !DIGlobalVariable(name: "pmd_d", {{.*}} type: ![[pmd_d:[^, ]*]], {{.*}})
-// CHECK: ![[pmd_d]] = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !{{.*}}, size: 96,
-// CHECK-NOT: flags:
-// CHECK-SAME: ){{$}}
-
-// CHECK: distinct !DIGlobalVariable(name: "pmf_a", {{.*}} type: ![[pmf_a:[^, ]*]], {{.*}})
-// CHECK: ![[pmf_a]] = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !{{.*}}, size: 64, flags: DIFlagSingleInheritance, {{.*}})
-// CHECK: distinct !DIGlobalVariable(name: "pmf_b", {{.*}} type: ![[pmf_b:[^, ]*]], {{.*}})
-// CHECK: ![[pmf_b]] = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !{{.*}}, size: 128, flags: DIFlagMultipleInheritance, {{.*}})
-// CHECK: distinct !DIGlobalVariable(name: "pmf_c", {{.*}} type: ![[pmf_c:[^, ]*]], {{.*}})
-// CHECK: ![[pmf_c]] = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !{{.*}}, size: 128, flags: DIFlagVirtualInheritance, {{.*}})
-// CHECK: distinct !DIGlobalVariable(name: "pmf_d", {{.*}} type: ![[pmf_d:[^, ]*]], {{.*}})
-// CHECK: ![[pmf_d]] = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !{{.*}}, size: 192,
-// CHECK-NOT: flags:
-// CHECK-SAME: ){{$}}
-
-// CHECK: distinct !DIGlobalVariable(name: "ppmd", {{.*}} type: ![[ppmd:[^, ]*]], {{.*}})
-// CHECK: ![[ppmd]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[ppmd2:[^ ]*]], size: 64)
-// CHECK: ![[ppmd2]] = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !{{[0-9]*}}, extraData: !{{[0-9]*}}){{$}}
-// CHECK: distinct !DIGlobalVariable(name: "ppmf", {{.*}} type: ![[ppmf:[^, ]*]], {{.*}})
-// CHECK: ![[ppmf]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[ppmf2:[^ ]*]], size: 64)
-// CHECK: ![[ppmf2]] = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !{{[0-9]*}}, extraData: !{{[0-9]*}}){{$}}
-
-// CHECK: ![[pmd_a]] = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !{{.*}}, size: 32, flags: DIFlagSingleInheritance, {{.*}})
diff --git a/clang/test/CodeGenCXX/debug-info-ms-vbase.cpp b/clang/test/CodeGenCXX/debug-info-ms-vbase.cpp
deleted file mode 100644
index 04c9a6d..0000000
--- a/clang/test/CodeGenCXX/debug-info-ms-vbase.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-// RUN: %clang_cc1 %s -triple=i686-pc-windows-msvc -debug-info-kind=limited -gcodeview -emit-llvm -o - | FileCheck %s
-
-// Tests virtual bases in the MS ABI.
-
-// CHECK: ![[NoPrimaryBase:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "NoPrimaryBase",
-// CHECK-SAME: elements: ![[elements:[0-9]+]]
-
-// CHECK: ![[elements]] = !{![[NoPrimaryBase_base:[0-9]+]]}
-
-// CHECK: ![[NoPrimaryBase_base]] = !DIDerivedType(tag: DW_TAG_inheritance, scope: ![[NoPrimaryBase]],
-// CHECK-SAME: baseType: ![[HasVirtualMethod:[0-9]+]], offset: 4, flags: DIFlagVirtual, extraData: i32 0)
-
-// CHECK: ![[HasVirtualMethod]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "HasVirtualMethod"
-
-// CHECK: ![[HasPrimaryBase:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "HasPrimaryBase",
-// CHECK-SAME: elements: ![[elements:[0-9]+]]
-
-// CHECK: ![[elements]] = !{![[SecondaryVTable_base:[0-9]+]], ![[HasVirtualMethod_base:[0-9]+]], ![[vshape:[0-9]+]]}
-
-// CHECK: ![[SecondaryVTable_base]] = !DIDerivedType(tag: DW_TAG_inheritance, scope: ![[HasPrimaryBase]],
-// CHECK-SAME: baseType: ![[SecondaryVTable:[0-9]+]], offset: 4, flags: DIFlagVirtual, extraData: i32 4)
-
-// CHECK: ![[SecondaryVTable]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "SecondaryVTable"
-
-// CHECK: ![[HasVirtualMethod_base]] = !DIDerivedType(tag: DW_TAG_inheritance, scope: ![[HasPrimaryBase]], baseType: ![[HasVirtualMethod]], extraData: i32 0)
-
-// CHECK: ![[HasIndirectVirtualBase:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "HasIndirectVirtualBase"
-// CHECK-SAME: elements: ![[elements:[0-9]+]]
-
-// CHECK: !DIDerivedType(tag: DW_TAG_inheritance, scope: ![[HasIndirectVirtualBase]], baseType: ![[HasPrimaryBase]]
-// CHECK-NOT: DIFlagIndirectVirtualBase
-// CHECK-SAME: )
-
-// CHECK: !DIDerivedType(tag: DW_TAG_inheritance, scope: ![[HasIndirectVirtualBase]], baseType: ![[SecondaryVTable]]
-// CHECK-SAME: flags:
-// CHECK-SAME: DIFlagIndirectVirtualBase
-
-// CHECK: ![[DynamicNoVFPtr:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "DynamicNoVFPtr",
-// CHECK-SAME: elements: ![[elements:[0-9]+]]
-
-// CHECK: ![[elements]] = !{![[POD_base:[0-9]+]]}
-
-// CHECK: ![[POD_base]] = !DIDerivedType(tag: DW_TAG_inheritance, scope: ![[DynamicNoVFPtr]],
-// CHECK-SAME: baseType: ![[POD:[0-9]+]], offset: 4, flags: DIFlagVirtual, extraData: i32 0)
-
-// CHECK: ![[POD]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "POD"
-
-struct POD { int pod; };
-
-struct DynamicNoVFPtr : virtual POD { };
-
-DynamicNoVFPtr dynamic_no_vfptr;
-
-struct HasVirtualMethod { virtual void f(); };
-
-struct NoPrimaryBase : virtual HasVirtualMethod { };
-
-NoPrimaryBase no_primary_base;
-
-struct SecondaryVTable { virtual void g(); };
-
-struct HasPrimaryBase : virtual SecondaryVTable, HasVirtualMethod { };
-
-HasPrimaryBase has_primary_base;
-
-struct HasIndirectVirtualBase : public HasPrimaryBase {};
-
-HasIndirectVirtualBase has_indirect_virtual_base;
diff --git a/clang/test/CodeGenCXX/debug-info-namespace.cpp b/clang/test/CodeGenCXX/debug-info-namespace.cpp
deleted file mode 100644
index 7885883..0000000
--- a/clang/test/CodeGenCXX/debug-info-namespace.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-// RUN: %clang_cc1 -std=c++11 -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s
-// RUN: %clang_cc1 -std=c++11 -debug-info-kind=line-tables-only -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-GMLT %s
-// RUN: %clang_cc1 -std=c++11 -debug-info-kind=line-directives-only -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-GMLI %s
-// RUN: %clang_cc1 -std=c++11 -debug-info-kind=standalone -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-NOLIMIT %s
-
-namespace A {
-#line 1 "foo.cpp"
-namespace B {
-extern int i;
-int f1() { return 0; }
-void f1(int) { }
-struct foo;
-struct bar { };
-typedef bar baz;
-extern int var_decl;
-void func_decl(void);
-extern int var_fwd;
-void func_fwd(void);
-}
-}
-namespace A {
-using namespace B;
-}
-
-using namespace A;
-namespace E = A;
-int B::i = f1();
-int func(bool b) {
- if (b) {
- using namespace A::B;
- return i;
- }
- using namespace A;
- using B::foo;
- using B::bar;
- using B::f1;
- using B::i;
- using B::baz;
- namespace X = A;
- namespace Y = X;
- using B::var_decl;
- using B::func_decl;
- using B::var_fwd;
- using B::func_fwd;
- return i + X::B::i + Y::B::i;
-}
-
-namespace A {
-using B::i;
-namespace B {
-int var_fwd = i;
-}
-inline namespace I {
-int var_i;
-}
-}
-namespace {
-int anonymous;
-}
-void B::func_fwd() {
- anonymous = 0;
-}
-
-namespace C {
- void c();
-}
-void C::c() {}
-
-// This should work even if 'i' and 'func' were declarations & not definitions,
-// but it doesn't yet.
-
-// CHECK: [[I:![0-9]+]] = distinct !DIGlobalVariable(name: "i",{{.*}} scope: [[NS:![0-9]+]],
-// CHECK: [[NS]] = !DINamespace(name: "B", scope: [[CTXT:![0-9]+]])
-// CHECK: [[CTXT]] = !DINamespace(name: "A", scope: null)
-// CHECK: [[FOOCPP:.*]] = !DIFile(filename: "foo.cpp"
-// CHECK: [[VAR_FWD:![0-9]+]] = distinct !DIGlobalVariable(name: "var_fwd",{{.*}} scope: [[NS]],
-// CHECK-SAME: line: 44
-// CHECK-SAME: isDefinition: true
-// CHECK: distinct !DIGlobalVariable(name: "var_i",{{.*}} scope: [[INLINE:![0-9]+]],
-// CHECK: [[INLINE]] = !DINamespace(name: "I", scope: [[CTXT]], exportSymbols: true)
-// CHECK: !DINamespace(scope: null)
-// CHECK: [[CU:![0-9]+]] = distinct !DICompileUnit(
-// CHECK-SAME: imports: [[MODULES:![0-9]*]]
-// CHECK: [[MODULES]] = !{[[M1:![0-9]+]], [[M2:![0-9]+]], [[M3:![0-9]+]], [[M4:![0-9]+]]}
-// CHECK: [[M1]] = !DIImportedEntity(tag: DW_TAG_imported_module, scope: [[CTXT]], entity: [[NS]], file: [[FOOCPP]], line: 15)
-// CHECK: [[M2]] = !DIImportedEntity(tag: DW_TAG_imported_module, scope: [[CU]], entity: [[CTXT]],
-// CHECK: [[M3]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, name: "E", scope: [[CU]], entity: [[CTXT]], file: [[FOOCPP]], line: 19)
-// CHECK: [[M4]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[CTXT]], entity: [[I]]
-// CHECK: [[F1:![0-9]+]] = distinct !DISubprogram(name: "f1",{{.*}} line: 4
-// CHECK-SAME: DISPFlagDefinition
-// CHECK: [[FUNC:![0-9]+]] = distinct !DISubprogram(name: "func",{{.*}} DISPFlagDefinition
-// CHECK-SAME: retainedNodes: [[FUNC_NODES:![0-9]*]]
-// CHECK: [[FUNC_NODES]] = !{[[M5:![0-9]+]], [[M6:![0-9]+]], [[M7:![0-9]+]], [[M8:![0-9]+]], [[M9:![0-9]+]], [[M10:![0-9]+]], [[M11:![0-9]+]], [[M12:![0-9]+]], [[M13:![0-9]+]], [[M14:![0-9]+]], [[M15:![0-9]+]], [[M16:![0-9]+]], [[M17:![0-9]+]]}
-// CHECK: [[M5]] = !DIImportedEntity(tag: DW_TAG_imported_module, scope: [[LEX2:![0-9]+]], entity: [[NS]], file: [[FOOCPP]], line: 23)
-// CHECK: [[LEX2]] = distinct !DILexicalBlock(scope: [[LEX1:![0-9]+]], file: [[FOOCPP]],
-// CHECK: [[LEX1]] = distinct !DILexicalBlock(scope: [[FUNC:![0-9]+]], file: [[FOOCPP]],
-// CHECK: [[M6]] = !DIImportedEntity(tag: DW_TAG_imported_module, scope: [[FUNC]], entity: [[CTXT]],
-// CHECK: [[M7]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[FOO:![0-9]+]], file: [[FOOCPP]], line: 27)
-// CHECK: [[FOO]] = !DICompositeType(tag: DW_TAG_structure_type, name: "foo",
-// CHECK-SAME: line: 5
-// CHECK-SAME: DIFlagFwdDecl
-// CHECK: [[M8]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[BAR:![0-9]+]]
-// CHECK: [[BAR]] = !DICompositeType(tag: DW_TAG_structure_type, name: "bar",
-// CHECK-SAME: line: 6
-// CHECK-SAME: DIFlagFwdDecl
-// CHECK: [[M9]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[F1]]
-// CHECK: [[M10]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[I]]
-// CHECK: [[M11]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[BAZ:![0-9]+]]
-// CHECK: [[BAZ]] = !DIDerivedType(tag: DW_TAG_typedef, name: "baz", scope: [[NS]], file: [[FOOCPP]],
-// CHECK-SAME: baseType: [[BAR]]
-// CHECK: [[M12]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, name: "X", scope: [[FUNC]], entity: [[CTXT]]
-// CHECK: [[M13]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, name: "Y", scope: [[FUNC]], entity: [[M12]]
-// CHECK: [[M14]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[VAR_DECL:![0-9]+]]
-// CHECK: [[VAR_DECL]] = !DIGlobalVariable(name: "var_decl", linkageName: "{{[^"]*var_decl[^"]*}}", scope: [[NS]],{{.*}} line: 8,
-// CHECK: [[M15]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[FUNC_DECL:![0-9]+]]
-// CHECK: [[FUNC_DECL]] = !DISubprogram(name: "func_decl",
-// CHECK-SAME: scope: [[NS]], file: [[FOOCPP]], line: 9
-// CHECK: [[M16]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[VAR_FWD:![0-9]+]]
-// CHECK: [[M17]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[FUNC_FWD:![0-9]+]]
-// CHECK: [[FUNC_FWD]] = distinct !DISubprogram(name: "func_fwd",{{.*}} line: 53,{{.*}} DISPFlagDefinition
-// CHECK: distinct !DISubprogram(name: "c",{{.*}}, scope: ![[C:[0-9]+]],{{.*}}, line: 60,{{.*}} DISPFlagDefinition
-// CHECK: ![[C]] = !DINamespace(name: "C",
-
-// CHECK-GMLT: [[CU:![0-9]+]] = distinct !DICompileUnit(
-// CHECK-GMLT-SAME: emissionKind: LineTablesOnly,
-// CHECK-GMLT-NOT: imports:
-
-// CHECK-GMLI: [[CU:![0-9]+]] = distinct !DICompileUnit(
-// CHECK-GMLI-SAME: emissionKind: DebugDirectivesOnly,
-// CHECK-GMLI-NOT: imports:
-
-// CHECK-NOLIMIT: !DICompositeType(tag: DW_TAG_structure_type, name: "bar",{{.*}} line: 6,
-// CHECK-NOLIMIT-NOT: DIFlagFwdDecl
-// CHECK-NOLIMIT-SAME: ){{$}}
diff --git a/clang/test/CodeGenCXX/debug-info-nested-exprs.cpp b/clang/test/CodeGenCXX/debug-info-nested-exprs.cpp
deleted file mode 100644
index 8f07508..0000000
--- a/clang/test/CodeGenCXX/debug-info-nested-exprs.cpp
+++ /dev/null
@@ -1,202 +0,0 @@
-// RUN: %clang_cc1 -triple=x86_64-pc-windows-msvc -debug-info-kind=limited \
-// RUN: -std=c++11 -gcodeview -gno-column-info -emit-llvm -o - %s \
-// RUN: | FileCheck -check-prefix=NONEST %s
-// RUN: %clang_cc1 -triple=x86_64-pc-windows-msvc -debug-info-kind=limited \
-// RUN: -std=c++11 -gcodeview -emit-llvm -o - %s \
-// RUN: | FileCheck -check-prefix=COLUMNS %s
-// RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -debug-info-kind=limited \
-// RUN: -std=c++11 -gno-column-info -emit-llvm -o - %s | FileCheck -check-prefix=NESTED %s
-// RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -debug-info-kind=limited \
-// RUN: -std=c++11 -emit-llvm -o - %s \
-// RUN: | FileCheck -check-prefix=COLUMNS %s
-
-class Foo {
-public:
- static Foo create();
- void func();
- int *begin();
- int *end();
-};
-
-int bar(int x, int y);
-int baz(int x, int y);
-int qux(int x, int y);
-int onearg(int x);
-int noargs();
-int noargs1();
-Foo range(int x);
-
-int foo(int x, int y, int z) {
- int a = bar(x, y) +
- baz(x, z) +
- qux(y, z);
- // NONEST: call noundef i32 @{{.*}}bar{{.*}}, !dbg ![[LOC:[0-9]+]]
- // NONEST: call noundef i32 @{{.*}}baz{{.*}}, !dbg ![[LOC]]
- // NONEST: call noundef i32 @{{.*}}qux{{.*}}, !dbg ![[LOC]]
- // NONEST: store i32 {{.*}}, ptr %a,{{.*}} !dbg ![[LOC]]
- // NESTED: call noundef i32 @{{.*}}bar{{.*}}, !dbg ![[BAR:[0-9]+]]
- // NESTED: call noundef i32 @{{.*}}baz{{.*}}, !dbg ![[BAZ:[0-9]+]]
- // NESTED: call noundef i32 @{{.*}}qux{{.*}}, !dbg ![[QUX:[0-9]+]]
- // NESTED: store i32 {{.*}}, ptr %a,{{.*}} !dbg ![[BAR]]
- // COLUMNS: call noundef i32 @{{.*}}bar{{.*}}, !dbg ![[BAR:[0-9]+]]
- // COLUMNS: call noundef i32 @{{.*}}baz{{.*}}, !dbg ![[BAZ:[0-9]+]]
- // COLUMNS: call noundef i32 @{{.*}}qux{{.*}}, !dbg ![[QUX:[0-9]+]]
- // COLUMNS: store i32 {{.*}}, ptr %a,{{.*}} !dbg ![[DECLA:[0-9]+]]
-
- int i = 1, b = 0, c = 0;
- // NONEST: store i32 1, ptr %i,{{.*}} !dbg ![[ILOC:[0-9]+]]
- // NONEST: store i32 0, ptr %b,{{.*}} !dbg ![[ILOC]]
- // NONEST: store i32 0, ptr %c,{{.*}} !dbg ![[ILOC]]
- // NESTED: store i32 1, ptr %i,{{.*}} !dbg ![[ILOC:[0-9]+]]
- // NESTED: store i32 0, ptr %b,{{.*}} !dbg ![[ILOC]]
- // NESTED: store i32 0, ptr %c,{{.*}} !dbg ![[ILOC]]
- // COLUMNS: store i32 1, ptr %i,{{.*}} !dbg ![[ILOC:[0-9]+]]
- // COLUMNS: store i32 0, ptr %b,{{.*}} !dbg ![[BLOC:[0-9]+]]
- // COLUMNS: store i32 0, ptr %c,{{.*}} !dbg ![[CLOC:[0-9]+]]
-
- while (i > 0) {
- b = bar(a, b);
- --i;
- }
- // NONEST: call noundef i32 @{{.*}}bar{{.*}}, !dbg ![[WHILE1:[0-9]+]]
- // NONEST: store i32 %{{[^,]+}}, ptr %i,{{.*}} !dbg ![[WHILE2:[0-9]+]]
- // NESTED: call noundef i32 @{{.*}}bar{{.*}}, !dbg ![[WHILE1:[0-9]+]]
- // NESTED: store i32 %{{[^,]+}}, ptr %i,{{.*}} !dbg ![[WHILE2:[0-9]+]]
- // COLUMNS: call noundef i32 @{{.*}}bar{{.*}}, !dbg ![[WHILE1:[0-9]+]]
- // COLUMNS: store i32 %{{[^,]+}}, ptr %i,{{.*}} !dbg ![[WHILE2:[0-9]+]]
-
- for (i = 0; i < 1; i++) {
- b = bar(a, b);
- c = qux(a, c);
- }
- // NONEST: call noundef i32 @{{.*}}bar{{.*}}, !dbg ![[FOR1:[0-9]+]]
- // NONEST: call noundef i32 @{{.*}}qux{{.*}}, !dbg ![[FOR2:[0-9]+]]
- // NESTED: call noundef i32 @{{.*}}bar{{.*}}, !dbg ![[FOR1:[0-9]+]]
- // NESTED: call noundef i32 @{{.*}}qux{{.*}}, !dbg ![[FOR2:[0-9]+]]
- // COLUMNS: call noundef i32 @{{.*}}bar{{.*}}, !dbg ![[FOR1:[0-9]+]]
- // COLUMNS: call noundef i32 @{{.*}}qux{{.*}}, !dbg ![[FOR2:[0-9]+]]
-
- if (a < b) {
- int t = a;
- a = b;
- b = t;
- }
- // NONEST: store i32 %{{[^,]+}}, ptr %t,{{.*}} !dbg ![[IF1:[0-9]+]]
- // NONEST: store i32 %{{[^,]+}}, ptr %a,{{.*}} !dbg ![[IF2:[0-9]+]]
- // NONEST: store i32 %{{[^,]+}}, ptr %b,{{.*}} !dbg ![[IF3:[0-9]+]]
- // NESTED: store i32 %{{[^,]+}}, ptr %t,{{.*}} !dbg ![[IF1:[0-9]+]]
- // NESTED: store i32 %{{[^,]+}}, ptr %a,{{.*}} !dbg ![[IF2:[0-9]+]]
- // NESTED: store i32 %{{[^,]+}}, ptr %b,{{.*}} !dbg ![[IF3:[0-9]+]]
- // COLUMNS: store i32 %{{[^,]+}}, ptr %t,{{.*}} !dbg ![[IF1:[0-9]+]]
- // COLUMNS: store i32 %{{[^,]+}}, ptr %a,{{.*}} !dbg ![[IF2:[0-9]+]]
- // COLUMNS: store i32 %{{[^,]+}}, ptr %b,{{.*}} !dbg ![[IF3:[0-9]+]]
-
- int d = onearg(
- noargs());
- // NONEST: call noundef i32 @{{.*}}noargs{{.*}}, !dbg ![[DECLD:[0-9]+]]
- // NONEST: call noundef i32 @{{.*}}onearg{{.*}}, !dbg ![[DECLD]]
- // NONEST: store i32 %{{[^,]+}}, ptr %d,{{.*}} !dbg ![[DECLD]]
- // NESTED: call noundef i32 @{{.*}}noargs{{.*}}, !dbg ![[DNOARGS:[0-9]+]]
- // NESTED: call noundef i32 @{{.*}}onearg{{.*}}, !dbg ![[DECLD:[0-9]+]]
- // NESTED: store i32 %{{[^,]+}}, ptr %d,{{.*}} !dbg ![[DECLD]]
- // COLUMNS: call noundef i32 @{{.*}}noargs{{.*}}, !dbg ![[DNOARGS:[0-9]+]]
- // COLUMNS: call noundef i32 @{{.*}}onearg{{.*}}, !dbg ![[DONEARG:[0-9]+]]
- // COLUMNS: store i32 %{{[^,]+}}, ptr %d,{{.*}} !dbg ![[DECLD:[0-9]+]]
-
- d = onearg(noargs());
- // NONEST: call noundef i32 @{{.*}}noargs{{.*}}, !dbg ![[SETD:[0-9]+]]
- // NONEST: call noundef i32 @{{.*}}onearg{{.*}}, !dbg ![[SETD]]
- // NONEST: store i32 %{{[^,]+}}, ptr %d,{{.*}} !dbg ![[SETD]]
- // NESTED: call noundef i32 @{{.*}}noargs{{.*}}, !dbg ![[SETD:[0-9]+]]
- // NESTED: call noundef i32 @{{.*}}onearg{{.*}}, !dbg ![[SETD]]
- // NESTED: store i32 %{{[^,]+}}, ptr %d,{{.*}} !dbg ![[SETD]]
- // COLUMNS: call noundef i32 @{{.*}}noargs{{.*}}, !dbg ![[SETDNOARGS:[0-9]+]]
- // COLUMNS: call noundef i32 @{{.*}}onearg{{.*}}, !dbg ![[SETDONEARG:[0-9]+]]
- // COLUMNS: store i32 %{{[^,]+}}, ptr %d,{{.*}} !dbg ![[SETD:[0-9]+]]
-
- for (const auto x : range(noargs())) noargs1();
- // NONEST: call noundef i32 @{{.*}}noargs{{.*}}, !dbg ![[RANGEFOR:[0-9]+]]
- // NONEST: call {{.+}} @{{.*}}range{{.*}}, !dbg ![[RANGEFOR]]
- // NONEST: call noundef i32 @{{.*}}noargs1{{.*}}, !dbg ![[RANGEFOR_BODY:[0-9]+]]
- // NESTED: call noundef i32 @{{.*}}noargs{{.*}}, !dbg ![[RANGEFOR:[0-9]+]]
- // NESTED: call {{.+}} @{{.*}}range{{.*}}, !dbg ![[RANGEFOR]]
- // NESTED: call noundef i32 @{{.*}}noargs1{{.*}}, !dbg ![[RANGEFOR_BODY:[0-9]+]]
- // COLUMNS: call noundef i32 @{{.*}}noargs{{.*}}, !dbg ![[RANGEFOR_NOARGS:[0-9]+]]
- // COLUMNS: call {{.+}} @{{.*}}range{{.*}}, !dbg ![[RANGEFOR_RANGE:[0-9]+]]
- // COLUMNS: call noundef i32 @{{.*}}noargs1{{.*}}, !dbg ![[RANGEFOR_BODY:[0-9]+]]
-
- if (noargs() && noargs1()) {
- Foo::create().func();
- }
- // NONEST: call noundef i32 @{{.*}}noargs{{.*}}, !dbg ![[AND:[0-9]+]]
- // NONEST: call noundef i32 @{{.*}}noargs1{{.*}}, !dbg ![[AND]]
- // NONEST: call {{.+}} @{{.*}}create{{.*}}, !dbg ![[AND_BODY:[0-9]+]]
- // NONEST: call void @{{.*}}func{{.*}}, !dbg ![[AND_BODY]]
- // NESTED: call noundef i32 @{{.*}}noargs{{.*}}, !dbg ![[AND:[0-9]+]]
- // NESTED: call noundef i32 @{{.*}}noargs1{{.*}}, !dbg ![[AND]]
- // NESTED: call {{.+}} @{{.*}}create{{.*}}, !dbg ![[AND_BODY:[0-9]+]]
- // NESTED: call void @{{.*}}func{{.*}}, !dbg ![[AND_BODY]]
- // COLUMNS: call noundef i32 @{{.*}}noargs{{.*}}, !dbg ![[ANDLHS:[0-9]+]]
- // COLUMNS: call noundef i32 @{{.*}}noargs1{{.*}}, !dbg ![[ANDRHS:[0-9]+]]
- // COLUMNS: call {{.+}} @{{.*}}create{{.*}}, !dbg ![[AND_CREATE:[0-9]+]]
- // COLUMNS: call void @{{.*}}func{{.*}}, !dbg ![[AND_FUNC:[0-9]+]]
-
- return a -
- (b * z);
- // NONEST: mul nsw i32 {{.*}}, !dbg ![[RETLOC:[0-9]+]]
- // NONEST: sub nsw i32 {{.*}}, !dbg ![[RETLOC]]
- // NONEST: ret i32 {{.*}}, !dbg ![[RETLOC]]
- // NESTED: mul nsw i32 {{.*}}, !dbg ![[RETMUL:[0-9]+]]
- // NESTED: sub nsw i32 {{.*}}, !dbg ![[RETSUB:[0-9]+]]
- // NESTED: ret i32 {{.*}}, !dbg !
- // COLUMNS: mul nsw i32 {{.*}}, !dbg ![[RETMUL:[0-9]+]]
- // COLUMNS: sub nsw i32 {{.*}}, !dbg ![[RETSUB:[0-9]+]]
- // COLUMNS: ret i32 {{.*}}, !dbg !
-}
-
-// NONEST: ![[WHILE1]] = !DILocation(
-// NONEST: ![[WHILE2]] = !DILocation(
-// NONEST: ![[FOR1]] = !DILocation(
-// NONEST: ![[FOR2]] = !DILocation(
-// NONEST: ![[IF1]] = !DILocation(
-// NONEST: ![[IF2]] = !DILocation(
-// NONEST: ![[IF3]] = !DILocation(
-// NONEST: ![[RANGEFOR]] = !DILocation(
-// NONEST-SAME: line: [[RANGEFOR_LINE:[0-9]+]]
-// NONEST: ![[RANGEFOR_BODY]] = !DILocation(
-// NONEST-SAME: line: [[RANGEFOR_LINE]]
-
-// NESTED: ![[BAR]] = !DILocation(
-// NESTED: ![[BAZ]] = !DILocation(
-// NESTED: ![[QUX]] = !DILocation(
-// NESTED: ![[DECLD]] = !DILocation
-// NESTED: ![[DNOARGS]] = !DILocation
-// NESTED: ![[RANGEFOR]] = !DILocation(
-// NESTED-SAME: line: [[RANGEFOR_LINE:[0-9]+]]
-// NESTED: ![[RANGEFOR_BODY]] = !DILocation(
-// NESTED-SAME: line: [[RANGEFOR_LINE]]
-// NESTED: ![[RETSUB]] = !DILocation(
-// NESTED: ![[RETMUL]] = !DILocation(
-
-// COLUMNS: ![[DECLA]] = !DILocation(
-// COLUMNS: ![[BAR]] = !DILocation(
-// COLUMNS: ![[BAZ]] = !DILocation(
-// COLUMNS: ![[QUX]] = !DILocation(
-// COLUMNS: ![[ILOC]] = !DILocation(
-// COLUMNS: ![[BLOC]] = !DILocation(
-// COLUMNS: ![[CLOC]] = !DILocation(
-// COLUMNS: ![[DECLD]] = !DILocation(
-// COLUMNS: ![[DNOARGS]] = !DILocation(
-// COLUMNS: ![[DONEARG]] = !DILocation(
-// COLUMNS: ![[SETDNOARGS]] = !DILocation(
-// COLUMNS: ![[SETDONEARG]] = !DILocation(
-// COLUMNS: ![[SETD]] = !DILocation(
-// COLUMNS: ![[RANGEFOR_NOARGS]] = !DILocation(
-// COLUMNS: ![[RANGEFOR_RANGE]] = !DILocation(
-// COLUMNS: ![[RANGEFOR_BODY]] = !DILocation(
-// COLUMNS: ![[ANDLHS]] = !DILocation
-// COLUMNS: ![[ANDRHS]] = !DILocation
-// COLUMNS: ![[AND_CREATE]] = !DILocation
-// COLUMNS: ![[AND_FUNC]] = !DILocation
-// COLUNMS: ![[RETSUB]] = !DILocation(
-// COLUMNS: ![[RETMUL]] = !DILocation(
diff --git a/clang/test/CodeGenCXX/debug-info-nodebug.cpp b/clang/test/CodeGenCXX/debug-info-nodebug.cpp
deleted file mode 100644
index 1962b8c..0000000
--- a/clang/test/CodeGenCXX/debug-info-nodebug.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-// RUN: %clang_cc1 -DSETNODEBUG=0 -emit-llvm -std=c++14 -debug-info-kind=limited %s -o - | FileCheck %s --check-prefix=YESINFO
-// RUN: %clang_cc1 -DSETNODEBUG=1 -emit-llvm -std=c++14 -debug-info-kind=limited %s -o - | FileCheck %s --check-prefix=NOINFO
-
-#if SETNODEBUG
-#define NODEBUG __attribute__((nodebug))
-#else
-#define NODEBUG
-#endif
-
-// Const global variable. Use it so it gets emitted.
-NODEBUG static const int const_global_int_def = 1;
-void func1(int);
-void func2() { func1(const_global_int_def); }
-// YESINFO-DAG: !DIGlobalVariable(name: "const_global_int_def"
-// NOINFO-NOT: !DIGlobalVariable(name: "const_global_int_def"
-
-// Global variable with a more involved type.
-// If the variable has no debug info, the type should not appear either.
-struct S1 {
- int a;
- int b;
-};
-NODEBUG S1 global_struct = { 2, 3 };
-// YESINFO-DAG: !DICompositeType({{.*}} name: "S1"
-// NOINFO-NOT: !DICompositeType({{.*}} name: "S1"
-// YESINFO-DAG: !DIGlobalVariable(name: "global_struct"
-// NOINFO-NOT: !DIGlobalVariable(name: "global_struct"
-
-// Static data members. Const member needs a use.
-// Also the class as a whole needs a use, so that we produce debug info for
-// the entire class (iterating over the members, demonstrably skipping those
-// with 'nodebug').
-struct S2 {
- NODEBUG static int static_member;
- NODEBUG static const int static_const_member = 4;
-};
-int S2::static_member = 5;
-void func3() {
- S2 junk;
- func1(S2::static_const_member);
-}
-// YESINFO-DAG: !DIGlobalVariable(name: "static_member"
-// NOINFO-NOT: !DIGlobalVariable(name: "static_member"
-// YESINFO-DAG: !DIDerivedType({{.*}} name: "static_const_member"
-// NOINFO-NOT: !DIDerivedType({{.*}} name: "static_const_member"
-
-// Function-local static and auto variables.
-void func4() {
- NODEBUG static int static_local = 6;
- NODEBUG int normal_local = 7;
-}
-// YESINFO-DAG: !DIGlobalVariable(name: "static_local"
-// NOINFO-NOT: !DIGlobalVariable(name: "static_local"
-// YESINFO-DAG: !DILocalVariable(name: "normal_local"
-// NOINFO-NOT: !DILocalVariable(name: "normal_local"
-
-template <typename T>
-using y NODEBUG = int;
-void func5() {
- NODEBUG typedef int x;
- x a;
- y<int> b;
-}
-// YESINFO-DAG: !DIDerivedType(tag: DW_TAG_typedef, name: "x"
-// NOINFO-NOT: !DIDerivedType(tag: DW_TAG_typedef, name: "x"
-// YESINFO-DAG: !DIDerivedType(tag: DW_TAG_typedef, name: "y<int>"
-// NOINFO-NOT: !DIDerivedType(tag: DW_TAG_typedef, name: "y<int>"
diff --git a/clang/test/CodeGenCXX/debug-info-noreturn.cpp b/clang/test/CodeGenCXX/debug-info-noreturn.cpp
deleted file mode 100644
index 85b8132..0000000
--- a/clang/test/CodeGenCXX/debug-info-noreturn.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// RUN: %clang_cc1 -std=c++11 -emit-llvm -fcxx-exceptions -debug-info-kind=standalone %s -o - | FileCheck %s
-// Test for NoReturn flags in debug info.
-
-// CHECK: DISubprogram(name: "f", {{.*}}, flags: DIFlagPrototyped | DIFlagNoReturn, spFlags: DISPFlagDefinition
-// CHECK: DISubprogram(name: "foo_member", {{.*}}, flags: DIFlagPrototyped | DIFlagNoReturn, spFlags: 0
-// CHECK-NOT: DISubprogram(name: "func",{{.*}}, flags: DIFlagPrototyped | DIFlagNoReturn, spFlags: DISPFlagDefinition
-
-class foo {
-
- [[noreturn]] void foo_member() { throw 1; }
-};
-
-[[noreturn]] void f() {
- throw 1;
-}
-
-void func() {
- foo object;
-}
diff --git a/clang/test/CodeGenCXX/debug-info-nrvo.cpp b/clang/test/CodeGenCXX/debug-info-nrvo.cpp
deleted file mode 100644
index b36e371..0000000
--- a/clang/test/CodeGenCXX/debug-info-nrvo.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-// RUN: %clangxx -target x86_64-unknown-unknown -g \
-// RUN: %s -emit-llvm -S -o - | FileCheck %s
-
-// RUN: %clangxx -target x86_64-unknown-unknown -g \
-// RUN: -fno-elide-constructors %s -emit-llvm -S -o - | \
-// RUN: FileCheck %s -check-prefix=NOELIDE
-
-struct Foo {
- Foo() = default;
- Foo(Foo &&other) { x = other.x; }
- int x;
-};
-void some_function(int);
-Foo getFoo() {
- Foo foo;
- foo.x = 41;
- some_function(foo.x);
- return foo;
-}
-
-int main() {
- Foo bar = getFoo();
- return bar.x;
-}
-
-// Check that NRVO variables are stored as a pointer with deref if they are
-// stored in the return register.
-
-// CHECK: %[[RESULT:.*]] = alloca ptr, align 8
-// CHECK: #dbg_declare(ptr %[[RESULT]],
-// CHECK-SAME: !DIExpression(DW_OP_deref)
-
-// NOELIDE: %[[FOO:.*]] = alloca %struct.Foo, align 4
-// NOELIDE: #dbg_declare(ptr %[[FOO]],
-// NOELIDE-SAME: !DIExpression()
diff --git a/clang/test/CodeGenCXX/debug-info-nullptr.cpp b/clang/test/CodeGenCXX/debug-info-nullptr.cpp
deleted file mode 100644
index 3054ef8..0000000
--- a/clang/test/CodeGenCXX/debug-info-nullptr.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -std=c++11 -debug-info-kind=limited %s -o -| FileCheck %s
-
-void foo() {
- decltype(nullptr) t = 0;
-}
-
-// CHECK: !DIBasicType(tag: DW_TAG_unspecified_type, name: "decltype(nullptr)")
diff --git a/clang/test/CodeGenCXX/debug-info-object-pointer.cpp b/clang/test/CodeGenCXX/debug-info-object-pointer.cpp
deleted file mode 100644
index 49079f5..0000000
--- a/clang/test/CodeGenCXX/debug-info-object-pointer.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-// RUN: %clang_cc1 -x c++ -std=c++23 -debug-info-kind=limited -emit-llvm < %s | FileCheck %s
-
-// CHECK: !DISubprogram(name: "bar",
-// CHECK-SAME: flags: DIFlagPrototyped
-// CHECK: !DIDerivedType(tag: DW_TAG_pointer_type
-// CHECK-SAME: flags: DIFlagArtificial | DIFlagObjectPointer
-//
-// CHECK: !DISubprogram(name: "explicit_this",
-// flags: DIFlagPrototyped
-//
-// CHECK: !DIDerivedType(tag: DW_TAG_rvalue_reference_type
-// CHECK-SAME: flags: DIFlagObjectPointer)
-//
-// CHECK: !DILocalVariable(name: "this", arg: 1
-// CHECK-SAME: flags: DIFlagArtificial | DIFlagObjectPointer
-//
-// CHECK-NOT: DIFlagArtificial
-// CHECK: !DILocalVariable(arg: 1, {{.*}}, flags: DIFlagObjectPointer)
-
-struct Foo {
- void bar() {}
- void explicit_this(this Foo &&) {}
-};
-
-void f() {
- Foo{}.bar();
- Foo{}.explicit_this();
-}
diff --git a/clang/test/CodeGenCXX/debug-info-objname.cpp b/clang/test/CodeGenCXX/debug-info-objname.cpp
deleted file mode 100644
index 73d3bb4..0000000
--- a/clang/test/CodeGenCXX/debug-info-objname.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-// REQUIRES: x86-registered-target
-// RUN: rm -rf %t && mkdir %t && cd %t
-// RUN: cp %s debug-info-objname.cpp
-
-/// No output file provided, input file is relative, we emit an absolute path (MSVC behavior).
-// RUN: %clang_cl --target=x86_64-windows-msvc /c /Z7 -nostdinc debug-info-objname.cpp
-// RUN: llvm-pdbutil dump -all debug-info-objname.obj | FileCheck %s --check-prefix=ABSOLUTE
-
-/// No output file provided, input file is absolute, we emit an absolute path (MSVC behavior).
-// RUN: %clang_cl --target=x86_64-windows-msvc /c /Z7 -nostdinc -- %t/debug-info-objname.cpp
-// RUN: llvm-pdbutil dump -all debug-info-objname.obj | FileCheck %s --check-prefix=ABSOLUTE
-
-/// The output file is provided as an absolute path, we emit an absolute path.
-// RUN: %clang_cl --target=x86_64-windows-msvc /c /Z7 -nostdinc /Fo%t/debug-info-objname.obj -- %t/debug-info-objname.cpp
-// RUN: llvm-pdbutil dump -all debug-info-objname.obj | FileCheck %s --check-prefix=ABSOLUTE
-
-/// The output file is provided as relative path, -working-dir is provided, we emit an absolute path.
-// RUN: %clang_cl --target=x86_64-windows-msvc /c /Z7 -nostdinc -working-dir=%t debug-info-objname.cpp
-// RUN: llvm-pdbutil dump -all debug-info-objname.obj | FileCheck %s --check-prefix=ABSOLUTE
-
-/// The input file name is relative and we specify -fdebug-compilation-dir, we emit a relative path.
-// RUN: %clang_cl --target=x86_64-windows-msvc /c /Z7 -nostdinc -fdebug-compilation-dir=. debug-info-objname.cpp
-// RUN: llvm-pdbutil dump -all debug-info-objname.obj | FileCheck %s --check-prefix=RELATIVE
-
-/// Ensure /FA emits an .asm file which contains the path to the final .obj, not the .asm
-// RUN: %clang_cl --target=x86_64-windows-msvc /c /Z7 -nostdinc -fdebug-compilation-dir=. /FA debug-info-objname.cpp
-// RUN: FileCheck --input-file=debug-info-objname.asm --check-prefix=ASM %s
-
-/// Same thing for -save-temps
-// RUN: %clang_cl --target=x86_64-windows-msvc /c /Z7 -nostdinc -fdebug-compilation-dir=. /clang:-save-temps debug-info-objname.cpp
-// RUN: FileCheck --input-file=debug-info-objname.asm --check-prefix=ASM %s
-
-int main() {
- return 1;
-}
-
-// ABSOLUTE: S_OBJNAME [size = [[#]]] sig=0, `{{.+}}debug-info-objname.obj`
-// RELATIVE: S_OBJNAME [size = [[#]]] sig=0, `debug-info-objname.obj`
-// ASM: Record kind: S_OBJNAME
-// ASM-NEXT: .long 0
-// ASM-NEXT: .asciz "debug-info-objname.obj"
diff --git a/clang/test/CodeGenCXX/debug-info-programming-language.cpp b/clang/test/CodeGenCXX/debug-info-programming-language.cpp
deleted file mode 100644
index 6953266..0000000
--- a/clang/test/CodeGenCXX/debug-info-programming-language.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-// RUN: %clang_cc1 -dwarf-version=5 -emit-llvm -triple %itanium_abi_triple %s -o - \
-// RUN: -x c++ -std=c++14 -O0 -disable-llvm-passes -debug-info-kind=limited \
-// RUN: | FileCheck --check-prefix=CHECK-CPP14 %s
-// RUN: %clang_cc1 -dwarf-version=3 -emit-llvm -triple %itanium_abi_triple %s -o - \
-// RUN: -x c++ -std=c++14 -O0 -disable-llvm-passes -debug-info-kind=limited \
-// RUN: | FileCheck --check-prefix=CHECK-CPP14 %s
-// RUN: %clang_cc1 -dwarf-version=3 -emit-llvm -triple %itanium_abi_triple %s -o - \
-// RUN: -x c++ -std=c++17 -O0 -disable-llvm-passes -debug-info-kind=limited \
-// RUN: | FileCheck --check-prefix=CHECK-CPP17 %s
-// RUN: %clang_cc1 -dwarf-version=3 -emit-llvm -triple %itanium_abi_triple %s -o - \
-// RUN: -x c++ -std=c++20 -O0 -disable-llvm-passes -debug-info-kind=limited \
-// RUN: | FileCheck --check-prefix=CHECK-CPP20 %s
-// RUN: %clang_cc1 -dwarf-version=3 -gstrict-dwarf -emit-llvm -triple %itanium_abi_triple %s -o - \
-// RUN: -x c++ -std=c++14 -O0 -disable-llvm-passes -debug-info-kind=limited | FileCheck %s
-// RUN: %clang_cc1 -dwarf-version=5 -gstrict-dwarf -emit-llvm -triple %itanium_abi_triple %s -o - \
-// RUN: -x c++ -std=c++14 -O0 -disable-llvm-passes -debug-info-kind=limited \
-// RUN: | FileCheck --check-prefix=CHECK-CPP14 %s
-
-int main() {
- return 0;
-}
-
-// Update these tests once support for DW_LANG_C_plus_plus_17/20 is added - it's
-// a complicated tradeoff. The language codes are already published/blessed by
-// the DWARF committee, but haven't been released in a published standard yet,
-// so consumers might not be ready for these codes & could regress functionality
-// (because they wouldn't be able to identify that the language was C++). The
-// DWARFv6 language encoding, separating language from language version, would
-// remove this problem/not require new codes for new language versions and make
-// it possible to identify the base language irrespective of the version.
-// CHECK-CPP14: distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14,
-// CHECK-CPP17: distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14,
-// CHECK-CPP20: distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14,
-// CHECK: distinct !DICompileUnit(language: DW_LANG_C_plus_plus,
diff --git a/clang/test/CodeGenCXX/debug-info-ptr-to-member-function.cpp b/clang/test/CodeGenCXX/debug-info-ptr-to-member-function.cpp
deleted file mode 100644
index a7e02e4..0000000
--- a/clang/test/CodeGenCXX/debug-info-ptr-to-member-function.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// RUN: %clang_cc1 %s -triple x86_64-apple-darwin -debug-info-kind=limited -emit-llvm -o - | FileCheck -check-prefix=CHECK -check-prefix=DARWIN-X64 %s
-// RUN: %clang_cc1 %s -triple x86_64-pc-win32 -debug-info-kind=limited -emit-llvm -o - | FileCheck -check-prefix=CHECK -check-prefix=WIN32-X64 %s
-
-struct T {
- int method();
-};
-
-void foo(int (T::*method)()) {}
-
-struct Incomplete;
-
-int (Incomplete::**bar)();
-// A pointer to a member function is a pair of function- and this-pointer.
-// CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type,
-// DARWIN-X64-SAME: size: 128
-// WIN32-X64-NOT: size:
-// CHECK-SAME: extraData: {{.*}})
-
-// CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type,
-// DARWIN-X64-SAME: size: 128
-// WIN32-X64-SAME: size: 64
diff --git a/clang/test/CodeGenCXX/debug-info-ptr-to-ptr.cpp b/clang/test/CodeGenCXX/debug-info-ptr-to-ptr.cpp
deleted file mode 100644
index 12e50a5..0000000
--- a/clang/test/CodeGenCXX/debug-info-ptr-to-ptr.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-// Test debug info for intermediate value of a chained pointer deferencing
-// expression when the flag -fdebug-info-for-pointer-type is enabled.
-// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu %s -fdebug-info-for-profiling -debug-info-kind=constructor -o - | FileCheck %s
-
-class A {
-public:
- int i;
- char c;
- void *p;
- int arr[3];
-};
-
-class B {
-public:
- A* a;
-};
-
-class C {
-public:
- B* b;
- A* a;
- A arr[10];
-};
-
-// CHECK-LABEL: define dso_local noundef i32 @{{.*}}func1{{.*}}(
-// CHECK: [[A_ADDR:%.*]] = getelementptr inbounds nuw %class.B, ptr {{%.*}}, i32 0, i32 0, !dbg [[DBG1:![0-9]+]]
-// CHECK-NEXT: [[A:%.*]] = load ptr, ptr [[A_ADDR]], align {{.*}}, !dbg [[DBG1]]
-// CHECK-NEXT: #dbg_value(ptr [[A]], [[META1:![0-9]+]], !DIExpression(), [[DBG1]])
-// CHECK-NEXT: {{%.*}} = getelementptr inbounds nuw %class.A, ptr [[A]], i32 0, i32 0,
-int func1(B *b) {
- return b->a->i;
-}
-
-// Should generate a pseudo variable when pointer is type-casted.
-// CHECK-LABEL: define dso_local noundef ptr @{{.*}}func2{{.*}}(
-// CHECK: #dbg_declare(ptr [[B_ADDR:%.*]], [[META2:![0-9]+]], !DIExpression(),
-// CHECK-NEXT: [[B:%.*]] = load ptr, ptr [[B_ADDR]],
-// CHECK-NEXT: #dbg_value(ptr [[B]], [[META3:![0-9]+]], !DIExpression(),
-// CHECK-NEXT: {{%.*}} = getelementptr inbounds nuw %class.B, ptr [[B]], i32 0,
-A* func2(void *b) {
- return ((B*)b)->a;
-}
-
-// Should not generate pseudo variable in this case.
-// CHECK-LABEL: define dso_local noundef i32 @{{.*}}func3{{.*}}(
-// CHECK: #dbg_declare(ptr [[B_ADDR:%.*]], [[META4:![0-9]+]], !DIExpression(),
-// CHECK: #dbg_declare(ptr [[LOCAL1:%.*]], [[META5:![0-9]+]], !DIExpression(),
-// CHECK-NOT: #dbg_value(ptr
-int func3(B *b) {
- A *local1 = b->a;
- return local1->i;
-}
-
-// CHECK-LABEL: define dso_local noundef signext i8 @{{.*}}func4{{.*}}(
-// CHECK: [[A_ADDR:%.*]] = getelementptr inbounds nuw %class.C, ptr {{%.*}}, i32 0, i32 1
-// CHECK-NEXT: [[A:%.*]] = load ptr, ptr [[A_ADDR]],
-// CHECK-NEXT: #dbg_value(ptr [[A]], [[META6:![0-9]+]], !DIExpression(),
-// CHECK-NEXT: {{%.*}} = getelementptr inbounds nuw %class.A, ptr [[A]], i32 0, i32 0,
-// CHECK: [[CALL:%.*]] = call noundef ptr @{{.*}}foo{{.*}}(
-// CHECK-NEXT: #dbg_value(ptr [[CALL]], [[META6]], !DIExpression(),
-// CHECK-NEXT: [[I1:%.*]] = getelementptr inbounds nuw %class.A, ptr [[CALL]], i32 0, i32 1
-char func4(C *c) {
- extern A* foo(int x);
- return foo(c->a->i)->c;
-}
-
-// CHECK-LABEL: define dso_local noundef signext i8 @{{.*}}func5{{.*}}(
-// CHECK: #dbg_declare(ptr {{%.*}}, [[META7:![0-9]+]], !DIExpression(),
-// CHECK: #dbg_declare(ptr {{%.*}}, [[META8:![0-9]+]], !DIExpression(),
-// CHECK: [[A_ADDR:%.*]] = getelementptr inbounds %class.A, ptr {{%.*}}, i64 {{%.*}},
-// CHECK-NEXT: #dbg_value(ptr [[A_ADDR]], [[META9:![0-9]+]], !DIExpression(),
-// CHECK-NEXT: {{%.*}} = getelementptr inbounds nuw %class.A, ptr [[A_ADDR]], i32 0, i32 1,
-char func5(void *arr, int n) {
- return ((A*)arr)[n].c;
-}
-
-// CHECK-LABEL: define dso_local noundef i32 @{{.*}}func6{{.*}}(
-// CHECK: #dbg_declare(ptr {{%.*}}, [[META10:![0-9]+]], !DIExpression(),
-// CHECK: #dbg_value(ptr {{%.*}}, [[META11:![0-9]+]], !DIExpression(),
-int func6(B &b) {
- return reinterpret_cast<A&>(b).i;
-}
-
-// CHECK-LABEL: define dso_local noundef i32 @{{.*}}global{{.*}}(
-// CHECK: [[GA:%.*]] = load ptr, ptr @ga
-// CHECK-NEXT: #dbg_value(ptr [[GA]], [[META12:![0-9]+]], !DIExpression(),
-A *ga;
-int global() {
- return ga->i;
-}
-
-
-// CHECK-DAG: [[META_A:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_class_type, name: "A",
-// CHECK-DAG: [[META_AP:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: [[META_A]],
-// CHECK-DAG: [[META_B:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_class_type, name: "B",
-// CHECK-DAG: [[META_BP:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: [[META_B]],
-// CHECK-DAG: [[META_C:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_class_type, name: "C",
-// CHECK-DAG: [[META_CP:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: [[META_C]],
-// CHECK-DAG: [[META_VP:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null,
-// CHECK-DAG: [[META_I32:![0-9]+]] = !DIBasicType(name: "int", size: 32,
-// CHECK-DAG: [[META_BR:![0-9]+]] = !DIDerivedType(tag: DW_TAG_reference_type, baseType: [[META_B]],
-
-// CHECK-DAG: [[DBG1]] = !DILocation(line: 31, column: 13,
-// CHECK-DAG: [[META1]] = !DILocalVariable(scope: {{.*}}, type: [[META_AP]], flags: DIFlagArtificial)
-// CHECK-DAG: [[META2]] = !DILocalVariable(name: "b", arg: 1, scope: {{.*}}, file: {{.*}}, line: 40, type: [[META_VP]])
-// CHECK-DAG: [[META3]] = !DILocalVariable(scope: {{.*}}, type: [[META_BP]], flags: DIFlagArtificial)
-// CHECK-DAG: [[META4]] = !DILocalVariable(name: "b", arg: 1, scope: {{.*}}, file: {{.*}}, line: 49, type: [[META_BP]])
-// CHECK-DAG: [[META5]] = !DILocalVariable(name: "local1", scope: {{.*}}, file: {{.*}}, line: 50, type: [[META_AP]])
-// CHECK-DAG: [[META6]] = !DILocalVariable(scope: {{.*}}, type: [[META_AP]], flags: DIFlagArtificial)
-// CHECK-DAG: [[META7]] = !DILocalVariable(name: "arr", arg: 1, scope: {{.*}}, file: {{.*}}, line: 73, type: [[META_VP]])
-// CHECK-DAG: [[META8]] = !DILocalVariable(name: "n", arg: 2, scope: {{.*}}, file: {{.*}}, line: 73, type: [[META_I32]])
-// CHECK-DAG: [[META9]] = !DILocalVariable(scope: {{.*}}, type: [[META_AP]], flags: DIFlagArtificial)
-// CHECK-DAG: [[META10]] = !DILocalVariable(name: "b", arg: 1, scope: {{.*}}, file: {{.*}}, line: 80, type: [[META_BR]])
-// CHECK-DAG: [[META11]] = !DILocalVariable(scope: {{.*}}, type: [[META_AP]], flags: DIFlagArtificial)
-// CHECK-DAG: [[META12]] = !DILocalVariable(scope: {{.*}}, type: [[META_AP]], flags: DIFlagArtificial)
diff --git a/clang/test/CodeGenCXX/debug-info-qualifiers.cpp b/clang/test/CodeGenCXX/debug-info-qualifiers.cpp
deleted file mode 100644
index c48c9b5..0000000
--- a/clang/test/CodeGenCXX/debug-info-qualifiers.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-// RUN: %clang_cc1 -std=c++11 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
-// Test (r)value and CVR qualifiers on C++11 non-static member functions.
-class A {
-public:
- // CHECK: !DISubprogram(name: "l",
- // CHECK-SAME: line: [[@LINE+4]]
- // CHECK-SAME: type: ![[PLSR:[0-9]+]]
- // CHECK-SAME: flags: DIFlagPublic | DIFlagPrototyped | DIFlagLValueReference,
- // CHECK: ![[PLSR]] = !DISubroutineType(flags: DIFlagLValueReference, types: ![[ARGS:[0-9]+]])
- void l() const &;
- // CHECK: ![[ARGS]] = !{null, ![[THIS:[0-9]+]]}
- // CHECK: ![[THIS]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[CONST_A:[0-9]+]]
- // CHECK: ![[CONST_A]] = !DIDerivedType(tag: DW_TAG_const_type
- // CHECK: !DISubprogram(name: "r"
- // CHECK-SAME: line: [[@LINE+4]]
- // CHECK-SAME: type: ![[PRSR:[0-9]+]]
- // CHECK-SAME: flags: DIFlagPublic | DIFlagPrototyped | DIFlagRValueReference,
- // CHECK: ![[PRSR]] = !DISubroutineType(flags: DIFlagRValueReference, types: ![[ARGS]])
- void r() const &&;
-};
-
-void g() {
- A a;
- // The type of pl is "void (A::*)() const &".
- // CHECK: !DILocalVariable(name: "pl",
- // CHECK-SAME: line: [[@LINE+3]]
- // CHECK-SAME: type: ![[PL:[0-9]+]]
- // CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: ![[PLSR]]
- auto pl = &A::l;
-
- // CHECK: !DILocalVariable(name: "pr",
- // CHECK-SAME: line: [[@LINE+3]]
- // CHECK-SAME: type: ![[PR:[0-9]+]]
- // CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: ![[PRSR]]
- auto pr = &A::r;
-}
diff --git a/clang/test/CodeGenCXX/debug-info-range-for-var-names.cpp b/clang/test/CodeGenCXX/debug-info-range-for-var-names.cpp
deleted file mode 100644
index 1cc13e1..0000000
--- a/clang/test/CodeGenCXX/debug-info-range-for-var-names.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
-
-struct vec {
- using itr = int*;
- itr begin() { return nullptr; }
- itr end() { return nullptr; }
-};
-
-void test() {
- vec as, bs, cs;
-
- for (auto a : as)
- for (auto b : bs)
- for (auto c : cs) {
- }
-}
-
-// CHECK: #dbg_declare(ptr %__range1, ![[RANGE1:[0-9]+]]
-// CHECK: #dbg_declare(ptr {{[^,]*}}, ![[BEGIN1:[0-9]+]]
-// CHECK: #dbg_declare(ptr {{[^,]*}}, ![[END1:[0-9]+]]
-// CHECK: #dbg_declare(ptr %__range2, ![[RANGE2:[0-9]+]]
-// CHECK: #dbg_declare(ptr {{[^,]*}}, ![[BEGIN2:[0-9]+]]
-// CHECK: #dbg_declare(ptr {{[^,]*}}, ![[END2:[0-9]+]]
-// CHECK: #dbg_declare(ptr %__range3, ![[RANGE3:[0-9]+]]
-// CHECK: #dbg_declare(ptr {{[^,]*}}, ![[BEGIN3:[0-9]+]]
-// CHECK: #dbg_declare(ptr {{[^,]*}}, ![[END3:[0-9]+]]
-// CHECK: ![[RANGE1]] = !DILocalVariable(name: "__range1",
-// CHECK: ![[BEGIN1]] = !DILocalVariable(name: "__begin1",
-// CHECK: ![[END1]] = !DILocalVariable(name: "__end1",
-// CHECK: ![[RANGE2]] = !DILocalVariable(name: "__range2",
-// CHECK: ![[BEGIN2]] = !DILocalVariable(name: "__begin2",
-// CHECK: ![[END2]] = !DILocalVariable(name: "__end2",
-// CHECK: ![[RANGE3]] = !DILocalVariable(name: "__range3",
-// CHECK: ![[BEGIN3]] = !DILocalVariable(name: "__begin3",
-// CHECK: ![[END3]] = !DILocalVariable(name: "__end3",
diff --git a/clang/test/CodeGenCXX/debug-info-rvalue-ref.cpp b/clang/test/CodeGenCXX/debug-info-rvalue-ref.cpp
deleted file mode 100644
index c9500ee..0000000
--- a/clang/test/CodeGenCXX/debug-info-rvalue-ref.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-// RUN: %clang_cc1 -std=c++11 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
-// RUN: %clang_cc1 -std=c++11 -dwarf-version=4 -gstrict-dwarf -emit-llvm -debug-info-kind=limited \
-// RUN: -triple x86_64-apple-darwin %s -o - | FileCheck %s
-// RUN: %clang_cc1 -std=c++11 -dwarf-version=3 -gstrict-dwarf -emit-llvm -debug-info-kind=limited \
-// RUN: -triple x86_64-apple-darwin %s -o - | FileCheck %s --check-prefix=NORVALUE
-
-extern "C" {
-extern int printf(const char * format, ...);
-}
-void foo (int &&i)
-{
- printf("%d\n", i);
-}
-
-// CHECK: !DIDerivedType(tag: DW_TAG_rvalue_reference_type, baseType: ![[INT:[0-9]+]], size: 64)
-// CHECK: ![[INT]] = !DIBasicType(name: "int"
-// NORVALUE: !DIDerivedType(tag: DW_TAG_reference_type, baseType: ![[INT:[0-9]+]], size: 64)
diff --git a/clang/test/CodeGenCXX/debug-info-scope.cpp b/clang/test/CodeGenCXX/debug-info-scope.cpp
deleted file mode 100644
index a90ad83..0000000
--- a/clang/test/CodeGenCXX/debug-info-scope.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-// RUN: %clang_cc1 -debug-info-kind=limited -gno-column-info -std=c++11 -emit-llvm %s -o -| FileCheck %s
-//
-// Two variables with the same name in subsequent if staments need to be in separate scopes.
-
-int src();
-
-void f();
-
-void func() {
- // CHECK: = !DILocalVariable(name: "i"
- // CHECK-SAME: scope: [[IF1:![0-9]*]]
- // CHECK-SAME: line: [[@LINE+2]]
- // CHECK: [[IF1]] = distinct !DILexicalBlock({{.*}}line: [[@LINE+1]])
- if (int i = src())
- f();
-
- // CHECK: = !DILocalVariable(name: "i"
- // CHECK-SAME: scope: [[IF2:![0-9]*]]
- // CHECK-SAME: line: [[@LINE+2]]
- // CHECK: [[IF2]] = distinct !DILexicalBlock({{.*}}line: [[@LINE+1]])
- if (int i = src()) {
- f();
- } else
- f();
-
- // CHECK: = !DILocalVariable(name: "i"
- // CHECK-SAME: scope: [[FOR:![0-9]*]]
- // CHECK-SAME: line: [[@LINE+2]]
- // CHECK: [[FOR]] = distinct !DILexicalBlock({{.*}}line: [[@LINE+1]])
- for (int i = 0;
- // CHECK: = !DILocalVariable(name: "b"
- // CHECK-SAME: scope: [[FOR_BODY:![0-9]*]]
- // CHECK-SAME: line: [[@LINE+6]]
- // CHECK: [[FOR_BODY]] = distinct !DILexicalBlock({{.*}}line: [[@LINE-4]])
- // The scope could be located at 'bool b', but LLVM drops line information for
- // scopes anyway, so it's not terribly important.
- // FIXME: change the debug info schema to not include locations of scopes,
- // since they're not used.
- bool b = i != 10; ++i)
- f();
-
- // CHECK: = !DILocalVariable(name: "i"
- // CHECK-SAME: scope: [[FOR:![0-9]*]]
- // CHECK-SAME: line: [[@LINE+2]]
- // CHECK: [[FOR]] = distinct !DILexicalBlock({{.*}}line: [[@LINE+1]])
- for (int i = 0; i != 10; ++i) {
- // FIXME: Do not include scopes that have only other scopes (and no variables
- // or using declarations) as direct children, they just waste
- // space/relocations/etc.
- // CHECK: [[FOR_LOOP_INCLUDING_COND:!.*]] = distinct !DILexicalBlock(scope: [[FOR]],{{.*}} line: [[@LINE-4]])
- // CHECK: = !DILocalVariable(name: "b"
- // CHECK-SAME: scope: [[FOR_COMPOUND:![0-9]*]]
- // CHECK-SAME: line: [[@LINE+2]]
- // CHECK: [[FOR_COMPOUND]] = distinct !DILexicalBlock(scope: [[FOR_LOOP_INCLUDING_COND]],{{.*}} line: [[@LINE-8]])
- bool b = i % 2;
- }
-
- int x[] = {1, 2};
- // CHECK: = !DILocalVariable(name: "__range1"
- // CHECK-SAME: scope: [[RANGE_FOR:![0-9]*]]
- // CHECK-NOT: line:
- // CHECK-SAME: ){{$}}
- // CHECK: [[RANGE_FOR]] = distinct !DILexicalBlock({{.*}}, line: [[@LINE+1]])
- for (int i : x) {
- // CHECK: = !DILocalVariable(name: "i"
- // CHECK-SAME: scope: [[RANGE_FOR_BODY:![0-9]*]]
- // CHECK-SAME: line: [[@LINE-3]]
- // CHECK: [[RANGE_FOR_BODY]] = distinct !DILexicalBlock(scope: [[RANGE_FOR]],{{.*}} line: [[@LINE-4]])
- }
-}
diff --git a/clang/test/CodeGenCXX/debug-info-scoped-class.cpp b/clang/test/CodeGenCXX/debug-info-scoped-class.cpp
deleted file mode 100644
index 7424487..0000000
--- a/clang/test/CodeGenCXX/debug-info-scoped-class.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-// RUN: %clang_cc1 -Wno-error=return-type -emit-llvm -debug-info-kind=standalone -std=c++11 \
-// RUN: -triple thumbv7-apple-ios %s -o - | FileCheck %s
-
-// This forward-declared scoped enum will be created while building its own
-// declcontext. Make sure it is only emitted once.
-
-struct A {
- enum class Return;
- Return f1();
-};
-A::Return* f2() {}
-
-// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "Return",
-// CHECK-SAME: flags: DIFlagFwdDecl,
-// CHECK-NOT: tag: DW_TAG_enumeration_type, name: "Return"
diff --git a/clang/test/CodeGenCXX/debug-info-simple-template-names.cpp b/clang/test/CodeGenCXX/debug-info-simple-template-names.cpp
deleted file mode 100644
index 98faa0f..0000000
--- a/clang/test/CodeGenCXX/debug-info-simple-template-names.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -triple x86_64-unknown_unknown -std=c++17 %s -o - -w -debug-info-kind=limited -gsimple-template-names=mangled \
-// RUN: | FileCheck %s
-// RUN: %clang_cc1 -emit-llvm -triple x86_64-unknown_unknown -std=c++17 %s -o - -w -debug-info-kind=limited -gsimple-template-names=simple \
-// RUN: | FileCheck %s --implicit-check-not=_STN --check-prefix=SIMPLE
-// RUN: %clang_cc1 -emit-llvm -triple x86_64-unknown_unknown -std=c++17 %s -o - -w -debug-info-kind=limited \
-// RUN: | FileCheck %s --implicit-check-not=_STN --check-prefix=FULL
-// RUN: %clang_cc1 -emit-llvm -triple x86_64-unknown_unknown -std=c++17 %s -o - -w -debug-info-kind=line-tables-only -gsimple-template-names=mangled -fdebug-info-for-profiling \
-// RUN: | FileCheck %s --implicit-check-not=_STN --check-prefix=FULL
-
-template <typename... T>
-void f1() {}
-template <typename T, T V>
-void f2() {}
-template <typename... T>
-struct t1 {};
-extern int x;
-int x;
-struct t2 {
- template <typename T = float>
- operator t1<int>() { __builtin_unreachable(); }
-};
-template <template <typename...> class T>
-void f3() {}
-namespace {
-enum LocalEnum { LocalEnum1 };
-}
-template<typename T, T ... ts>
-struct t3 { };
-struct t4 {
- t3<LocalEnum, LocalEnum1> m1;
-};
-
-t4 v1;
-enum { UnnamedEnum1 };
-template<decltype(UnnamedEnum1)>
-void f4() {
-}
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "t3<(anonymous namespace)::LocalEnum, ((anonymous namespace)::LocalEnum)0>"
-void f() {
- // Basic examples of simplifiable/rebuildable names
- f1<>();
- // CHECK: !DISubprogram(name: "_STN|f1|<>",
- // SIMPLE: !DISubprogram(name: "f1",
- // FULL: !DISubprogram(name: "f1<>",
- f1<int>();
- // CHECK: !DISubprogram(name: "_STN|f1|<int>",
- f1<void()>();
- // CHECK: !DISubprogram(name: "_STN|f1|<void ()>",
- f2<int, 42>();
- // CHECK: !DISubprogram(name: "_STN|f2|<int, 42>",
-
- // Check that even though the nested name can't be rebuilt, it'll carry its
- // full name and the outer name can be rebuilt from that.
- f1<t1<void() noexcept>>();
- // CHECK: !DISubprogram(name: "_STN|f1|<t1<void () noexcept> >",
-
- // Vector array types are encoded in DWARF but the decoding in llvm-dwarfdump
- // isn't implemented yet.
- f1<__attribute__((__vector_size__((sizeof(int) * 2)))) int>();
- // CHECK: !DISubprogram(name: "f1<__attribute__((__vector_size__(2 * sizeof(int)))) int>",
-
- // noexcept is part of function types in C++17 onwards, but not encoded in
- // DWARF
- f1<void() noexcept>();
- // CHECK: !DISubprogram(name: "f1<void () noexcept>",
-
- // Unnamed entities (lambdas, structs/classes, enums) can't be fully rebuilt
- // since we don't emit the column number. Also lambdas and unnamed classes are
- // ambiguous with each other - there's no DWARF that designates a lambda as
- // anything other than another unnamed class/struct.
- auto Lambda = [] {};
- f1<decltype(Lambda)>();
- // CHECK: !DISubprogram(name: "f1<(lambda at {{.*}}debug-info-simple-template-names.cpp:[[# @LINE - 2]]:17)>",
- f1<t1<t1<decltype(Lambda)>>>();
- // CHECK: !DISubprogram(name: "f1<t1<t1<(lambda at {{.*}}> > >",
- struct {
- } unnamed_struct;
- f1<decltype(unnamed_struct)>();
- // CHECK: !DISubprogram(name: "f1<(unnamed struct at {{.*}}debug-info-simple-template-names.cpp:[[# @LINE - 3]]:3)>",
- f1<void (decltype(unnamed_struct))>();
- // CHECK: !DISubprogram(name: "f1<void ((unnamed struct at {{.*}}debug-info-simple-template-names.cpp:[[# @LINE - 5]]:3))>",
- enum {} unnamed_enum;
- f1<decltype(unnamed_enum)>();
- // CHECK: !DISubprogram(name: "f1<(unnamed enum at {{.*}}debug-info-simple-template-names.cpp:[[# @LINE - 2]]:3)>",
-
- // Declarations can't readily be reversed as the value in the DWARF only
- // contains the address of the value - we'd have to do symbol lookup to find
- // the name of that value (& rely on it not having been stripped out, etc).
- f2<int *, &x>();
- // CHECK: !DISubprogram(name: "f2<int *, &x>",
-
- // We could probably handle \/ this case, but since it's a small subset of
- // pointer typed non-type-template parameters which can't be handled it
- // doesn't seem high priority.
- f2<decltype(nullptr), nullptr>();
- // CHECK: !DISubprogram(name: "f2<std::nullptr_t, nullptr>",
-
- // These larger constants are encoded as data blocks which makes them a bit
- // harder to re-render. I think they might be missing sign information, or at
- // maybe it's just a question of doing APInt things to render such large
- // values. Punting on this for now.
- f2<__int128, ((__int128)9223372036854775807) * 2>();
- // CHECK: !DISubprogram(name: "f2<__int128, (__int128)18446744073709551614>",
-
- t2().operator t1<int>();
- // FIXME: This should be something like "operator t1<int><float>"
- // CHECK: !DISubprogram(name: "operator t1<float>",
-
- // Function pointer non-type-template parameters currently don't get any DWARF
- // value (GCC doesn't provide one either) and even if there was a value, if
- // it's like variable/pointer non-type template parameters, it couldn't be
- // rebuilt anyway (see the note above for details on that) so we don't have to
- // worry about seeing conversion operators as parameters to other templates.
-
- f3<t1>();
- // CHECK: !DISubprogram(name: "_STN|f3|<t1>",
-
- f1<_BitInt(3)>();
- // CHECK: !DISubprogram(name: "f1<_BitInt(3)>",
-
- f1<const unsigned _BitInt(5)>();
- // CHECK: !DISubprogram(name: "f1<const unsigned _BitInt(5)>",
-
- // Add a parameter just so this differs from other attributed function types
- // that don't mangle differently.
- int fnrt() __attribute__((noreturn));
- f1<decltype(fnrt)>();
- // CHECK: !DISubprogram(name: "f1<int () __attribute__((noreturn))>",
-
- f4<UnnamedEnum1>();
- // CHECK: !DISubprogram(name: "f4<((unnamed enum at {{.*}}))0>"
-}
diff --git a/clang/test/CodeGenCXX/debug-info-static-fns.cpp b/clang/test/CodeGenCXX/debug-info-static-fns.cpp
deleted file mode 100644
index 0ce3cb7..0000000
--- a/clang/test/CodeGenCXX/debug-info-static-fns.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
-
-namespace A {
- static int a(int b) { return b + 4; }
-
- int b(int c) { return c + a(c); }
-}
-
-// Verify that a is present and mangled.
-// CHECK: define internal noundef i32 @_ZN1AL1aEi({{.*}} !dbg [[DBG:![0-9]+]]
-// CHECK: [[DBG]] = distinct !DISubprogram(name: "a", linkageName: "_ZN1AL1aEi",
-// CHECK-SAME: line: 4
-// CHECK-SAME: DISPFlagDefinition
diff --git a/clang/test/CodeGenCXX/debug-info-static-member.cpp b/clang/test/CodeGenCXX/debug-info-static-member.cpp
deleted file mode 100644
index 972ca62..0000000
--- a/clang/test/CodeGenCXX/debug-info-static-member.cpp
+++ /dev/null
@@ -1,168 +0,0 @@
-// RUN: %clangxx -target x86_64-unknown-unknown -g -gdwarf-4 %s -emit-llvm -S -o - | FileCheck --check-prefixes=CHECK,DWARF4,NOT-MS %s
-// RUN: %clangxx -target x86_64-unknown-unknown -g -gdwarf-4 -std=c++98 %s -emit-llvm -S -o - | FileCheck --check-prefixes=CHECK,DWARF4,NOT-MS %s
-// RUN: %clangxx -target x86_64-unknown-unknown -g -gdwarf-4 -std=c++11 %s -emit-llvm -S -o - | FileCheck --check-prefixes=CHECK,DWARF4,NOT-MS %s
-// RUN: %clangxx -target x86_64-unknown-unknown -g -gdwarf-5 -std=c++11 %s -emit-llvm -S -o - | FileCheck --check-prefixes=CHECK,DWARF5 %s
-// RUN: %clangxx -target x86_64-windows-msvc -g -gdwarf-4 %s -emit-llvm -S -o - | FileCheck --check-prefixes=CHECK,DWARF4 %s
-// PR14471
-
-// CHECK: @{{.*}}a{{.*}} = dso_local global i32 4, align 4, !dbg [[A:![0-9]+]]
-// CHECK: @{{.*}}b{{.*}} = dso_local global i32 2, align 4, !dbg [[B:![0-9]+]]
-// CHECK: @{{.*}}c{{.*}} = dso_local global i32 1, align 4, !dbg [[C:![0-9]+]]
-
-enum X {
- Y
-};
-class C
-{
- static int a;
- const static bool const_a = true;
-protected:
- static int b;
-#if __cplusplus >= 201103L
- constexpr static float const_b = 3.14;
-#else
- const static float const_b = 3.14;
-#endif
-public:
- static int c;
- const static int const_c = 18;
- int d;
- static X x_a;
-};
-
-// The definition of C::a drives the emission of class C, which is
-// why the definition of "a" comes before the declarations while
-// "b" and "c" come after.
-
-// CHECK: [[A]] = !DIGlobalVariableExpression(var: [[AV:.*]], expr: !DIExpression())
-// CHECK: [[AV]] = distinct !DIGlobalVariable(name: "a",
-// CHECK-SAME: declaration: ![[DECL_A:[0-9]+]])
-//
-// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "X"{{.*}})
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "anon_static_decl_struct"
-// DWARF4: !DIDerivedType(tag: DW_TAG_member, name: "anon_static_decl_var"
-// DWARF5: !DIDerivedType(tag: DW_TAG_variable, name: "anon_static_decl_var"
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "static_decl_templ<int>"
-// CHECK-NOT: DIFlagFwdDecl
-// CHECK-SAME: ){{$}}
-// DWARF4: !DIDerivedType(tag: DW_TAG_member, name: "static_decl_templ_var"
-// DWARF5: !DIDerivedType(tag: DW_TAG_variable, name: "static_decl_templ_var"
-
-int C::a = 4;
-// CHECK: [[B]] = !DIGlobalVariableExpression(var: [[BV:.*]], expr: !DIExpression())
-// CHECK: [[BV]] = distinct !DIGlobalVariable(name: "b",
-// CHECK-SAME: declaration: ![[DECL_B:[0-9]+]])
-// DWARF4: ![[DECL_B]] = !DIDerivedType(tag: DW_TAG_member, name: "b"
-// DWARF5: ![[DECL_B]] = !DIDerivedType(tag: DW_TAG_variable, name: "b"
-// CHECK-NOT: size:
-// CHECK-NOT: align:
-// CHECK-NOT: offset:
-// CHECK-SAME: flags: DIFlagProtected | DIFlagStaticMember)
-//
-// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "C"{{.*}})
-//
-// DWARF4: ![[DECL_A]] = !DIDerivedType(tag: DW_TAG_member, name: "a"
-// DWARF5: ![[DECL_A]] = !DIDerivedType(tag: DW_TAG_variable, name: "a"
-// CHECK-NOT: size:
-// CHECK-NOT: align:
-// CHECK-NOT: offset:
-// CHECK-SAME: flags: DIFlagStaticMember)
-//
-// DWARF4: ![[CONST_A_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "const_a"
-// DWARF5: ![[CONST_A_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_variable, name: "const_a"
-// CHECK-NOT: size:
-// CHECK-NOT: align:
-// CHECK-NOT: offset:
-// CHECK-SAME: flags: DIFlagStaticMember
-// CHECK-SAME: extraData: i1 true
-
-// DWARF4: ![[CONST_B_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "const_b"
-// DWARF5: ![[CONST_B_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_variable, name: "const_b"
-// CHECK-NOT: size:
-// CHECK-NOT: align:
-// CHECK-NOT: offset:
-// CHECK-SAME: flags: DIFlagProtected | DIFlagStaticMember
-// CHECK-SAME: extraData: float
-
-// DWARF4: ![[DECL_C:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "c"
-// DWARF5: ![[DECL_C:[0-9]+]] = !DIDerivedType(tag: DW_TAG_variable, name: "c"
-// CHECK-NOT: size:
-// CHECK-NOT: align:
-// CHECK-NOT: offset:
-// CHECK-SAME: flags: DIFlagPublic | DIFlagStaticMember)
-//
-// DWARF4: ![[CONST_C_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "const_c"
-// DWARF5: ![[CONST_C_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_variable, name: "const_c"
-// CHECK-NOT: size:
-// CHECK-NOT: align:
-// CHECK-NOT: offset:
-// CHECK-SAME: flags: DIFlagPublic | DIFlagStaticMember
-// CHECK-SAME: extraData: i32 18
-//
-// DWARF4: !DIDerivedType(tag: DW_TAG_member, name: "x_a"
-// DWARF5: !DIDerivedType(tag: DW_TAG_variable, name: "x_a"
-// CHECK-SAME: flags: DIFlagPublic | DIFlagStaticMember)
-
-int C::b = 2;
-// CHECK: [[C]] = !DIGlobalVariableExpression(var: [[CV:.*]], expr: !DIExpression())
-// CHECK: [[CV]] = distinct !DIGlobalVariable(name: "c", {{.*}} declaration: ![[DECL_C]])
-int C::c = 1;
-
-int main()
-{
- C instance_C;
- instance_C.d = 8;
- return C::c;
-}
-
-// CHECK-NOT: !DIGlobalVariable(name: "anon_static_decl_var"
-
-// Test this in an anonymous namespace to ensure the type is retained even when
-// it doesn't get automatically retained by the string type reference machinery.
-namespace {
-struct anon_static_decl_struct {
- static const int anon_static_decl_var = 117;
-};
-}
-
-int ref() {
- return anon_static_decl_struct::anon_static_decl_var;
-}
-
-template<typename T>
-struct static_decl_templ {
- static const int static_decl_templ_var = 7;
-};
-
-template<typename T>
-const int static_decl_templ<T>::static_decl_templ_var;
-
-int static_decl_templ_ref() {
- return static_decl_templ<int>::static_decl_templ_var;
-}
-
-// Verify that even when a static member declaration is created lazily when
-// creating the definition, the declaration line is that of the canonical
-// declaration, not the definition. Also, since we look at the canonical
-// definition, we should also correctly emit the constant value (42) into the
-// debug info.
-struct V {
- virtual ~V(); // cause the definition of 'V' to be omitted by no-standalone-debug optimization
- static const int const_va = 42;
-};
-
-// const_va is not emitted for MS targets.
-// NOT-MS: !DIDerivedType(tag: DW_TAG_member, name: "const_va",
-// NOT-MS-SAME: line: [[@LINE-5]]
-// NOT-MS-SAME: extraData: i32 42
-const int V::const_va;
-
-namespace x {
-struct y {
-// CHECK: !DIGlobalVariable(name: "z",
-// CHECK-SAME: scope: [[NS_X:![0-9]+]]
-// CHECK: [[NS_X]] = !DINamespace(name: "x"
- static int z;
-};
-int y::z;
-}
diff --git a/clang/test/CodeGenCXX/debug-info-struct-align.cpp b/clang/test/CodeGenCXX/debug-info-struct-align.cpp
deleted file mode 100644
index cd91f4c..0000000
--- a/clang/test/CodeGenCXX/debug-info-struct-align.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-// Test for debug info related to DW_AT_alignment attribute in the struct type.
-// RUN: %clang_cc1 -dwarf-version=5 -debug-info-kind=standalone -emit-llvm %s -o - | FileCheck %s
-
-// CHECK-DAG: DICompositeType(tag: DW_TAG_structure_type, name: "MyType", {{.*}}, align: 32
-// CHECK-DAG: DICompositeType(tag: DW_TAG_structure_type, name: "MyType1", {{.*}}, align: 8
-// CHECK-DAG: DICompositeType(tag: DW_TAG_structure_type, name: "MyType2", {{.*}}, align: 8
-
-struct MyType {
- int m;
-} __attribute__((aligned(1)));
-MyType mt;
-
-static_assert(alignof(MyType) == 4, "alignof MyType is wrong");
-
-struct MyType1 {
- int m;
-} __attribute__((packed, aligned(1)));
-MyType1 mt1;
-
-static_assert(alignof(MyType1) == 1, "alignof MyType1 is wrong");
-
-struct MyType2 {
- __attribute__((packed)) int m;
-} __attribute__((aligned(1)));
-MyType2 mt2;
-
-static_assert(alignof(MyType2) == 1, "alignof MyType2 is wrong");
-
-#pragma pack(1)
-struct MyType3 {
- int m;
-};
-MyType3 mt3;
-
-static_assert(alignof(MyType3) == 1, "alignof MyType3 is wrong");
diff --git a/clang/test/CodeGenCXX/debug-info-structured-binding-bitfield.cpp b/clang/test/CodeGenCXX/debug-info-structured-binding-bitfield.cpp
deleted file mode 100644
index b7aad6a..0000000
--- a/clang/test/CodeGenCXX/debug-info-structured-binding-bitfield.cpp
+++ /dev/null
@@ -1,317 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -triple aarch64 %s -o - | FileCheck %s
-
-struct S0 {
- unsigned int x : 16;
- unsigned int y : 16;
-};
-
-// CHECK-LABEL: define dso_local void @_Z3fS0v
-// CHECK: alloca %struct.S0, align 4
-// CHECK-NEXT: [[TMP0:%.*]] = alloca %struct.S0, align 4
-// CHECK: #dbg_declare(ptr [[TMP0]], [[S0_A:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 0, 16),
-// CHECK-NEXT: #dbg_declare(ptr [[TMP0]], [[S0_B:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 16, 16),
-//
-void fS0() {
- S0 s0;
- auto [a, b] = s0;
-}
-
-struct S1 {
- volatile unsigned int x : 16;
- volatile unsigned int y : 16;
-};
-
-// CHECK-LABEL: define dso_local void @_Z3fS1v
-// CHECK: alloca %struct.S1, align 4
-// CHECK-NEXT: [[TMP0:%.*]] = alloca %struct.S1, align 4
-// CHECK: #dbg_declare(ptr [[TMP0]], [[S1_A:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 0, 16),
-// CHECK-NEXT: #dbg_declare(ptr [[TMP0]], [[S1_B:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 16, 16),
-//
-void fS1() {
- S1 s1;
- auto [a, b] = s1;
-}
-
-struct S2 {
- unsigned int x : 8;
- unsigned int y : 8;
-};
-
-// CHECK-LABEL: define dso_local void @_Z3fS2v
-// CHECK: alloca %struct.S2, align 4
-// CHECK-NEXT: [[TMP0:%.*]] = alloca %struct.S2, align 4
-// CHECK: #dbg_declare(ptr [[TMP0]], [[S2_A:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 0, 8),
-// CHECK-NEXT: #dbg_declare(ptr [[TMP0]], [[S2_B:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 8, 8),
-//
-void fS2() {
- S2 s2;
- auto [a, b] = s2;
-}
-
-struct S3 {
- volatile unsigned int x : 8;
- volatile unsigned int y : 8;
-};
-
-// CHECK-LABEL: define dso_local void @_Z3fS3v
-// CHECK: alloca %struct.S3, align 4
-// CHECK-NEXT: [[TMP0:%.*]] = alloca %struct.S3, align 4
-// CHECK: #dbg_declare(ptr [[TMP0]], [[S3_A:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 0, 8),
-// CHECK-NEXT: #dbg_declare(ptr [[TMP0]], [[S3_B:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 8, 8),
-//
-void fS3() {
- S3 s3;
- auto [a, b] = s3;
-}
-
-struct S4 {
- unsigned int x : 8;
- unsigned int y : 16;
-};
-
-// CHECK-LABEL: define dso_local void @_Z3fS4v
-// CHECK: alloca %struct.S4, align 4
-// CHECK-NEXT: [[TMP0:%.*]] = alloca %struct.S4, align 4
-// CHECK: #dbg_declare(ptr [[TMP0]], [[S4_A:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 0, 8),
-// CHECK-NEXT: #dbg_declare(ptr [[TMP0]], [[S4_B:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 8, 16),
-//
-void fS4() {
- S4 s4;
- auto [a, b] = s4;
-}
-
-struct S5 {
- volatile unsigned int x : 8;
- volatile unsigned int y : 16;
-};
-
-// CHECK-LABEL: define dso_local void @_Z3fS5v
-// CHECK: alloca %struct.S5, align 4
-// CHECK-NEXT: [[TMP0:%.*]] = alloca %struct.S5, align 4
-// CHECK: #dbg_declare(ptr [[TMP0]], [[S5_A:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 0, 8),
-// CHECK-NEXT: #dbg_declare(ptr [[TMP0]], [[S5_B:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 8, 16),
-//
-void fS5() {
- S5 s5;
- auto [a, b] = s5;
-}
-
-struct S6 {
- unsigned int x : 16;
- unsigned int y : 8;
-};
-
-// CHECK-LABEL: define dso_local void @_Z3fS6v
-// CHECK: alloca %struct.S6, align 4
-// CHECK-NEXT: [[TMP0:%.*]] = alloca %struct.S6, align 4
-// CHECK: #dbg_declare(ptr [[TMP0]], [[S6_A:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 0, 16),
-// CHECK-NEXT: #dbg_declare(ptr [[TMP0]], [[S6_B:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 16, 8),
-//
-void fS6() {
- S6 s6;
- auto [a, b] = s6;
-}
-
-struct S7 {
- volatile unsigned int x : 16;
- volatile unsigned int y : 8;
-};
-
-// CHECK-LABEL: define dso_local void @_Z3fS7v
-// CHECK: alloca %struct.S7, align 4
-// CHECK-NEXT: [[TMP0:%.*]] = alloca %struct.S7, align 4
-// CHECK: #dbg_declare(ptr [[TMP0]], [[S7_A:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 0, 16),
-// CHECK-NEXT: #dbg_declare(ptr [[TMP0]], [[S7_B:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 16, 8),
-//
-void fS7() {
- S7 s7;
- auto [a, b] = s7;
-}
-
-struct S8 {
- unsigned int x : 16;
- volatile unsigned int y : 16;
-};
-
-// CHECK-LABEL: define dso_local void @_Z3fS8v
-// CHECK: alloca %struct.S8, align 4
-// CHECK-NEXT: [[TMP0:%.*]] = alloca %struct.S8, align 4
-// CHECK: #dbg_declare(ptr [[TMP0]], [[S8_A:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 0, 16),
-// CHECK-NEXT: #dbg_declare(ptr [[TMP0]], [[S8_B:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 16, 16),
-//
-void fS8() {
- S8 s8;
- auto [a, b] = s8;
-}
-
-struct S9 {
- unsigned int x : 16;
- unsigned int y : 32;
-};
-
-// CHECK-LABEL: define dso_local void @_Z3fS9v
-// CHECK: alloca %struct.S9, align 4
-// CHECK-NEXT: [[TMP0:%.*]] = alloca %struct.S9, align 4
-// CHECK: #dbg_declare(ptr [[TMP0]], [[S9_A:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 0, 16),
-// CHECK-NEXT: #dbg_declare(ptr [[TMP0]], [[S9_B:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 32, 32),
-//
-void fS9() {
- S9 s9;
- auto [a, b] = s9;
-}
-
-struct S10 {
- const unsigned int x : 8;
- const volatile unsigned int y : 8;
-
-// CHECK-LABEL: define dso_local void @_Z4fS10v
-// CHECK: alloca %struct.S10, align 4
-// CHECK-NEXT: [[TMP0:%.*]] = alloca %struct.S10, align 4
-// CHECK: #dbg_declare(ptr [[TMP0]], [[S10_A:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 0, 8),
-// CHECK-NEXT: #dbg_declare(ptr [[TMP0]], [[S10_B:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 8, 8),
-//
- S10() : x(0), y(0) {}
-};
-
-void fS10() {
- S10 s10;
- auto [a, b] = s10;
-}
-
-struct S11 {
- unsigned int x : 15;
- unsigned int y : 16;
-};
-
-// CHECK-LABEL: define dso_local void @_Z4fS11v
-// CHECK: alloca %struct.S11, align 4
-// CHECK-NEXT: [[TMP0:%.*]] = alloca %struct.S11, align 4
-// CHECK: #dbg_declare(ptr [[TMP0]], [[S11_A:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 0, 15),
-// CHECK-NEXT: #dbg_declare(ptr [[TMP0]], [[S11_B:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 15, 16),
-//
-void fS11() {
- S11 s11;
- auto [a, b] = s11;
-}
-
-struct S12 {
- unsigned int x : 16;
- unsigned int y : 17;
-};
-
-// CHECK-LABEL: define dso_local void @_Z4fS12v
-// CHECK: alloca %struct.S12, align 4
-// CHECK-NEXT: [[TMP0:%.*]] = alloca %struct.S12, align 4
-// CHECK: #dbg_declare(ptr [[TMP0]], [[S12_A:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 0, 16),
-// CHECK-NEXT: #dbg_declare(ptr [[TMP0]], [[S12_B:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 32, 17),
-//
-void fS12() {
- S12 s12;
- auto [a, b] = s12;
-}
-
-struct __attribute__((packed)) S13 {
- unsigned int x : 15;
- unsigned int y : 16;
-};
-
-// CHECK-LABEL: define dso_local void @_Z4fS13v
-// CHECK: alloca %struct.S13, align 1
-// CHECK-NEXT: [[TMP0:%.*]] = alloca %struct.S13, align 1
-// CHECK: #dbg_declare(ptr [[TMP0]], [[S13_A:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 0, 15),
-// CHECK-NEXT: #dbg_declare(ptr [[TMP0]], [[S13_B:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_zext, 15, 16),
-//
-void fS13() {
- S13 s13;
- auto [a, b] = s13;
-}
-
-struct S14 {
- signed int x;
- signed int y : 7;
-};
-
-// CHECK-LABEL: define dso_local void @_Z4fS14v
-// CHECK: alloca %struct.S14, align 4
-// CHECK-NEXT: [[TMP0:%.*]] = alloca %struct.S14, align 4
-// CHECK: #dbg_declare(ptr [[TMP0]], [[S14_A:![0-9]+]], !DIExpression(),
-// CHECK-NEXT: #dbg_declare(ptr [[TMP0]], [[S14_B:![0-9]+]], !DIExpression(DW_OP_plus_uconst, 4, DW_OP_LLVM_extract_bits_sext, 0, 7),
-//
-void fS14() {
- S14 s14;
- auto [a, b] = s14;
-}
-
-struct S15 {
- signed int x : 123;
- unsigned int y : 987;
-};
-
-// CHECK-LABEL: define dso_local void @_Z4fS15v
-// CHECK: alloca %struct.S15, align 16
-// CHECK-NEXT: [[TMP0:%.*]] = alloca %struct.S15, align 16
-// CHECK: #dbg_declare(ptr [[TMP0]], [[S15_A:![0-9]+]], !DIExpression(DW_OP_LLVM_extract_bits_sext, 0, 32),
-// CHECK-NEXT: #dbg_declare(ptr [[TMP0]], [[S15_B:![0-9]+]], !DIExpression(DW_OP_plus_uconst, 16, DW_OP_LLVM_extract_bits_zext, 0, 32),
-//
-void fS15() {
- S15 s15;
- auto [a, b] = s15;
-}
-
-// CHECK: [[UINT_TY:![0-9]+]] = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
-// CHECK: [[S0_A]] = !DILocalVariable(name: "a", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[UINT_TY]])
-// CHECK: [[S0_B]] = !DILocalVariable(name: "b", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[UINT_TY]])
-
-// CHECK: [[VOLATILE_UINT_TY:![0-9]+]] = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: [[UINT_TY]])
-// CHECK: [[S1_A]] = !DILocalVariable(name: "a", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[VOLATILE_UINT_TY:![0-9]+]])
-// CHECK: [[S1_B]] = !DILocalVariable(name: "b", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[VOLATILE_UINT_TY]])
-
-// CHECK: [[S2_A]] = !DILocalVariable(name: "a", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[UINT_TY]])
-// CHECK: [[S2_B]] = !DILocalVariable(name: "b", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[UINT_TY]])
-
-// CHECK: [[S3_A]] = !DILocalVariable(name: "a", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[VOLATILE_UINT_TY]])
-// CHECK: [[S3_B]] = !DILocalVariable(name: "b", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[VOLATILE_UINT_TY]])
-
-// CHECK: [[S4_A]] = !DILocalVariable(name: "a", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[UINT_TY]])
-// CHECK: [[S4_B]] = !DILocalVariable(name: "b", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[UINT_TY]])
-
-// CHECK: [[S5_A]] = !DILocalVariable(name: "a", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[VOLATILE_UINT_TY]])
-// CHECK: [[S5_B]] = !DILocalVariable(name: "b", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[VOLATILE_UINT_TY]])
-
-// CHECK: [[S6_A]] = !DILocalVariable(name: "a", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[UINT_TY]])
-// CHECK: [[S6_B]] = !DILocalVariable(name: "b", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[UINT_TY]])
-
-// CHECK: [[S7_A]] = !DILocalVariable(name: "a", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[VOLATILE_UINT_TY]])
-// CHECK: [[S7_B]] = !DILocalVariable(name: "b", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[VOLATILE_UINT_TY]])
-
-// CHECK: [[S8_A]] = !DILocalVariable(name: "a", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[UINT_TY]])
-// CHECK: [[S8_B]] = !DILocalVariable(name: "b", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[VOLATILE_UINT_TY]])
-
-// CHECK: [[S9_A]] = !DILocalVariable(name: "a", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[UINT_TY]])
-// CHECK: [[S9_B]] = !DILocalVariable(name: "b", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[UINT_TY]])
-
-// CHECK: [[CONST_UINT_TY:![0-9]+]] = !DIDerivedType(tag: DW_TAG_const_type, baseType: [[UINT_TY]])
-// CHECK: [[CONST_VOLATILE_UINT_TY:![0-9]+]] = !DIDerivedType(tag: DW_TAG_const_type, baseType: [[VOLATILE_UINT_TY]])
-// CHECK: [[S10_A]] = !DILocalVariable(name: "a", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[CONST_UINT_TY]])
-// CHECK: [[S10_B]] = !DILocalVariable(name: "b", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[CONST_VOLATILE_UINT_TY]])
-
-// S11
-// CHECK: [[S11_A]] = !DILocalVariable(name: "a", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[UINT_TY]])
-// CHECK: [[S11_B]] = !DILocalVariable(name: "b", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[UINT_TY]])
-
-// S12
-// CHECK: [[S12_A]] = !DILocalVariable(name: "a", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[UINT_TY]])
-// CHECK: [[S12_B]] = !DILocalVariable(name: "b", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[UINT_TY]])
-
-// S13
-// CHECK: [[S13_A]] = !DILocalVariable(name: "a", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[UINT_TY]])
-// CHECK: [[S13_B]] = !DILocalVariable(name: "b", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[UINT_TY]])
-
-// S14
-// CHECK: [[SINT_TY:![0-9]+]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-// CHECK: [[S14_A]] = !DILocalVariable(name: "a", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[SINT_TY]])
-// CHECK: [[S14_B]] = !DILocalVariable(name: "b", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[SINT_TY]])
-
-// S15
-// CHECK: [[S15_A]] = !DILocalVariable(name: "a", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[SINT_TY]])
-// CHECK: [[S15_B]] = !DILocalVariable(name: "b", scope: {{.*}}, file: {{.*}}, line: {{.*}}, type: [[UINT_TY]])
diff --git a/clang/test/CodeGenCXX/debug-info-structured-binding.cpp b/clang/test/CodeGenCXX/debug-info-structured-binding.cpp
deleted file mode 100644
index 5fbd54c..0000000
--- a/clang/test/CodeGenCXX/debug-info-structured-binding.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -triple %itanium_abi_triple %s -o - | FileCheck %s --implicit-check-not="call void @llvm.dbg.declare"
-
-// CHECK: #dbg_declare(ptr %{{[a-z]+}}, ![[VAR_0:[0-9]+]], !DIExpression(),
-// CHECK: #dbg_declare(ptr %{{[0-9]+}}, ![[VAR_1:[0-9]+]], !DIExpression(),
-// CHECK: #dbg_declare(ptr %{{[0-9]+}}, ![[VAR_2:[0-9]+]], !DIExpression(DW_OP_plus_uconst, 4),
-// CHECK: #dbg_declare(ptr %{{[0-9]+}}, ![[VAR_3:[0-9]+]], !DIExpression(DW_OP_deref),
-// CHECK: #dbg_declare(ptr %{{[0-9]+}}, ![[VAR_4:[0-9]+]], !DIExpression(DW_OP_deref, DW_OP_plus_uconst, 4),
-// CHECK: #dbg_declare(ptr %z1, ![[VAR_5:[0-9]+]], !DIExpression()
-// CHECK: #dbg_declare(ptr %z2, ![[VAR_6:[0-9]+]], !DIExpression()
-// CHECK: ![[VAR_0]] = !DILocalVariable(name: "a"
-// CHECK: ![[VAR_1]] = !DILocalVariable(name: "x1", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: {{[0-9]+}}, type: !{{[0-9]+}})
-// CHECK: ![[VAR_2]] = !DILocalVariable(name: "y1", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: {{[0-9]+}}, type: !{{[0-9]+}})
-// CHECK: ![[VAR_3]] = !DILocalVariable(name: "x2", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: {{[0-9]+}}, type: !{{[0-9]+}})
-// CHECK: ![[VAR_4]] = !DILocalVariable(name: "y2", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: {{[0-9]+}}, type: !{{[0-9]+}})
-// CHECK: ![[VAR_5]] = !DILocalVariable(name: "z1", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: {{[0-9]+}}, type: !{{[0-9]+}})
-// CHECK: ![[VAR_6]] = !DILocalVariable(name: "z2", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: {{[0-9]+}}, type: !{{[0-9]+}})
-
-struct A {
- int x;
- int y;
-};
-
-struct B {
- int w;
- int z;
- template<int> int get();
- template<> int get<0>() { return w; }
- template<> int get<1>() { return z; }
-};
-
-// Note: the following declarations are necessary for decomposition of tuple-like
-// structured bindings
-namespace std {
-template<typename T> struct tuple_size {
-};
-template<>
-struct tuple_size<B> {
- static constexpr unsigned value = 2;
-};
-
-template<unsigned, typename T> struct tuple_element { using type = int; };
-} // namespace std
-
-int f() {
- A a{10, 20};
- auto [x1, y1] = a;
- auto &[x2, y2] = a;
- auto [z1, z2] = B{1, 2};
- return x1 + y1 + x2 + y2 + z1 + z2;
-}
diff --git a/clang/test/CodeGenCXX/debug-info-template-align.cpp b/clang/test/CodeGenCXX/debug-info-template-align.cpp
deleted file mode 100644
index 42fdb26..0000000
--- a/clang/test/CodeGenCXX/debug-info-template-align.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-// Test for debug info related to DW_AT_alignment attribute in the typedef operator
-// Supported: -O0, standalone DI
-// RUN: %clang_cc1 -dwarf-version=5 -emit-llvm -triple x86_64-linux-gnu %s -o - \
-// RUN: -O0 -disable-llvm-passes \
-// RUN: -debug-info-kind=standalone \
-// RUN: | FileCheck %s
-
-// CHECK: DIDerivedType(tag: DW_TAG_typedef, {{.*}}, align: 512
-
-typedef char __attribute__((__aligned__(64))) alchar;
-
-int main() {
- alchar newChar;
-}
diff --git a/clang/test/CodeGenCXX/debug-info-template-array.cpp b/clang/test/CodeGenCXX/debug-info-template-array.cpp
deleted file mode 100644
index 305327b..0000000
--- a/clang/test/CodeGenCXX/debug-info-template-array.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %clang -emit-llvm -g -S %s -o -
-// PR13531
-template <typename>
-struct unique_ptr {
- unique_ptr() {}
-};
-
-template <unsigned>
-struct Vertex {};
-
-void crash() // Asserts
-{
- unique_ptr<Vertex<2>[]> v = unique_ptr<Vertex<2>[]>();
-}
diff --git a/clang/test/CodeGenCXX/debug-info-template-deduction-guide.cpp b/clang/test/CodeGenCXX/debug-info-template-deduction-guide.cpp
deleted file mode 100644
index 036deb0..0000000
--- a/clang/test/CodeGenCXX/debug-info-template-deduction-guide.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-// RUN: %clang -S -emit-llvm -target x86_64-unknown_unknown -g %s -o - -std=c++1z | FileCheck %s
-
-// Verify that we don't crash when emitting debug information for objects
-// created from a deduced template specialization.
-
-template <class T>
-struct S {
- S(T) {}
-};
-
-// CHECK-DAG: !DIGlobalVariable(name: "s1"{{.*}} type: [[TYPE_NUM:![0-9]+]]
-// CHECK-DAG: !DIGlobalVariable(name: "s2"{{.*}} type: [[TYPE_NUM]]
-// CHECK-DAG: [[TYPE_NUM]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "S<int>",
-S s1(42);
-S<int> s2(42);
diff --git a/clang/test/CodeGenCXX/debug-info-template-explicit-specialization.cpp b/clang/test/CodeGenCXX/debug-info-template-explicit-specialization.cpp
deleted file mode 100644
index b756674..0000000
--- a/clang/test/CodeGenCXX/debug-info-template-explicit-specialization.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -debug-info-kind=limited %s -o - | FileCheck %s
-
-// Make sure this still works with constructor homing.
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -debug-info-kind=constructor %s -o - | FileCheck %s
-
-// Run again with -gline-tables-only or -gline-directives-only and verify we don't crash. We won't output
-// type info at all.
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -debug-info-kind=line-tables-only %s -o - | FileCheck %s -check-prefix LINES-ONLY
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -debug-info-kind=line-directives-only %s -o - | FileCheck %s -check-prefix LINES-ONLY
-
-// LINES-ONLY-NOT: !DICompositeType(tag: DW_TAG_structure_type
-
-// "h" is at the top because it's in the compile unit's retainedTypes: list.
-// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "h<int>"
-// CHECK-NOT: DIFlagFwdDecl
-// CHECK-SAME: ){{$}}
-
-template <typename T>
-struct a {
-};
-extern template class a<int>;
-// CHECK-NOT: DICompositeType(tag: DW_TAG_structure_type, name: "a<int>"
-
-template <typename T>
-struct b {
-};
-extern template class b<int>;
-b<int> bi;
-
-template <typename T>
-struct c {
- void f() {}
-};
-extern template class c<int>;
-c<int> ci;
-// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "c<int>"
-// CHECK-SAME: DIFlagFwdDecl
-
-template <typename T>
-struct d {
- void f();
-};
-extern template class d<int>;
-d<int> di;
-// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "d<int>"
-// CHECK-NOT: DIFlagFwdDecl
-// CHECK-SAME: ){{$}}
-
-template <typename T>
-struct e {
- void f();
-};
-template <typename T>
-void e<T>::f() {
-}
-extern template class e<int>;
-e<int> ei;
-// There's no guarantee that the out of line definition will appear before the
-// explicit template instantiation definition, so conservatively emit the type
-// definition here.
-// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "e<int>"
-// CHECK-NOT: DIFlagFwdDecl
-// CHECK-SAME: ){{$}}
-
-template <typename T>
-struct f {
- void g();
-};
-extern template class f<int>;
-template <typename T>
-void f<T>::g() {
-}
-f<int> fi;
-// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "f<int>"
-// CHECK-NOT: DIFlagFwdDecl
-// CHECK-SAME: ){{$}}
-
-template <typename T>
-struct g {
- void f();
-};
-template <>
-void g<int>::f();
-extern template class g<int>;
-g<int> gi;
-// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "g<int>"
-// CHECK-NOT: DIFlagFwdDecl
-// CHECK-SAME: ){{$}}
-
-template <typename T>
-struct h {
-};
-template class h<int>;
-
-template <typename T>
-struct i {
- void f() {}
-};
-template<> void i<int>::f();
-extern template class i<int>;
-i<int> ii;
-// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "i<int>"
-// CHECK-NOT: DIFlagFwdDecl
-// CHECK-SAME: ){{$}}
-
-template <typename T1, typename T2 = T1>
-struct j {
-};
-extern template class j<int>;
-j<int> jj;
-template <typename T>
-struct j_wrap {
-};
-j_wrap<j<int>> j_wrap_j;
-// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "j<int, int>"
-// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "j_wrap<j<int, int> >"
-
-template <typename T>
-struct k {
-};
-template <>
-struct k<int>;
-template struct k<int>;
-// CHECK-NOT: !DICompositeType(tag: DW_TAG_structure_type, name: "k<int>"
-
-// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "b<int>"
-// CHECK-NOT: DIFlagFwdDecl
-// CHECK-SAME: ){{$}}
diff --git a/clang/test/CodeGenCXX/debug-info-template-fwd.cpp b/clang/test/CodeGenCXX/debug-info-template-fwd.cpp
deleted file mode 100644
index b6c6aa1..0000000
--- a/clang/test/CodeGenCXX/debug-info-template-fwd.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -debug-info-kind=limited -emit-llvm -o - | FileCheck %s
-// This test is for a crash when emitting debug info for not-yet-completed
-// types.
-// Test that we don't actually emit a forward decl for the offending class:
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "Derived<int>"
-// CHECK-NOT: DIFlagFwdDecl
-// CHECK-SAME: ){{$}}
-template <class A> class Derived;
-
-template <class A> class Base {
- static Derived<A> *create();
-};
-
-template <class A> struct Derived : Base<A> {
-};
-
-Base<int> *f;
-
-// During the instantiation of Derived<int>, Base<int> becomes required to be
-// complete - since the declaration has already been emitted (due to 'f',
-// above), we immediately try to build debug info for Base<int> which then
-// requires the (incomplete definition) of Derived<int> which is problematic.
-//
-// (if 'f' is not present, the point at which Base<int> becomes required to be
-// complete during the instantiation of Derived<int> is a no-op because
-// Base<int> was never emitted so we ignore it and carry on until we
-// wire up the base class of Derived<int> in the debug info later on)
-Derived<int> d;
diff --git a/clang/test/CodeGenCXX/debug-info-template-limit.cpp b/clang/test/CodeGenCXX/debug-info-template-limit.cpp
deleted file mode 100644
index 172ab94..0000000
--- a/clang/test/CodeGenCXX/debug-info-template-limit.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple %itanium_abi_triple %s -o - | FileCheck %s
-
-// Check that this pointer type is TC<int>
-// CHECK: ![[LINE:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_class_type, name: "TC<int>"{{.*}}, identifier: "_ZTS2TCIiE")
-// CHECK: !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[LINE]]
-
-template<typename T>
-class TC {
-public:
- TC(const TC &) {}
- TC() {}
-};
-
-TC<int> tci;
diff --git a/clang/test/CodeGenCXX/debug-info-template-member.cpp b/clang/test/CodeGenCXX/debug-info-template-member.cpp
deleted file mode 100644
index bb947c2..0000000
--- a/clang/test/CodeGenCXX/debug-info-template-member.cpp
+++ /dev/null
@@ -1,130 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
-
-// CHECK: @x ={{.*}} global %"struct.outer<foo>::inner" zeroinitializer, align 4, !dbg [[X:![0-9]+]]
-
-struct MyClass {
- template <int i> int add(int j) {
- return i + j;
- }
- virtual void func() {
- }
-};
-
-int add2(int x) {
- return MyClass().add<2>(x);
-}
-
-inline int add3(int x) {
- return MyClass().add<3>(x); // even though add<3> is ODR used, don't emit it since we don't codegen it
-}
-
-// The compile unit pulls in the global variables first.
-// CHECK: [[X]] = !DIGlobalVariableExpression(var: [[XV:.*]], expr: !DIExpression())
-// CHECK: [[XV]] = distinct !DIGlobalVariable(name: "x",
-// CHECK-SAME: type: ![[OUTER_FOO_INNER_ID:[0-9]+]]
-
-// CHECK: [[C:![0-9]*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "MyClass"
-// CHECK-SAME: elements: [[C_MEM:![0-9]*]]
-// CHECK-SAME: vtableHolder: [[C]]
-// CHECK-SAME: identifier: "_ZTS7MyClass")
-// CHECK: [[C_MEM]] = !{[[C_VPTR:![0-9]*]], [[C_FUNC:![0-9]*]]}
-// CHECK: [[C_VPTR]] = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$MyClass"
-
-// CHECK: [[C_FUNC]] = !DISubprogram(name: "func",{{.*}} line: 9,
-
-// CHECK: [[VIRT_TEMP:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "virt<elem>"
-// CHECK-SAME: elements: [[VIRT_MEM:![0-9]*]]
-// CHECK-SAME: vtableHolder: [[VIRT_TEMP]]
-// CHECK-SAME: templateParams: [[VIRT_TEMP_PARAM:![0-9]*]]
-// CHECK-SAME: identifier: "_ZTS4virtI4elemE"
-
-// CHECK: [[ELEM:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "elem"
-// CHECK-SAME: elements: [[ELEM_MEM:![0-9]*]]
-// CHECK-SAME: identifier: "_ZTS4elem"
-// CHECK: [[ELEM_MEM]] = !{[[ELEM_X:![0-9]*]]}
-// CHECK: [[ELEM_X]] = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: [[ELEM]]
-// CHECK-SAME: baseType: [[VIRT_TEMP:![0-9]+]]
-
-// CHECK: [[VIRT_TEMP_PARAM]] = !{[[VIRT_T:![0-9]*]]}
-// CHECK: [[VIRT_T]] = !DITemplateTypeParameter(name: "T", type: [[ELEM]])
-
-// CHECK: {{![0-9]+}} = distinct !DIGlobalVariable(
-// CHECK-SAME: name: "var"
-// CHECK-SAME: templateParams: {{![0-9]+}}
-// CHECK: !DITemplateTypeParameter(name: "T", type: [[TY:![0-9]+]])
-// CHECK: {{![0-9]+}} = distinct !DIGlobalVariable(
-// CHECK-SAME: name: "var"
-// CHECK-SAME: templateParams: {{![0-9]+}}
-// CHECK: !DITemplateTypeParameter(name: "T", type: {{![0-9]+}})
-// CHECK: {{![0-9]+}} = distinct !DIGlobalVariable(
-// CHECK-SAME: name: "varray"
-// CHECK-SAME: templateParams: {{![0-9]+}}
-// CHECK: !DITemplateValueParameter(name: "N", type: [[TY]], value: i32 1)
-
-// CHECK: ![[OUTER_FOO_INNER_ID:[0-9]*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "inner"{{.*}}, identifier:
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"
-// CHECK-SAME: elements: [[FOO_MEM:![0-9]*]]
-// CHECK-SAME: identifier: "_ZTS3foo"
-// CHECK: [[FOO_MEM]] = !{[[FOO_FUNC:![0-9]*]]}
-// CHECK: [[FOO_FUNC]] = !DISubprogram(name: "func", linkageName: "_ZN3foo4funcEN5outerIS_E5innerE",
-// CHECK-SAME: type: [[FOO_FUNC_TYPE:![0-9]*]]
-// CHECK: [[FOO_FUNC_TYPE]] = !DISubroutineType(types: [[FOO_FUNC_PARAMS:![0-9]*]])
-// CHECK: [[FOO_FUNC_PARAMS]] = !{null, !{{[0-9]*}}, ![[OUTER_FOO_INNER_ID]]}
-
-// CHECK: !DISubprogram(name: "add<2>"
-// CHECK-SAME: scope: [[C]]
-
-template<typename T>
-struct outer {
- struct inner {
- int i;
- };
-};
-
-struct foo {
- void func(outer<foo>::inner);
-};
-
-inline void func() {
- // require 'foo' to be complete before the emission of 'inner' so that, when
- // constructing the context chain for 'x' we emit the full definition of
- // 'foo', which requires the definition of 'inner' again
- foo f;
-}
-
-outer<foo>::inner x;
-
-template <typename T>
-struct virt {
- T* values;
- virtual ~virt();
-};
-struct elem {
- static virt<elem> x; // ensure that completing 'elem' will require/completing 'virt<elem>'
-};
-inline void f1() {
- elem e; // ensure 'elem' is required to be complete when it is emitted as a template argument for 'virt<elem>'
-};
-void f2() {
- virt<elem> d; // emit 'virt<elem>'
-}
-
-// Check that the member function template specialization and implicit special
-// members (the default ctor) refer to their class by scope, even though they
-// didn't appear in the class's member list (C_MEM). This prevents the functions
-// from being added to type units, while still appearing in the type
-// declaration/reference in the compile unit.
-// CHECK: !DISubprogram(name: "MyClass"
-// CHECK-SAME: scope: [[C]]
-
-template <typename T>
-T var = T();
-template <typename P>
-P var<P *> = P();
-template <typename T, int N>
-T varray[N];
-void f3() {
- var<int> = 1;
- var<int *> = 1;
- varray<int, 1>[0] = 1;
-}
diff --git a/clang/test/CodeGenCXX/debug-info-template-parameter.cpp b/clang/test/CodeGenCXX/debug-info-template-parameter.cpp
deleted file mode 100644
index b2ca54a..0000000
--- a/clang/test/CodeGenCXX/debug-info-template-parameter.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-// Test for DebugInfo for Defaulted parameters for C++ templates
-// Supported: -O0, standalone DI
-
-// RUN: %clang_cc1 -emit-llvm %std_cxx11-14 -dwarf-version=5 -triple x86_64 %s -O0 -disable-llvm-passes -debug-info-kind=standalone -o - | FileCheck %s --check-prefixes=CHECK,PRE17
-// RUN: %clang_cc1 -emit-llvm %std_cxx17- -dwarf-version=5 -triple x86_64 %s -O0 -disable-llvm-passes -debug-info-kind=standalone -o - | FileCheck %s --check-prefixes=CHECK,CXX17
-// RUN: %clang_cc1 -emit-llvm %std_cxx17- -dwarf-version=4 -triple x86_64 %s -O0 -disable-llvm-passes -debug-info-kind=standalone -o - | FileCheck %s --check-prefixes=CHECK,CXX17
-// RUN: %clang_cc1 -emit-llvm %std_cxx20- -dwarf-version=5 -DCXX20=1 -triple x86_64 %s -O0 -disable-llvm-passes -debug-info-kind=standalone -o - | FileCheck %s --check-prefix=CHECK-CXX20
-
-// CHECK: DILocalVariable(name: "f1", {{.*}}, type: ![[TEMPLATE_TYPE:[0-9]+]]
-// CHECK: [[TEMPLATE_TYPE]] = {{.*}}!DICompositeType({{.*}}, templateParams: ![[F1_TYPE:[0-9]+]]
-// CHECK: [[F1_TYPE]] = !{![[FIRST:[0-9]+]], ![[SECOND:[0-9]+]], ![[THIRD:[0-9]+]], ![[FORTH:[0-9]+]], ![[FIFTH:[0-9]+]]}
-// CHECK: [[FIRST]] = !DITemplateTypeParameter(name: "T", type: !{{[0-9]*}})
-// CHECK: [[SECOND]] = !DITemplateValueParameter(name: "i", type: !{{[0-9]*}}, value: i32 6)
-// PRE17: [[THIRD]] = !DITemplateValueParameter(name: "b", type: !{{[0-9]*}}, value: i8 0)
-// CXX17: [[THIRD]] = !DITemplateValueParameter(name: "b", type: !{{[0-9]*}}, value: i1 false)
-// CHECK: [[FIFTH]] = !DITemplateTypeParameter(name: "d", type: !{{[0-9]*}})
-
-// CHECK: DILocalVariable(name: "f2", {{.*}}, type: ![[TEMPLATE_TYPE:[0-9]+]]
-// CHECK: [[TEMPLATE_TYPE]] = {{.*}}!DICompositeType({{.*}}, templateParams: ![[F2_TYPE:[0-9]+]]
-// CHECK: [[F2_TYPE]] = !{![[FIRST:[0-9]+]], ![[SECOND:[0-9]+]], ![[THIRD:[0-9]+]], ![[FORTH:[0-9]+]], ![[FIFTH:[0-9]+]]}
-// CHECK: [[FIRST]] = !DITemplateTypeParameter(name: "T", type: !{{[0-9]*}}, defaulted: true)
-// CHECK: [[SECOND]] = !DITemplateValueParameter(name: "i", type: !{{[0-9]*}}, defaulted: true, value: i32 3)
-// PRE17: [[THIRD]] = !DITemplateValueParameter(name: "b", type: !{{[0-9]*}}, defaulted: true, value: i8 1)
-// CXX17: [[THIRD]] = !DITemplateValueParameter(name: "b", type: !{{[0-9]*}}, defaulted: true, value: i1 true)
-// CHECK: [[FIFTH]] = !DITemplateTypeParameter(name: "d", type: !{{[0-9]*}}, defaulted: true)
-
-// CHECK: DILocalVariable(name: "b1", {{.*}}, type: ![[TEMPLATE_TYPE:[0-9]+]]
-// CHECK: [[TEMPLATE_TYPE]] = {{.*}}!DICompositeType({{.*}}, templateParams: ![[B1_TYPE:[0-9]+]]
-// CHECK: [[B1_TYPE]] = !{![[FIRST:[0-9]+]]}
-// CHECK: [[FIRST]] = !DITemplateValueParameter(tag: DW_TAG_GNU_template_template_param, name: "CT", value: !"qux")
-
-// CHECK: DILocalVariable(name: "b2", {{.*}}, type: ![[TEMPLATE_TYPE:[0-9]+]]
-// CHECK: [[TEMPLATE_TYPE]] = {{.*}}!DICompositeType({{.*}}, templateParams: ![[B2_TYPE:[0-9]+]]
-// CHECK: [[B2_TYPE]] = !{![[FIRST:[0-9]+]]}
-// CHECK: [[FIRST]] = !DITemplateValueParameter(tag: DW_TAG_GNU_template_template_param, name: "CT", defaulted: true, value: !"bar")
-
-template <typename T>
-class bar {
-};
-
-template <typename T>
-class qux {
-};
-
-template <typename T = char, int i = 3, bool b = true, int x = sizeof(T),
- typename d = bar<T>>
-class foo {
-};
-
-template <template <typename T> class CT = bar>
-class baz {
-};
-
-#ifdef CXX20
-struct non_empty { int mem; int mem2; } ne;
-
-template<float f = -1.5f, double d = 5.2, int * p = &ne.mem2>
-class nttp {};
-nttp<> n1;
-
-// CHECK-CXX20: DIGlobalVariable(name: "n1", {{.*}}, type: ![[NTTP_TYPE:[0-9]+]]
-// CHECK-CXX20: [[NTTP_TYPE]] = {{.*}}!DICompositeType({{.*}}name: "nttp
-// CHECK-CXX20-SAME: templateParams: ![[NTTP_TEMPLATES:[0-9]+]]
-// CHECK-CXX20: [[NTTP_TEMPLATES]] = !{![[FIRST:[0-9]+]], ![[SECOND:[0-9]+]], ![[THIRD:[0-9]+]]}
-// CHECK-CXX20: [[FIRST]] = !DITemplateValueParameter(name: "f"
-// CHECK-CXX20-SAME: defaulted: true
-// CHECK-CXX20-SAME: value: float -1.500000e+00
-// CHECK-CXX20: [[SECOND]] = !DITemplateValueParameter(name: "d"
-// CHECK-CXX20-SAME: defaulted: true
-// CHECK-CXX20-SAME: value: double 5.200000e+00
-// CHECK-CXX20: [[THIRD]] = !DITemplateValueParameter(name: "p"
-// CHECK-CXX20-SAME: defaulted: true
-// CHECK-CXX20-SAME: value: ptr getelementptr (i8, ptr @ne, i64 4)
-
-#endif // CXX20
-
-int main() {
- foo<int, 6, false, 3, double> f1;
- foo<> f2;
- baz<qux> b1;
- baz<> b2;
- return 0;
-}
diff --git a/clang/test/CodeGenCXX/debug-info-template-partial-specialization.cpp b/clang/test/CodeGenCXX/debug-info-template-partial-specialization.cpp
deleted file mode 100644
index 1595bf8..0000000
--- a/clang/test/CodeGenCXX/debug-info-template-partial-specialization.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o - -debug-info-kind=standalone %std_cxx98-14 | FileCheck %s --check-prefixes=CHECK,PRE17
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o - -debug-info-kind=standalone %std_cxx17- | FileCheck %s --check-prefixes=CHECK,CXX17
-namespace __pointer_type_imp
-{
- template <class _Tp, class _Dp, bool > struct __pointer_type1 {};
-
- // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "__pointer_type1<C, default_delete<C>, false>",
- // CHECK-SAME: templateParams: ![[PARAMS:[0-9]+]]
- // CHECK-SAME: identifier: "_ZTSN18__pointer_type_imp15__pointer_type1I1C14default_deleteIS1_ELb0EEE"
- template <class _Tp, class _Dp> struct __pointer_type1<_Tp, _Dp, false>
- {
- typedef _Tp* type;
- };
-}
-template <class _Tp, class _Dp>
-struct __pointer_type2
-{
- // Test that the bool template type parameter is emitted.
- //
- // CHECK: ![[PARAMS]] = !{!{{.*}}, !{{.*}}, ![[FALSE:[0-9]+]]}
- // PRE17: ![[FALSE]] = !DITemplateValueParameter(type: !{{[0-9]+}}, value: i8 0)
- // CXX17: ![[FALSE]] = !DITemplateValueParameter(type: !{{[0-9]+}}, value: i1 false)
- typedef typename __pointer_type_imp::__pointer_type1<_Tp, _Dp, false>::type type;
-};
-template <class _Tp> struct default_delete {};
-template <class _Tp, class _Dp = default_delete<_Tp> > class unique_ptr
-{
- typedef typename __pointer_type2<_Tp, _Dp>::type pointer;
- unique_ptr(pointer __p, _Dp __d) {}
-};
-class C {
- unique_ptr<C> Ptr;
-};
-void foo(C &c) {
-}
diff --git a/clang/test/CodeGenCXX/debug-info-template-quals.cpp b/clang/test/CodeGenCXX/debug-info-template-quals.cpp
deleted file mode 100644
index cfee78d..0000000
--- a/clang/test/CodeGenCXX/debug-info-template-quals.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
-
-template<typename _CharT>
-struct basic_string {
-
- basic_string&
- assign(const _CharT* __s, const basic_string<_CharT> &x)
- {
- return *this;
- }
-};
-
-void foo (const char *c) {
- basic_string<char> str;
- str.assign(c, str);
-}
-
-// CHECK: [[P:![0-9]*]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: [[CON:![0-9]*]]
-// CHECK: [[CON]] = !DIDerivedType(tag: DW_TAG_const_type, baseType: [[CH:![0-9]*]]
-// CHECK: [[CH]] = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
-// CHECK: [[BS:.*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "basic_string<char>"
-// CHECK-SAME: line: 4
-// CHECK-SAME: size: 8
-// CHECK: [[TYPE:![0-9]*]] = !DISubroutineType(types: [[ARGS:.*]])
-// CHECK: [[ARGS]] = !{!{{.*}}, !{{.*}}, [[P]], [[R:.*]]}
-
-// CHECK: [[R]] = !DIDerivedType(tag: DW_TAG_reference_type, baseType: [[CON2:![0-9]*]]
-// CHECK: [[CON2]] = !DIDerivedType(tag: DW_TAG_const_type, baseType: [[BS]]
-// CHECK: !DISubprogram(name: "assign"
-// CHECK-SAME: line: 7
-// CHECK-SAME: scopeLine: 8
diff --git a/clang/test/CodeGenCXX/debug-info-template-recursive.cpp b/clang/test/CodeGenCXX/debug-info-template-recursive.cpp
deleted file mode 100644
index 9693b38..0000000
--- a/clang/test/CodeGenCXX/debug-info-template-recursive.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
-
-class base { };
-
-template <class T> class foo : public base {
- void operator=(const foo r) { }
-};
-
-class bar : public foo<void> { };
-bar filters;
-
-// For now check that it simply doesn't crash.
-// CHECK: {{.*}}
diff --git a/clang/test/CodeGenCXX/debug-info-template.cpp b/clang/test/CodeGenCXX/debug-info-template.cpp
deleted file mode 100644
index a5a17c9..0000000
--- a/clang/test/CodeGenCXX/debug-info-template.cpp
+++ /dev/null
@@ -1,272 +0,0 @@
-// RUN: %clang -S -emit-llvm -target x86_64-unknown_unknown -g %s -o - -std=c++20 | FileCheck %s
-
-// CHECK: @tci = dso_local global %"struct.TC<unsigned int, 2, &glb, &foo::e, &foo::f, &foo::g, 1, 2, 3>::nested" zeroinitializer, align 1, !dbg [[TCI:![0-9]+]]
-// CHECK: @tcn = dso_local global %struct.TC zeroinitializer, align 1, !dbg [[TCN:![0-9]+]]
-// CHECK: @nn = dso_local global %struct.NN zeroinitializer, align 1, !dbg [[NN:![0-9]+]]
-
-// CHECK: !DICompileUnit(
-
-struct foo {
- char pad[8]; // make the member pointer to 'e' a bit more interesting (nonzero)
- int e;
- void f();
- static void g();
-};
-
-typedef int foo::*foo_mem;
-
-template<typename T, T, const int *x, foo_mem a, void (foo::*b)(), void (*f)(), int ...Is>
-struct TC {
- struct nested {
- };
-};
-
-int glb;
-void func();
-
-// CHECK: [[TCI]] = !DIGlobalVariableExpression(var: [[TCIV:.*]], expr: !DIExpression())
-// CHECK: [[TCIV]] = distinct !DIGlobalVariable(name: "tci",
-// CHECK-SAME: type: ![[TCNESTED:[0-9]+]]
-// CHECK: ![[TCNESTED]] ={{.*}}!DICompositeType(tag: DW_TAG_structure_type, name: "nested",
-// CHECK-SAME: scope: ![[TC:[0-9]+]],
-
-// CHECK: ![[TC]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "TC<unsigned int, 2U, &glb, &foo::e, &foo::f, &foo::g, 1, 2, 3>"
-// CHECK-SAME: templateParams: [[TCARGS:![0-9]*]]
-TC
-// CHECK: [[EMPTY:![0-9]*]] = !{}
-// CHECK: [[TCARGS]] = !{[[TCARG1:![0-9]*]], [[TCARG2:![0-9]*]], [[TCARG3:![0-9]*]], [[TCARG4:![0-9]*]], [[TCARG5:![0-9]*]], [[TCARG6:![0-9]*]], [[TCARG7:![0-9]*]]}
-// CHECK: [[TCARG1]] = !DITemplateTypeParameter(name: "T", type: [[UINT:![0-9]*]])
-// CHECK: [[UINT:![0-9]*]] = !DIBasicType(name: "unsigned int"
-< unsigned,
-// CHECK: [[TCARG2]] = !DITemplateValueParameter(type: [[UINT]], value: i32 2)
- 2,
-// CHECK: [[TCARG3]] = !DITemplateValueParameter(name: "x", type: [[CINTPTR:![0-9]*]], value: ptr @glb)
-// CHECK: [[CINTPTR]] = !DIDerivedType(tag: DW_TAG_pointer_type, {{.*}}baseType: [[CINT:![0-9]+]]
-// CHECK: [[CINT]] = !DIDerivedType(tag: DW_TAG_const_type, {{.*}}baseType: [[INT:![0-9]+]]
-// CHECK: [[INT]] = !DIBasicType(name: "int"
- &glb,
-// CHECK: [[TCARG4]] = !DITemplateValueParameter(name: "a", type: [[MEMINTPTR:![0-9]*]], value: i64 8)
-// CHECK: [[MEMINTPTR]] = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, {{.*}}baseType: [[INT]], {{.*}}extraData: ![[FOO:[0-9]+]])
-//
-// We could just emit a declaration of 'foo' here, rather than the entire
-// definition (same goes for any time we emit a member (function or data)
-// pointer type)
-// CHECK: [[FOO]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "foo", {{.*}}identifier: "_ZTS3foo")
-// CHECK: !DISubprogram(name: "f", linkageName: "_ZN3foo1fEv", {{.*}}type: [[FTYPE:![0-9]*]]
-//
-// Currently Clang emits the pointer-to-member-function value, but LLVM doesn't
-// use it (GCC doesn't emit a value for pointers to member functions either - so
-// it's not clear what, if any, format would be acceptable to GDB)
-//
-// CHECK: [[FTYPE:![0-9]*]] = !DISubroutineType(types: [[FARGS:![0-9]*]])
-// CHECK: [[FARGS]] = !{null, [[FARG1:![0-9]*]]}
-// CHECK: [[FARG1]] = !DIDerivedType(tag: DW_TAG_pointer_type,
-// CHECK-SAME: baseType: ![[FOO]]
-// CHECK-NOT: line:
-// CHECK-SAME: size: 64
-// CHECK-NOT: offset: 0
-// CHECK-SAME: DIFlagArtificial
-// CHECK: [[FUNTYPE:![0-9]*]] = !DISubroutineType(types: [[FUNARGS:![0-9]*]])
-// CHECK: [[FUNARGS]] = !{null}
- &foo::e,
-// CHECK: [[TCARG5]] = !DITemplateValueParameter(name: "b", type: [[MEMFUNPTR:![0-9]*]], value: { i64, i64 } { i64 ptrtoint (ptr @_ZN3foo1fEv to i64), i64 0 })
-// CHECK: [[MEMFUNPTR]] = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, {{.*}}baseType: [[FTYPE]], {{.*}}extraData: ![[FOO]])
- &foo::f,
-// CHECK: [[TCARG6]] = !DITemplateValueParameter(name: "f", type: [[FUNPTR:![0-9]*]], value: ptr @_ZN3foo1gEv)
-// CHECK: [[FUNPTR]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: [[FUNTYPE]]
- &foo::g,
-// CHECK: [[TCARG7]] = !DITemplateValueParameter(tag: DW_TAG_GNU_template_parameter_pack, name: "Is", value: [[TCARG7_VALS:![0-9]*]])
-// CHECK: [[TCARG7_VALS]] = !{[[TCARG7_1:![0-9]*]], [[TCARG7_2:![0-9]*]], [[TCARG7_3:![0-9]*]]}
-// CHECK: [[TCARG7_1]] = !DITemplateValueParameter(type: [[INT]], value: i32 1)
- 1,
-// CHECK: [[TCARG7_2]] = !DITemplateValueParameter(type: [[INT]], value: i32 2)
- 2,
-// CHECK: [[TCARG7_3]] = !DITemplateValueParameter(type: [[INT]], value: i32 3)
- 3>::nested tci;
-
-// CHECK: [[TCN]] = !DIGlobalVariableExpression(var: [[TCNV:.*]], expr: !DIExpression())
-// CHECK: [[TCNV]] = distinct !DIGlobalVariable(name: "tcn"
-// CHECK-SAME: type: ![[TCNT:[0-9]+]]
-TC
-// CHECK: ![[TCNT]] ={{.*}}!DICompositeType(tag: DW_TAG_structure_type, name: "TC<int, -3, nullptr, nullptr, nullptr, nullptr>"
-// CHECK-SAME: templateParams: [[TCNARGS:![0-9]*]]
-// CHECK: [[TCNARGS]] = !{[[TCNARG1:![0-9]*]], [[TCNARG2:![0-9]*]], [[TCNARG3:![0-9]*]], [[TCNARG4:![0-9]*]], [[TCNARG5:![0-9]*]], [[TCNARG6:![0-9]*]], [[TCNARG7:![0-9]*]]}
-// CHECK: [[TCNARG1]] = !DITemplateTypeParameter(name: "T", type: [[INT]])
-<int,
-// CHECK: [[TCNARG2]] = !DITemplateValueParameter(type: [[INT]], value: i32 -3)
- -3,
-// CHECK: [[TCNARG3]] = !DITemplateValueParameter(name: "x", type: [[CINTPTR]], value: i8 0)
- nullptr,
-
-// The interesting null pointer: -1 for member data pointers (since they are
-// just an offset in an object, they can be zero and non-null for the first
-// member)
-
-// CHECK: [[TCNARG4]] = !DITemplateValueParameter(name: "a", type: [[MEMINTPTR]], value: i64 -1)
- nullptr,
-//
-// In some future iteration we could possibly emit the value of a null member
-// function pointer as '{ i64, i64 } zeroinitializer' as it may be handled
-// naturally from the LLVM CodeGen side once we decide how to handle non-null
-// member function pointers. For now, it's simpler just to emit the 'i8 0'.
-//
-// CHECK: [[TCNARG5]] = !DITemplateValueParameter(name: "b", type: [[MEMFUNPTR]], value: i8 0)
- nullptr,
-// CHECK: [[TCNARG6]] = !DITemplateValueParameter(name: "f", type: [[FUNPTR]], value: i8 0)
- nullptr
-// CHECK: [[TCNARG7]] = !DITemplateValueParameter(tag: DW_TAG_GNU_template_parameter_pack, name: "Is", value: [[EMPTY]])
- > tcn;
-
-template<typename>
-struct tmpl_impl {
-};
-
-template <template <typename> class tmpl, int &lvr>
-struct NN {
-};
-
-// CHECK: [[NN]] = !DIGlobalVariableExpression(var: [[NNV:.*]], expr: !DIExpression())
-// CHECK: [[NNV]] = distinct !DIGlobalVariable(name: "nn"
-// CHECK-SAME: type: ![[NNT:[0-9]+]]
-
-// CHECK: ![[NNT]] ={{.*}}!DICompositeType(tag: DW_TAG_structure_type, name: "NN<tmpl_impl, glb>",
-// CHECK-SAME: templateParams: [[NNARGS:![0-9]*]]
-// CHECK-SAME: identifier:
-// CHECK: [[NNARGS]] = !{[[NNARG1:![0-9]*]], [[NNARG2:![0-9]*]]}
-// CHECK: [[NNARG1]] = !DITemplateValueParameter(tag: DW_TAG_GNU_template_template_param, name: "tmpl", value: !"tmpl_impl")
-// CHECK: [[NNARG2]] = !DITemplateValueParameter(name: "lvr", type: [[INTLVR:![0-9]*]], value: ptr @glb)
-// CHECK: [[INTLVR]] = !DIDerivedType(tag: DW_TAG_reference_type, baseType: [[INT]]
-NN<tmpl_impl, glb> nn;
-
-// CHECK: ![[PADDINGATEND:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "PaddingAtEnd",
-struct PaddingAtEnd {
- int i;
- char c;
-};
-
-PaddingAtEnd PaddedObj = {};
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "PaddingAtEndTemplate<&PaddedObj>"
-// CHECK-SAME: templateParams: [[PTOARGS:![0-9]*]]
-// CHECK: [[PTOARGS]] = !{[[PTOARG1:![0-9]*]]}
-// CHECK: [[PTOARG1]] = !DITemplateValueParameter(type: [[CONST_PADDINGATEND_PTR:![0-9]*]], value: ptr @PaddedObj)
-// CHECK: [[CONST_PADDINGATEND_PTR]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[PADDINGATEND]], size: 64)
-template <PaddingAtEnd *>
-struct PaddingAtEndTemplate {
-};
-
-PaddingAtEndTemplate<&PaddedObj> PaddedTemplateObj;
-
-struct ClassTemplateArg {
- int a;
- float f;
-};
-template<ClassTemplateArg A> struct ClassTemplateArgTemplate {
- static constexpr const ClassTemplateArg &Arg = A;
-};
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "ClassTemplateArgTemplate<ClassTemplateArg{1, 2.000000e+00}>", {{.*}}, templateParams: ![[CLASS_TEMP_ARGS:[0-9]*]],
-// CHECK: ![[CLASS_TEMP_ARG_CONST_REF_TYPE:[0-9]*]] = !DIDerivedType(tag: DW_TAG_reference_type, baseType: ![[CLASS_TEMP_ARG_CONST_TYPE:[0-9]*]],
-// CHECK: ![[CLASS_TEMP_ARG_CONST_TYPE]] = !DIDerivedType(tag: DW_TAG_const_type, baseType: ![[CLASS_TEMP_ARG_TYPE:[0-9]*]])
-// CHECK: ![[CLASS_TEMP_ARG_TYPE]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "ClassTemplateArg",
-// CHECK: ![[CLASS_TEMP_ARGS]] = !{![[CLASS_TEMP_ARG:[0-9]*]]}
-// CHECK: ![[CLASS_TEMP_ARG]] = !DITemplateValueParameter(name: "A", type: ![[CLASS_TEMP_ARG_TYPE]], value: %{{[^ *]+}} { i32 1, float 2.000000e+00 })
-ClassTemplateArgTemplate<ClassTemplateArg{1, 2.0f}> ClassTemplateArgObj;
-
-template<const ClassTemplateArg&> struct ClassTemplateArgRefTemplate {};
-ClassTemplateArgRefTemplate<ClassTemplateArgObj.Arg> ClassTemplateArgRefObj;
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "ClassTemplateArgRefTemplate<<template param ClassTemplateArg{1, 2.000000e+00}> >", {{.*}}, templateParams: ![[CLASS_TEMP_REF_ARGS:[0-9]*]],
-// CHECK: ![[CLASS_TEMP_REF_ARGS]] = !{![[CLASS_TEMP_REF_ARG:[0-9]*]]}
-// CHECK: ![[CLASS_TEMP_REF_ARG]] = !DITemplateValueParameter(type: ![[CLASS_TEMP_ARG_CONST_REF_TYPE]], value: ptr @_ZTAXtl16ClassTemplateArgLi1ELf40000000EEE)
-
-inline namespace inl {
- struct t1 { };
-}
-template<typename T> struct ClassTemplateInlineNamespaceArg {
-};
-ClassTemplateInlineNamespaceArg<inl::t1> ClassTemplateInlineNamespaceArgObj;
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "ClassTemplateInlineNamespaceArg<inl::t1>",
-
-namespace IndirectDefaultArgument {
-template<typename T1, typename T2 = int>
-struct t1 { };
-template<typename T>
-void f1() {
-}
-template void f1<t1<int>>();
-// CHECK: !DISubprogram(name: "f1<IndirectDefaultArgument::t1<int, int> >",
-} // namespace IndirectDefaultArgument
-
-namespace EmptyTrailingPack {
-template<typename T>
-struct t1 { };
-template<typename T, typename ...Ts>
-void f1() {
-}
-template void f1<t1<int>>();
-// CHECK: !DISubprogram(name: "f1<EmptyTrailingPack::t1<int> >",
-} // namespace EmptyTrailingPack
-
-namespace EmptyInnerPack {
-template<typename ...Ts, typename T = int>
-void f1() {
-}
-template void f1<>();
-// CHECK: !DISubprogram(name: "f1<int>",
-} // namespace EmptyInnerPack
-
-namespace RawFuncQual {
-struct t1; // use this to ensure the type parameter doesn't shift due to other test cases in this file
-template<typename T1, typename T2, typename T3, typename T4>
-void f1() { }
-template void f1<t1 () volatile, t1 () const volatile, t1 () &, t1 () &&>();
-// CHECK: !DISubprogram(name: "f1<RawFuncQual::t1 () volatile, RawFuncQual::t1 () const volatile, RawFuncQual::t1 () &, RawFuncQual::t1 () &&>",
-// CHECK-SAME: templateParams: ![[RAW_FUNC_QUAL_ARGS:[0-9]*]]
-
-// CHECK: ![[RAW_FUNC_QUAL_ARGS]] = !{![[RAW_FUNC_QUAL_T1:[0-9]*]], ![[RAW_FUNC_QUAL_T2:[0-9]*]], ![[RAW_FUNC_QUAL_T3:[0-9]*]], ![[RAW_FUNC_QUAL_T4:[0-9]*]]}
-// CHECK: ![[RAW_FUNC_QUAL_T1]] = !DITemplateTypeParameter(name: "T1", type: ![[RAW_FUNC_QUAL_VOL:[0-9]*]])
-// CHECK: ![[RAW_FUNC_QUAL_VOL]] = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: ![[RAW_FUNC_QUAL_TYPE:[0-9]*]])
-// CHECK: ![[RAW_FUNC_QUAL_TYPE]] = !DISubroutineType(types: ![[RAW_FUNC_QUAL_LIST:[0-9]*]]
-// CHECK: ![[RAW_FUNC_QUAL_LIST]] = !{![[RAW_FUNC_QUAL_STRUCT:[0-9]*]]}
-// CHECK: ![[RAW_FUNC_QUAL_STRUCT]] = !DICompositeType(tag: DW_TAG_structure_type, name: "t1"
-// CHECK: ![[RAW_FUNC_QUAL_T2]] = !DITemplateTypeParameter(name: "T2", type: ![[RAW_FUNC_QUAL_CNST:[0-9]*]])
-// CHECK: ![[RAW_FUNC_QUAL_CNST]] = !DIDerivedType(tag: DW_TAG_const_type, baseType: ![[RAW_FUNC_QUAL_TYPE:[0-9]*]])
-// CHECK: ![[RAW_FUNC_QUAL_T3]] = !DITemplateTypeParameter(name: "T3", type: ![[RAW_FUNC_QUAL_REF:[0-9]*]])
-// CHECK: ![[RAW_FUNC_QUAL_REF]] = !DISubroutineType(flags: DIFlagLValueReference, types: ![[RAW_FUNC_QUAL_LIST]])
-// CHECK: ![[RAW_FUNC_QUAL_T4]] = !DITemplateTypeParameter(name: "T4", type: ![[RAW_FUNC_QUAL_REF_REF:[0-9]*]])
-// CHECK: ![[RAW_FUNC_QUAL_REF_REF]] = !DISubroutineType(flags: DIFlagRValueReference, types: ![[RAW_FUNC_QUAL_LIST]])
-
-} // namespace RawFuncQual
-
-namespace Nullptr_t {
-template <typename T>
-void f1() {}
-template void f1<decltype(nullptr)>();
-// CHECK: !DISubprogram(name: "f1<std::nullptr_t>",
-} // namespace Nullptr_t
-
-namespace TemplateTemplateParamInlineNamespace {
-inline namespace inl {
- template<typename>
- struct t1 { };
-} // namespace inl
-template<template<typename> class> void f1() { }
-template void f1<t1>();
-// CHECK: !DISubprogram(name: "f1<TemplateTemplateParamInlineNamespace::inl::t1>",
-// CHECK-SAME: templateParams: ![[TEMP_TEMP_INL_ARGS:[0-9]*]]
-// CHECK: ![[TEMP_TEMP_INL_ARGS]] = !{![[TEMP_TEMP_INL_ARGS_T:[0-9]*]]}
-// CHECK: ![[TEMP_TEMP_INL_ARGS_T]] = !DITemplateValueParameter(tag: DW_TAG_GNU_template_template_param, value: !"TemplateTemplateParamInlineNamespace::inl::t1")
-} // namespace TemplateTemplateParamInlineNamespace
-
-namespace NoPreferredNames {
-template <typename T> struct t1;
-using t1i = t1<int>;
-template <typename T>
-struct __attribute__((__preferred_name__(t1i))) t1 {};
-template <typename T>
-void f1() {}
-template void f1<t1<int>>();
-// CHECK: !DISubprogram(name: "f1<NoPreferredNames::t1<int> >",
-
-} // namespace NoPreferredNames
diff --git a/clang/test/CodeGenCXX/debug-info-this.cpp b/clang/test/CodeGenCXX/debug-info-this.cpp
deleted file mode 100644
index f1cd4aa..0000000
--- a/clang/test/CodeGenCXX/debug-info-this.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %clang -emit-llvm -g -S %s -o - | FileCheck %s
-class Class
-{
-public:
-//CHECK: DW_TAG_const_type
- int foo (int p) const {
- return p+m_int;
- }
-
-protected:
- int m_int;
-};
-
-Class c;
diff --git a/clang/test/CodeGenCXX/debug-info-thunk-msabi.cpp b/clang/test/CodeGenCXX/debug-info-thunk-msabi.cpp
deleted file mode 100644
index cc59f0b..0000000
--- a/clang/test/CodeGenCXX/debug-info-thunk-msabi.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// RUN: %clang_cc1 %s -triple i386-pc-windows-msvc19.0.0 -emit-llvm \
-// RUN: -debug-info-kind=line-tables-only -fms-extensions -o - | FileCheck %s
-class __declspec(dllexport) A {
- A(int * = new int) {}
-};
-// CHECK: define {{.*}}void @"??_FA@@AAEXXZ"
-// CHECK-SAME: !dbg ![[SP:[0-9]+]]
-// CHECK-NOT: {{ret }}
-// CHECK: call x86_thiscallcc noundef ptr @"??0A@@AAE@PAH@Z"
-// CHECK-SAME: !dbg ![[DBG:[0-9]+]]
-// CHECK: ret void, !dbg
-//
-// CHECK: ![[SP]] = distinct !DISubprogram(
-// CHECK-SAME: line: 4
-// CHECK-SAME: DIFlagArtificial
-// CHECK-SAME: DISPFlagDefinition
-// CHECK-SAME: ){{$}}
-//
-// CHECK: ![[DBG]] = !DILocation(line: 0
diff --git a/clang/test/CodeGenCXX/debug-info-thunk.cpp b/clang/test/CodeGenCXX/debug-info-thunk.cpp
deleted file mode 100644
index f48adce..0000000
--- a/clang/test/CodeGenCXX/debug-info-thunk.cpp
+++ /dev/null
@@ -1,277 +0,0 @@
-// RUN: %clang_cc1 %s -triple=x86_64-pc-windows-msvc -debug-info-kind=limited -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 %s -triple %itanium_abi_triple -debug-info-kind=limited -emit-llvm -o - | FileCheck %s -check-prefix=ITANIUM
-//
-// Validate we emit a "DIFlagThunk" flag on DISubprogram entries for thunks.
-// This flag is used for emitting S_THUNK32 symbols for CodeView debugging.
-//
-// NOTE:
-// Because thunks are compiler generated and don't exist in the source, this
-// test is dependent upon the linkage name to identify the thunk. Any changes
-// in the name mangling may require this test to be updated.
-//
-// NOTE:
-// The FileCheck directives below use CHECK-DAG because the thunks may not be
-// emitted in source order.
-//
-
-namespace Test1 {
- struct A {
- virtual void f();
- };
-
- struct B {
- virtual void f();
- };
-
- struct C : A, B {
- virtual void c();
-
- virtual void f();
- };
-
-// CHECK-DAG: DISubprogram{{.*}}linkageName: "?f@C@Test1@@W7EAAXXZ"{{.*}} flags: {{.*}}DIFlagThunk
- void C::f() { }
-}
-
-namespace Test2 {
- struct V1 { };
- struct V2 : virtual V1 { };
-
- struct A {
- virtual V1 *f();
- };
-
- struct B : A {
- virtual void b();
-
- virtual V2 *f();
- };
-
-// CHECK-DAG: DISubprogram{{.*}}linkageName: "?f@B@Test2@@QEAAPEAUV1@2@XZ"{{.*}} flags: {{.*}}DIFlagThunk
- V2 *B::f() { return 0; }
-}
-
-namespace Test3 {
- struct A {
- virtual void f();
- };
-
- struct B {
- virtual void f();
- };
-
- struct __attribute__((visibility("protected"))) C : A, B {
- virtual void c();
-
- virtual void f();
- };
-
-// CHECK-DAG: DISubprogram{{.*}}linkageName: "?f@C@Test3@@W7EAAXXZ"{{.*}} flags: {{.*}}DIFlagThunk
- void C::f() { }
-}
-
-namespace Test4 {
- struct A {
- virtual void f();
- };
-
- struct B {
- virtual void f();
- };
-
- namespace {
- struct C : A, B {
- virtual void c();
- virtual void f();
- };
- }
- void C::c() {}
-// CHECK-DAG: DISubprogram{{.*}}linkageName: "?f@C@?A0x{{[^@]*}}@Test4@@W7EAAXXZ"{{.*}} flags: {{.*}}DIFlagThunk
- void C::f() {}
-
- // Force C::f to be used.
- void f() {
- C c;
- c.f();
- }
-}
-
-namespace Test5 {
- struct X {
- X();
- X(const X&);
- X &operator=(const X&);
- ~X();
- };
-
- struct P {
- P();
- P(const P&);
- ~P();
- X first;
- X second;
- };
-
- P getP();
-
- struct Base1 {
- int i;
-
- virtual X f() { return X(); }
- };
-
- struct Base2 {
- float real;
-
- virtual X f() { return X(); }
- };
-
- struct Thunks : Base1, Base2 {
- long l;
-
- virtual X f();
- };
-
-// CHECK-DAG: DISubprogram{{.*}}linkageName: "?f@Thunks@Test5@@WBA@EAA?AUX@2@XZ"{{.*}} flags: {{.*}}DIFlagThunk
- X Thunks::f() { return X(); }
-}
-
-namespace Test6 {
- struct X {
- X();
- X(const X&);
- X &operator=(const X&);
- ~X();
- };
-
- struct Small { short s; };
- struct Large {
- char array[1024];
- };
-
- class A {
- protected:
- virtual void foo() = 0;
- };
-
- class B : public A {
- protected:
- virtual void bar() = 0;
- };
-
- class C : public A {
- protected:
- virtual void baz(X, X&, _Complex float, Small, Small&, Large) = 0;
- };
-
- class D : public B,
- public C {
-// CHECK-DAG: DISubprogram{{.*}}linkageName: "?foo@D@Test6@@G7EAAXXZ"{{.*}} flags: {{.*}}DIFlagThunk
- void foo() {}
- void bar() {}
- void baz(X, X&, _Complex float, Small, Small&, Large);
- };
-
- void D::baz(X, X&, _Complex float, Small, Small&, Large) { }
-
- void testD() { D d; }
-}
-
-namespace Test7 {
- struct A { virtual void foo(); };
- struct B { virtual void foo(); };
-// CHECK-DAG: DISubprogram{{.*}}linkageName: "?foo@C@Test7@@W7EAAXXZ"{{.*}} flags: {{.*}}DIFlagThunk
- struct C : A, B { void foo() {} };
-
- // Test later.
- void test() {
- C c;
- }
-}
-
-namespace Test8 {
- struct A { virtual A* f(); };
- struct B : virtual A { virtual A* f(); };
- struct C : B { virtual C* f(); };
-// CHECK-DAG: DISubprogram{{.*}}linkageName: "?f@C@Test8@@QEAAPEAUA@2@XZ"{{.*}} flags: {{.*}}DIFlagThunk
- C* C::f() { return 0; }
-}
-
-namespace Test9 {
- struct B1 {
- virtual B1 &foo1();
- };
- struct Pad1 {
- virtual ~Pad1();
- };
- struct Proxy1 : Pad1, B1 {
- virtual ~Proxy1();
- };
- struct D : virtual Proxy1 {
- virtual ~D();
- virtual D &foo1();
- };
-// CHECK-DAG: DISubprogram{{.*}}linkageName: "?foo1@D@Test9@@$4PPPPPPPE@A@EAAAEAUB1@2@XZ"{{.*}} flags: {{.*}}DIFlagThunk
-// CHECK-DAG: DISubprogram{{.*}}linkageName: "?foo1@D@Test9@@$4PPPPPPPE@A@EAAAEAU12@XZ"{{.*}} flags: {{.*}}DIFlagThunk
- D& D::foo1() {
- return *this;
- }
-}
-
-namespace Test10 {
- class A {
- virtual void f();
- };
- class B {
- virtual void f();
- };
- class C : public A, public B {
- virtual void f();
- };
-// CHECK-DAG: DISubprogram{{.*}}linkageName: "?f@C@Test10@@G7EAAXXZ"{{.*}} flags: {{.*}}DIFlagThunk
- void C::f() {
- }
-}
-
-namespace Test11 {
- class A {
- public:
- virtual void f();
- };
-
- void test() {
-// CHECK-DAG: DISubprogram{{.*}}linkageName: "??_9A@Test11@@$BA@AA"{{.*}} flags: {{.*}}DIFlagThunk
- void (A::*p)() = &A::f;
- }
-}
-
-namespace Test12 {
- struct A {
- virtual void f();
- };
-
- struct B {
- virtual void f();
- };
-
- struct C : A, B {
- virtual void f();
- };
-
- void C::f() { }
- // ITANIUM: define {{.*}}void @_ZThn{{[48]}}_N6Test121C1fEv
- // ITANIUM-SAME: !dbg ![[SP:[0-9]+]]
- // ITANIUM-NOT: {{ret }}
- // ITANIUM: = load{{.*}} !dbg ![[DBG:[0-9]+]]
- // ITANIUM-NOT: {{ret }}
- // ITANIUM: ret void, !dbg ![[DBG]]
- //
- // ITANIUM: ![[SP]] = distinct !DISubprogram(linkageName: "_ZThn{{[48]}}_N6Test121C1fEv"
- // ITANIUM-SAME: line: 261
- // ITANIUM-SAME: DIFlagArtificial
- // ITANIUM-SAME: DIFlagThunk
- // ITANIUM-SAME: DISPFlagDefinition
- // ITANIUM-SAME: ){{$}}
- //
- // ITANIUM: ![[DBG]] = !DILocation(line: 0
-}
diff --git a/clang/test/CodeGenCXX/debug-info-union-template.cpp b/clang/test/CodeGenCXX/debug-info-union-template.cpp
deleted file mode 100644
index d9219fc..0000000
--- a/clang/test/CodeGenCXX/debug-info-union-template.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-linux-gnu %s -o - | FileCheck %s
-
-// Make sure that the union type has template parameters.
-
-namespace PR15637 {
- template <typename T> union Value { int a; };
- void g(float value) {
- Value<float> tempValue;
- }
- Value<float> f;
-}
-
-// CHECK: !DICompositeType(tag: DW_TAG_union_type, name: "Value<float>",
-// CHECK-SAME: templateParams: [[TTPARAM:![0-9]+]]
-// CHECK-SAME: identifier: "_ZTSN7PR156375ValueIfEE"
-// CHECK: [[TTPARAM]] = !{[[PARAMS:.*]]}
-// CHECK: [[PARAMS]] = !DITemplateTypeParameter(name: "T"
diff --git a/clang/test/CodeGenCXX/debug-info-union.cpp b/clang/test/CodeGenCXX/debug-info-union.cpp
deleted file mode 100644
index cffe6e9..0000000
--- a/clang/test/CodeGenCXX/debug-info-union.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin -std=c++11 %s -o - | FileCheck %s
-
-union E {
- int a;
- float b;
- int bb() { return a;}
- float aa() { return b;}
- E() { a = 0; }
-};
-
-E e;
-
-// CHECK: !DICompositeType(tag: DW_TAG_union_type, name: "E"
-// CHECK-SAME: line: 3
-// CHECK-SAME: size: 32
-// CHECK-NOT: offset:
-// CHECK-SAME: {{$}}
-// CHECK: !DISubprogram(name: "bb"{{.*}}, line: 6
-// CHECK: !DISubprogram(name: "aa"{{.*}}, line: 7
-// CHECK: !DISubprogram(name: "E"{{.*}}, line: 8
diff --git a/clang/test/CodeGenCXX/debug-info-use-after-free.cpp b/clang/test/CodeGenCXX/debug-info-use-after-free.cpp
deleted file mode 100644
index 1001248..0000000
--- a/clang/test/CodeGenCXX/debug-info-use-after-free.cpp
+++ /dev/null
@@ -1,316 +0,0 @@
-// RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple -emit-llvm-only %s
-// RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple -emit-llvm-only -std=c++98 %s
-// RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple -emit-llvm-only -std=c++11 %s
-// Check that we don't crash.
-// PR12305, PR12315
-
-# 1 "a.h" 3
-template < typename T1 > struct Types1
-{
- typedef T1 Head;
-};
-template < typename > struct Types;
-template < template < typename > class Tmpl > struct TemplateSel
-{
- template < typename T > struct Bind
- {
- typedef Tmpl < T > type;
- };
-};
-template < typename > struct NoneT;
-template < template < typename > class T1, template < typename > class > struct Templates2
-{
- typedef TemplateSel < T1 > Head;
-};
-template < template < typename > class, template < typename > class =
- NoneT, template < typename > class = NoneT, template < typename > class =
- NoneT > struct Templates;
-template < template < typename > class T1,
- template < typename > class T2 > struct Templates <T1, T2 >
-{
- typedef Templates2 < T1, T2 > type;
-};
-template < typename T > struct TypeList
-{
- typedef Types1 < T > type;
-};
-template < template < typename > class, class TestSel,
- typename Types > class TypeParameterizedTest
-{
-public:static bool Register ()
- {
- typedef typename Types::Head Type;
- typename TestSel::template Bind < Type >::type TestClass;
-}};
-
-template < template < typename > class Fixture, typename Tests,
- typename Types > class TypeParameterizedTestCase
-{
-public:static bool Register (char *, char *, int *)
- {
- typedef typename Tests::Head Head;
- TypeParameterizedTest < Fixture, Head, Types >::Register;
-}};
-
-template < typename > class TypedTestP1
-{
-};
-
-namespace gtest_case_TypedTestP1_
-{
- template < typename gtest_TypeParam_ > class A:TypedTestP1 <
- gtest_TypeParam_ >
- {
- };
-template < typename gtest_TypeParam_ > class B:TypedTestP1 <
- gtest_TypeParam_ >
- {
- };
- typedef Templates < A >::type gtest_AllTests_;
-}
-
-template < typename > class TypedTestP2
-{
-};
-
-namespace gtest_case_TypedTestP2_
-{
- template < typename gtest_TypeParam_ > class A:TypedTestP2 <
- gtest_TypeParam_ >
- {
- };
- typedef Templates < A >::type gtest_AllTests_;
-}
-
-bool gtest_Int_TypedTestP1 =
- TypeParameterizedTestCase < TypedTestP1,
- gtest_case_TypedTestP1_::gtest_AllTests_,
- TypeList < int >::type >::Register ("Int", "TypedTestP1", 0);
-bool gtest_Int_TypedTestP2 =
- TypeParameterizedTestCase < TypedTestP2,
- gtest_case_TypedTestP2_::gtest_AllTests_,
- TypeList < Types < int > >::type >::Register ("Int", "TypedTestP2", 0);
-
-template < typename _Tp > struct new_allocator
-{
- typedef _Tp *pointer;
- template < typename > struct rebind {
- typedef new_allocator other;
- };
-};
-template < typename _Tp > struct allocator:new_allocator < _Tp > {
-};
-template < typename _Tp, typename _Alloc > struct _Vector_base {
- typedef typename _Alloc::template rebind < _Tp >::other _Tp_alloc_type;
- struct _Vector_impl {
- typename _Tp_alloc_type::pointer _M_end_of_storage;
- };
- _Vector_base () {
- foo((int *) this->_M_impl._M_end_of_storage);
- }
- void foo(int *);
- _Vector_impl _M_impl;
-};
-template < typename _Tp, typename _Alloc =
-allocator < _Tp > >struct vector:_Vector_base < _Tp, _Alloc > { };
-
-
-template < class T> struct HHH {};
-struct DDD { int x_;};
-struct Data;
-struct X1;
-struct CCC:DDD { virtual void xxx (HHH < X1 >); };
-template < class SSS > struct EEE:vector < HHH < SSS > > { };
-template < class SSS, class = EEE < SSS > >class FFF { };
-template < class SSS, class GGG = EEE < SSS > >class AAA:FFF <GGG> { };
-class BBB:virtual CCC {
- void xxx (HHH < X1 >);
- vector < HHH < X1 > >aaa;
-};
-class ZZZ:AAA < Data >, BBB { virtual ZZZ *ppp () ; };
-ZZZ * ZZZ::ppp () { return new ZZZ; }
-
-namespace std
-{
- template < class, class > struct pair;
-}
-namespace __gnu_cxx {
-template < typename > class new_allocator;
-}
-namespace std {
-template < typename _Tp > class allocator:__gnu_cxx::new_allocator < _Tp > {
-};
-template < typename, typename > struct _Vector_base {
-};
-template < typename _Tp, typename _Alloc = std::allocator < _Tp > >class vector:_Vector_base < _Tp,
- _Alloc
- > {
- };
-}
-
-namespace
-std {
- template <
- typename,
- typename > struct unary_function;
- template <
- typename,
- typename,
- typename > struct binary_function;
- template <
- typename
- _Tp > struct equal_to:
- binary_function <
- _Tp,
- _Tp,
- bool > {
- };
- template <
- typename
- _Pair > struct _Select1st:
- unary_function <
- _Pair,
- typename
- _Pair::first_type > {
- };
-}
-# 1 "f.h" 3
-using
-std::pair;
-namespace
-__gnu_cxx {
- template <
- class > struct hash;
- template <
- class,
- class,
- class,
- class,
- class
- _EqualKey,
- class >
- class
- hashtable {
- public:
- typedef _EqualKey
- key_equal;
- typedef void key_type;
- };
- using
- std::equal_to;
- using
- std::allocator;
- using
- std::_Select1st;
- template < class _Key, class _Tp, class _HashFn =
- hash < _Key >, class _EqualKey = equal_to < _Key >, class _Alloc =
- allocator < _Tp > >class hash_map {
- typedef
- hashtable <
- pair <
- _Key,
- _Tp >,
- _Key,
- _HashFn,
- _Select1st <
- pair <
- _Key,
- _Tp > >,
- _EqualKey,
- _Alloc >
- _Ht;
- public:
- typedef typename _Ht::key_type key_type;
- typedef typename
- _Ht::key_equal
- key_equal;
- };
-}
-using
-__gnu_cxx::hash_map;
-class
-C2;
-template < class > class scoped_ptr {
-};
-namespace {
-class
- AAA {
-protected:
- virtual ~
- AAA () {
- }};
-}
-template < typename > class EEE;
-template < typename CCC, typename =
-typename CCC::key_equal, typename =
-EEE < CCC > >class III {
-};
-namespace
-util {
- class
- EEE {
- };
-}
-namespace {
-class
- C1:
- util::EEE {
- public:
- class
- C3:
- AAA {
- struct FFF;
- typedef
- III <
- hash_map <
- C2,
- FFF > >
- GGG;
- GGG
- aaa;
- friend
- C1;
- };
- void
- HHH (C3::GGG &);
- };
-}
-namespace
-n1 {
- class
- Test {
- };
- template <
- typename >
- class
- C7 {
- };
- class
- C4:
- n1::Test {
- vector <
- C1::C3 * >
- a1;
- };
- enum C5 { };
- class
- C6:
- C4,
- n1::C7 <
- C5 > {
- };
- class
- C8:
- C6 {
- };
- class
- C9:
- C8 {
- void
- TestBody ();
- };
- void
- C9::TestBody () {
- scoped_ptr < C1::C3 > context;
- }
-}
diff --git a/clang/test/CodeGenCXX/debug-info-uuid.cpp b/clang/test/CodeGenCXX/debug-info-uuid.cpp
deleted file mode 100644
index 09279f2..0000000
--- a/clang/test/CodeGenCXX/debug-info-uuid.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -fms-extensions -triple=x86_64-pc-win32 -debug-info-kind=limited %s -o - -std=c++11 | FileCheck %s
-// RUN: %clang_cc1 -emit-llvm -fms-extensions -triple=x86_64-unknown-unknown -debug-info-kind=limited %s -o - -std=c++11 2>&1 | FileCheck %s --check-prefix=CHECK-ITANIUM
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid2<GUID{12345678-1234-1234-1234-1234567890ab}>"
-// CHECK-SAME: templateParams: [[TGI2ARGS:![0-9]*]]
-// CHECK: [[TGI2ARGS]] = !{[[TGI2ARG1:![0-9]*]]}
-// CHECK: [[TGI2ARG1]] = !DITemplateValueParameter(
-// CHECK-SAME: type: [[CONST_GUID_REF:![0-9]*]]
-// CHECK-SAME: value: ptr @_GUID_12345678_1234_1234_1234_1234567890ab
-// CHECK: [[CONST_GUID_REF]] = !DIDerivedType(tag: DW_TAG_reference_type,
-// CHECK-SAME: baseType: [[CONST_GUID:![0-9]*]]
-// CHECK: [[CONST_GUID]] = !DIDerivedType(tag: DW_TAG_const_type
-// CHECK-SAME: baseType: [[GUID:![0-9]*]]
-// CHECK: [[GUID]] = !DICompositeType(tag: DW_TAG_structure_type, name: "_GUID"
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid<&GUID{12345678-1234-1234-1234-1234567890ab}>"
-// CHECK-SAME: templateParams: [[TGIARGS:![0-9]*]]
-// CHECK: [[TGIARGS]] = !{[[TGIARG1:![0-9]*]]}
-// CHECK: [[TGIARG1]] = !DITemplateValueParameter(
-// CHECK-SAME: type: [[CONST_GUID_PTR:![0-9]*]]
-// CHECK-SAME: value: ptr @_GUID_12345678_1234_1234_1234_1234567890ab
-// CHECK: [[CONST_GUID_PTR]] = !DIDerivedType(tag: DW_TAG_pointer_type
-// CHECK-SAME: baseType: [[CONST_GUID:![0-9]*]]
-// CHECK-SAME: size: 64
-
-// CHECK-ITANIUM: !DICompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid2<GUID{12345678-1234-1234-1234-1234567890ab}>"
-// CHECK-ITANIUM-SAME: identifier: "_ZTS10tmpl_guid2IL_Z42_GUID_12345678_1234_1234_1234_1234567890abEE"
-// CHECK-ITANIUM: !DICompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid<&GUID{12345678-1234-1234-1234-1234567890ab}>"
-// CHECK-ITANIUM-SAME: identifier: "_ZTS9tmpl_guidIXadL_Z42_GUID_12345678_1234_1234_1234_1234567890abEEE"
-
-struct _GUID {
- __UINT32_TYPE__ a; __UINT16_TYPE__ b, c; __UINT8_TYPE__ d[8];
-};
-template <const _GUID *>
-struct tmpl_guid {
-};
-
-struct __declspec(uuid("{12345678-1234-1234-1234-1234567890ab}")) uuid;
-tmpl_guid<&__uuidof(uuid)> tgi;
-
-template <const _GUID &>
-struct tmpl_guid2 {};
-tmpl_guid2<__uuidof(uuid)> tgi2;
diff --git a/clang/test/CodeGenCXX/debug-info-var-template-partial-spec.cpp b/clang/test/CodeGenCXX/debug-info-var-template-partial-spec.cpp
deleted file mode 100644
index 141ff58..0000000
--- a/clang/test/CodeGenCXX/debug-info-var-template-partial-spec.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: %clang_cc1 %s -std=c++14 -debug-info-kind=limited -emit-llvm -o - | FileCheck %s
-
-
-// CHECK: distinct !DICompositeType(tag: DW_TAG_structure_type, name: "B",
-// CHECK-SAME: elements: ![[empty:[0-9]+]]
-// CHECK: ![[empty]] = !{}
-
-struct B {
- template <typename... e>
- static const int d = 0;
- template <typename e>
- static const auto d<e> = d<e, e>;
-} c;
diff --git a/clang/test/CodeGenCXX/debug-info-var-template-partial.cpp b/clang/test/CodeGenCXX/debug-info-var-template-partial.cpp
deleted file mode 100644
index 21ea03b..0000000
--- a/clang/test/CodeGenCXX/debug-info-var-template-partial.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu %s -o - -debug-info-kind=limited | FileCheck %s
-
-template <typename LHS, typename RHS> constexpr bool is_same_v = false;
-template <typename T> constexpr bool is_same_v<T, T> = true;
-
-template constexpr bool is_same_v<int, int>;
-static_assert(is_same_v<int, int>, "should get partial spec");
-
-// Note that the template arguments for the instantiated variable use the
-// parameter names from the primary template. The partial specialization might
-// not have enough parameters.
-
-// CHECK: distinct !DIGlobalVariable(name: "is_same_v", linkageName: "_Z9is_same_vIiiE", {{.*}} templateParams: ![[PARAMS:[0-9]+]])
-// CHECK: ![[PARAMS]] = !{![[LHS:[0-9]+]], ![[RHS:[0-9]+]]}
-// CHECK: ![[LHS]] = !DITemplateTypeParameter(name: "LHS", type: ![[INT:[0-9]+]])
-// CHECK: ![[INT]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-// CHECK: ![[RHS]] = !DITemplateTypeParameter(name: "RHS", type: ![[INT]])
diff --git a/clang/test/CodeGenCXX/debug-info-varargs.cpp b/clang/test/CodeGenCXX/debug-info-varargs.cpp
deleted file mode 100644
index 7afbcd2..0000000
--- a/clang/test/CodeGenCXX/debug-info-varargs.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
-
-struct A
-{
- void a(int c, ...) {}
-};
-
- // CHECK: !DISubprogram(name: "b", linkageName: "_Z1biz"
- // CHECK-SAME: line: [[@LINE+2]]
- // CHECK-SAME: type: ![[BTY:[0-9]+]]
-void b(int c, ...) {
- // CHECK: ![[BTY]] = !DISubroutineType(types: ![[BARGS:[0-9]+]])
- // CHECK: ![[BARGS]] = !{null, !{{[0-9]+}}, null}
-
- // The subprogram "a" comes after "b" because the function comes later.
- // CHECK: !DISubprogram(name: "a", linkageName: "_ZN1A1aEiz"
- // CHECK-SAME: line: 5,
- // CHECK-SAME: type: ![[ATY:[0-9]+]]
- // CHECK: ![[ATY]] = !DISubroutineType(types: ![[AARGS:[0-9]+]])
- // We no longer use an explicit unspecified parameter. Instead we use a trailing null to mean the function is variadic.
- // CHECK: ![[AARGS]] = !{null, !{{[0-9]+}}, !{{[0-9]+}}, null}
-
- A a;
-
- // CHECK: !DILocalVariable(name: "fptr"
- // CHECK-SAME: line: [[@LINE+2]]
- // CHECK-SAME: type: ![[PST:[0-9]+]]
- void (*fptr)(int, ...) = b;
- // CHECK: ![[PST]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[BTY]],
-}
diff --git a/clang/test/CodeGenCXX/debug-info-verbose-trap.cpp b/clang/test/CodeGenCXX/debug-info-verbose-trap.cpp
deleted file mode 100644
index f492698..0000000
--- a/clang/test/CodeGenCXX/debug-info-verbose-trap.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++20 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
-
-// CHECK-LABEL: define void @_Z2f0v()
-// CHECK: call void @llvm.trap(), !dbg ![[LOC17:.*]]
-
-// CHECK: declare void @llvm.trap() #[[ATTR1:.*]]
-
-// CHECK-LABEL: define void @_Z2f1v()
-// CHECK: call void @llvm.trap(), !dbg ![[LOC23:.*]]
-// CHECK: call void @llvm.trap(), !dbg ![[LOC25:.*]]
-
-// CHECK-LABEL: define void @_Z2f3v()
-// CHECK: call void @_Z2f2IXadsoKcL_ZL8constCatEEEXadsoS0_L_ZL8constMsgEEEEvv()
-
-// CHECK-LABEL: define internal void @_Z2f2IXadsoKcL_ZL8constCatEEEXadsoS0_L_ZL8constMsgEEEEvv
-// CHECK: call void @llvm.trap(), !dbg ![[LOC36:.*]]
-
-// CHECK: attributes #[[ATTR1]] = { cold {{.*}}}
-
-// CHECK: ![[FILESCOPE:.*]] = !DIFile(filename: "{{.*}}debug-info-verbose-trap.cpp"
-
-char const constCat[] = "category2";
-char const constMsg[] = "hello";
-
-// CHECK: ![[SUBPROG14:.*]] = distinct !DISubprogram(name: "f0", linkageName: "_Z2f0v",
-// CHECK: ![[LOC17]] = !DILocation(line: 0, scope: ![[SUBPROG18:.*]], inlinedAt: ![[LOC20:.*]])
-// CHECK: ![[SUBPROG18]] = distinct !DISubprogram(name: "__clang_trap_msg$category1$Argument_must_not_be_null", scope: ![[FILESCOPE]], file: ![[FILESCOPE]], type: !{{.*}}, flags: DIFlagArtificial, spFlags: DISPFlagDefinition, unit: !{{.*}})
-// CHECK: ![[LOC20]] = !DILocation(line: [[@LINE+2]], column: 3, scope: ![[SUBPROG14]])
-void f0() {
- __builtin_verbose_trap("category1", "Argument_must_not_be_null");
-}
-
-// CHECK: ![[SUBPROG22:.*]] = distinct !DISubprogram(name: "f1", linkageName: "_Z2f1v",
-// CHECK: ![[LOC23]] = !DILocation(line: 0, scope: ![[SUBPROG18]], inlinedAt: ![[LOC24:.*]])
-// CHECK: ![[LOC24]] = !DILocation(line: [[@LINE+5]], column: 3, scope: ![[SUBPROG22]])
-// CHECK: ![[LOC25]] = !DILocation(line: 0, scope: ![[SUBPROG26:.*]], inlinedAt: ![[LOC27:.*]])
-// CHECK: ![[SUBPROG26]] = distinct !DISubprogram(name: "__clang_trap_msg$category2$hello", scope: ![[FILESCOPE]], file: ![[FILESCOPE]], type: !{{.*}}, flags: DIFlagArtificial, spFlags: DISPFlagDefinition, unit: !{{.*}})
-// CHECK: ![[LOC27]] = !DILocation(line: [[@LINE+3]], column: 3, scope: ![[SUBPROG22]])
-void f1() {
- __builtin_verbose_trap("category1", "Argument_must_not_be_null");
- __builtin_verbose_trap("category2", "hello");
-}
-
-// CHECK: ![[SUBPROG32:.*]] = distinct !DISubprogram(name: "f2<constCat, constMsg>", linkageName: "_Z2f2IXadsoKcL_ZL8constCatEEEXadsoS0_L_ZL8constMsgEEEEvv",
-// CHECK: ![[LOC36]] = !DILocation(line: 0, scope: ![[SUBPROG26]], inlinedAt: ![[LOC37:.*]])
-// CHECK: ![[LOC37]] = !DILocation(line: [[@LINE+3]], column: 3, scope: ![[SUBPROG32]])
-template <const char * const category, const char * const reason>
-void f2() {
- __builtin_verbose_trap(category, reason);
-}
-
-void f3() {
- f2<constCat, constMsg>();
-}
diff --git a/clang/test/CodeGenCXX/debug-info-vla.cpp b/clang/test/CodeGenCXX/debug-info-vla.cpp
deleted file mode 100644
index 73bdaf0..0000000
--- a/clang/test/CodeGenCXX/debug-info-vla.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -std=c++11 -triple x86_64-unknown-unknown %s -o - | FileCheck %s
-
-
-void f(int m) {
- int x[3][m];
-}
-
-int (*fp)(int[][*]) = nullptr;
-
-// CHECK: !DICompositeType(tag: DW_TAG_array_type,
-// CHECK-NOT: size:
-// CHECK-SAME: elements: [[ELEM_TYPE:![0-9]+]]
-// CHECK: [[ELEM_TYPE]] = !{[[NOCOUNT:.*]]}
-// CHECK: [[NOCOUNT]] = !DISubrange(count: -1)
-//
-// CHECK: [[VAR:![0-9]+]] = !DILocalVariable(name: "__vla_expr0", {{.*}}flags: DIFlagArtificial
-// CHECK: !DICompositeType(tag: DW_TAG_array_type,
-// CHECK-NOT: size:
-// CHECK-SAME: elements: [[ELEM_TYPE:![0-9]+]]
-// CHECK: [[ELEM_TYPE]] = !{[[THREE:.*]], [[VARRANGE:![0-9]+]]}
-// CHECK: [[THREE]] = !DISubrange(count: 3)
-// CHECK: [[VARRANGE]] = !DISubrange(count: [[VAR]])
diff --git a/clang/test/CodeGenCXX/debug-info-vtable-optzn.cpp b/clang/test/CodeGenCXX/debug-info-vtable-optzn.cpp
deleted file mode 100644
index 8b49e95..0000000
--- a/clang/test/CodeGenCXX/debug-info-vtable-optzn.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -triple x86_64-apple-darwin %s -o - | FileCheck %s
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -triple amd64-unknown-freebsd %s -o - | FileCheck %s
-//
-// This tests that the "emit debug info for a C++ class only in the
-// module that has its vtable" optimization is disabled by default on
-// Darwin and FreeBSD.
-//
-// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "lost"
-class A
-{
- virtual bool f() = 0;
- int lost;
-};
-
-class B : public A
-{
- B *g();
-};
-
-B *B::g() {
- return this;
-}
diff --git a/clang/test/CodeGenCXX/debug-info-wchar.cpp b/clang/test/CodeGenCXX/debug-info-wchar.cpp
deleted file mode 100644
index 1ecdd56..0000000
--- a/clang/test/CodeGenCXX/debug-info-wchar.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o -| FileCheck %s
-void foo() {
-// CHECK: !DIBasicType(name: "wchar_t"
- const wchar_t w = L'x';
-}
diff --git a/clang/test/CodeGenCXX/debug-info-windows-dtor.cpp b/clang/test/CodeGenCXX/debug-info-windows-dtor.cpp
deleted file mode 100644
index beea56c..0000000
--- a/clang/test/CodeGenCXX/debug-info-windows-dtor.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-// RUN: %clang_cc1 -triple i386-unknown-windows-msvc -std=c++11 -emit-llvm -debug-info-kind=line-tables-only %s -o - | FileCheck %s
-// RUN: %clang_cc1 -triple i386-unknown-windows-msvc -std=c++11 -emit-llvm -debug-info-kind=line-directives-only %s -o - | FileCheck %s
-
-struct A {
- virtual ~A() {}
-};
-
-struct B {
- virtual ~B() {}
-};
-
-template<typename T>
-struct AB: A, B {
-};
-
-template struct AB<int>;
-
-// CHECK: define {{.*}}@"??_E?$AB@H@@W3AEPAXI@Z"({{.*}} !dbg [[THUNK_VEC_DEL_DTOR:![0-9]*]]
-// CHECK: call {{.*}}@"??_G?$AB@H@@UAEPAXI@Z"({{.*}}) #{{[0-9]*}}, !dbg [[THUNK_LOC:![0-9]*]]
-// CHECK: define
-
-// CHECK: [[THUNK_VEC_DEL_DTOR]] = distinct !DISubprogram
-// CHECK: [[THUNK_LOC]] = !DILocation(line: 0, scope: [[THUNK_VEC_DEL_DTOR]])
diff --git a/clang/test/CodeGenCXX/debug-info-zero-length-arrays.cpp b/clang/test/CodeGenCXX/debug-info-zero-length-arrays.cpp
deleted file mode 100644
index 0b3fd93..0000000
--- a/clang/test/CodeGenCXX/debug-info-zero-length-arrays.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %clang -target x86_64-unknown-unknown -fverbose-asm -g -O0 -S -emit-llvm %s -o - | FileCheck %s
-
-class A {
- int x[];
-};
-A a;
-
-// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "x"
-// CHECK-SAME: baseType: [[ARRAY_TYPE:![0-9]+]]
-// CHECK: [[ARRAY_TYPE]] = !DICompositeType(tag: DW_TAG_array_type,
-// CHECK-NOT: size:
-// CHECK-SAME: elements: [[ELEM_TYPE:![0-9]+]]
-// CHECK: [[ELEM_TYPE]] = !{[[SUBRANGE:.*]]}
-// CHECK: [[SUBRANGE]] = !DISubrange(count: -1)
diff --git a/clang/test/CodeGenCXX/debug-info.cpp b/clang/test/CodeGenCXX/debug-info.cpp
deleted file mode 100644
index 9cf26ba..0000000
--- a/clang/test/CodeGenCXX/debug-info.cpp
+++ /dev/null
@@ -1,170 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=BOTH
-// RUN: %clang_cc1 -triple i686-pc-windows-msvc -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s --check-prefix=MSVC --check-prefix=BOTH
-
-// CHECK: @_ZN6pr96081xE ={{.*}} global ptr null, align 8, !dbg [[X:![0-9]+]]
-
-// CHECK: define{{.*}} void @_ZN7pr147634funcENS_3fooE
-// CHECK-SAME: ptr dead_on_return noundef [[param:%.*]])
-// CHECK-NEXT: entry:
-// CHECK-NEXT: alloca ptr, align 8
-// CHECK-NEXT: [[param_addr_storage:%.*]] = alloca ptr, align 8
-// CHECK-NEXT: store
-// CHECK-NEXT: store ptr [[param]], ptr [[param_addr_storage]], align 8
-// CHECK-NEXT: #dbg_declare(ptr [[param_addr_storage]], ![[F:[0-9]+]], !DIExpression(DW_OP_deref),
-
-// !llvm.dbg.cu pulls in globals and their types first.
-// CHECK-NOT: !DIGlobalVariable(name: "c"
-// CHECK: [[X]] = !DIGlobalVariableExpression(var: [[XV:!.*]], expr: !DIExpression())
-// CHECK: [[XV]] = distinct !DIGlobalVariable(name: "x", linkageName: "_ZN6pr96081xE"
-// CHECK-SAME: type: [[INCARRAYPTR:![0-9]*]]
-// CHECK: [[INCARRAYPTR]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: [[INCARRAY:![0-9]+]]
-// CHECK: [[INCARRAY]] = !DICompositeType(tag: DW_TAG_array_type
-// CHECK-NOT: line:
-// CHECK-NOT: size:
-// CHECK-NOT: align:
-// CHECK-NOT: offset:
-// CHECK-SAME: baseType: ![[INCTYPE:[0-9]+]]
-
-// CHECK: ![[INCTYPE]] = !DICompositeType(tag: DW_TAG_structure_type, name: "incomplete"
-// CHECK-SAME: DIFlagFwdDecl
-
-template<typename T> struct Identity {
- typedef T Type;
-};
-
-void f(Identity<int>::Type a) {}
-void f(Identity<int> a) {}
-void f(int& a) { }
-
-template<typename T> struct A {
- A<T> *next;
-};
-void f(A<int>) { }
-
-struct B { };
-
-void f() {
- int B::*a = 0;
- void (B::*b)() = 0;
-}
-
-namespace EmptyNameCrash {
- struct A { A(); };
- typedef struct { A x; } B;
- B x;
-}
-
-// PR4890
-namespace PR4890 {
- struct X {
- ~X();
- };
-
- X::~X() { }
-}
-
-namespace VirtualDtor {
- struct Y {
- virtual ~Y();
- };
-
- Y::~Y() { }
-}
-
-namespace VirtualBase {
- struct A { int a; };
- struct B : virtual A { int b; };
-// BOTH: ![[VBASE_B:[0-9]+]] ={{.*}}!DICompositeType(tag: DW_TAG_structure_type, name: "B",{{.*}} line: [[@LINE-1]],
-// MSVC-SAME: size: 96
-// CHECK-SAME: size: 128,
-// BOTH-NOT: offset:
-// BOTH-NOT: DIFlagFwdDecl
-// BOTH-SAME: elements: [[VBASE_B_DEF:![0-9]+]]
-// BOTH: [[VBASE_B_DEF]] = !{[[VBASE_A_IN_B:![0-9]+]],
-//
-// Look for the vbtable offset of A, which should be 4 for MSVC, 24 otherwise.
-// BOTH: [[VBASE_A_IN_B]] = !DIDerivedType(tag: DW_TAG_inheritance, scope: ![[VBASE_B]],
-// BOTH-SAME: baseType: ![[VBASE_A:[0-9]+]],
-// MSVC-SAME: offset: 4,
-// CHECK-SAME: offset: 24,
-//
-// BOTH: ![[VBASE_A]] ={{.*}}!DICompositeType(tag: DW_TAG_structure_type, name: "A",
-
- void f() {
- B b;
- }
-}
-
-namespace b5249287 {
-template <typename T> class A {
- struct B;
-};
-
-class Cls {
- template <typename T> friend class A<T>::B;
-};
-
-Cls obj;
-}
-
-// CHECK: [[FUNC:[0-9]+]] = distinct !DISubprogram(name: "func", linkageName: "_ZN7pr147634funcENS_3fooE"
-// CHECK-SAME: type: {{![0-9]+}}
-// CHECK-SAME: DISPFlagDefinition
-
-// CHECK: [[PR14763:![0-9]+]] = !DINamespace(name: "pr14763"
-namespace pr14763 {
-struct foo {
-// CHECK: ![[FOO:[0-9]+]] ={{.*}}!DICompositeType(tag: DW_TAG_structure_type, name: "foo"
-// CHECK-SAME: scope: [[PR14763]]
-// CHECK-SAME: identifier:
- foo(const foo&);
-};
-
-// For some reason function arguments ended up down here
-// CHECK: ![[F]] = !DILocalVariable(name: "f", arg: 1, scope: ![[FUNC]]
-// CHECK-SAME: type: ![[FOO]]
-foo func(foo f) {
- return f; // reference 'f' for now because otherwise we hit another bug
-}
-
-}
-
-void foo() {
-// CHECK: !DILocalVariable(name: "c"
-// CHECK-NOT: arg:
-// CHECK-SAME: )
- const wchar_t c = L'x';
- wchar_t d = c;
-}
-
-namespace pr9608 { // also pr9600
-struct incomplete;
-incomplete (*x)[3];
-}
-
-namespace pr16214 {
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "a"
-// CHECK-SAME: elements: [[A_MEM:![0-9]+]]
-// CHECK-SAME: identifier: "_ZTSN7pr162141aE"
-// CHECK: [[A_MEM]] = !{[[A_I:![0-9]*]]}
-struct a {
-// CHECK: [[A_I]] = !DIDerivedType(tag: DW_TAG_member, name: "i"
- int i;
-};
-
-typedef a at;
-
-// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "b"
-// CHECK-SAME: DIFlagFwdDecl
-struct b {
-};
-
-typedef b bt;
-
-void func() {
- at a_inst;
- bt *b_ptr_inst;
- const bt *b_cnst_ptr_inst;
-}
-
-}
diff --git a/clang/test/CodeGenCXX/debug-lambda-expressions.cpp b/clang/test/CodeGenCXX/debug-lambda-expressions.cpp
deleted file mode 100644
index 324c092..0000000
--- a/clang/test/CodeGenCXX/debug-lambda-expressions.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10.0.0 -emit-llvm -o - %s -fexceptions -std=c++11 -debug-info-kind=limited | FileCheck %s
-
-auto var = [](int i) { return i+1; };
-void *use = &var;
-
-extern "C" auto cvar = []{};
-
-int a() { return []{ return 1; }(); }
-
-int b(int x) { return [x]{return x;}(); }
-
-int c(int x) { return [&x]{return x;}(); }
-
-struct D { D(); D(const D&); int x; };
-int d(int x) { D y[10]; return [x,y] { return y[x].x; }(); }
-
-// Randomness for file. -- 6
-
-// VAR:
-// CHECK: !DIGlobalVariable(name: "var"
-// CHECK-SAME: line: [[VAR_LINE:[0-9]+]]
-// CHECK-SAME: type: ![[VAR_T:[0-9]+]]
-
-// CHECK: [[FILE:.*]] = !DIFile(filename: "{{.*}}debug-lambda-expressions.cpp",
-
-// CVAR:
-// CHECK: !DIGlobalVariable(name: "cvar"
-// CHECK-SAME: line: [[CVAR_LINE:[0-9]+]]
-// CHECK-SAME: type: ![[CVAR_T:[0-9]+]]
-// CHECK: ![[CVAR_T]] = distinct !DICompositeType(tag: DW_TAG_class_type
-// CHECK-SAME: line: [[CVAR_LINE]],
-// CHECK-SAME: elements: ![[CVAR_ARGS:[0-9]+]]
-// CHECK: ![[CVAR_ARGS]] = !{!{{[0-9]+}}}
-
-// CHECK: ![[VAR_T]] = distinct !DICompositeType(tag: DW_TAG_class_type
-// CHECK-SAME: line: [[VAR_LINE]],
-// CHECK-SAME: elements: ![[VAR_ARGS:[0-9]+]]
-// CHECK: ![[VAR_ARGS]] = !{!{{[0-9]+}}}
-
-// CHECK: ![[INT:[0-9]+]] = !DIBasicType(name: "int"
-
-// A: 10
-// CHECK: ![[A_FUNC:.*]] = distinct !DISubprogram(name: "a"{{.*}}, line: [[A_LINE:[0-9]+]]{{.*}} DISPFlagDefinition
-
-// Back to A. -- 78
-// CHECK: ![[LAM_A:.*]] = distinct !DICompositeType(tag: DW_TAG_class_type{{.*}}, scope: ![[A_FUNC]]{{.*}}, line: [[A_LINE]],
-// CHECK-SAME: elements: ![[LAM_A_ARGS:[0-9]+]]
-// CHECK: ![[LAM_A_ARGS]] = !{![[CON_LAM_A:[0-9]+]]}
-// CHECK: ![[CON_LAM_A]] = !DISubprogram(name: "operator()"
-// CHECK-SAME: scope: ![[LAM_A]]
-// CHECK-SAME: line: [[A_LINE]]
-// CHECK-SAME: DIFlagPublic
-
-// B: 14
-// CHECK: ![[B_FUNC:.*]] = distinct !DISubprogram(name: "b"{{.*}}, line: [[B_LINE:[0-9]+]]{{.*}} DISPFlagDefinition
-
-// Back to B. -- 67
-// CHECK: ![[LAM_B:.*]] = distinct !DICompositeType(tag: DW_TAG_class_type{{.*}}, scope: ![[B_FUNC]]{{.*}}, line: [[B_LINE]],
-// CHECK-SAME: elements: ![[LAM_B_ARGS:[0-9]+]]
-// CHECK: ![[LAM_B_ARGS]] = !{![[CAP_B:[0-9]+]], ![[CON_LAM_B:[0-9]+]]}
-// CHECK: ![[CAP_B]] = !DIDerivedType(tag: DW_TAG_member, name: "x"
-// CHECK-SAME: scope: ![[LAM_B]]
-// CHECK-SAME: line: [[B_LINE]],
-// CHECK-SAME: baseType: ![[INT]]
-// CHECK: ![[CON_LAM_B]] = !DISubprogram(name: "operator()"
-// CHECK-SAME: scope: ![[LAM_B]]
-// CHECK-SAME: line: [[B_LINE]]
-// CHECK-SAME: DIFlagPublic
-
-// C: 17
-// CHECK: ![[C_FUNC:.*]] = distinct !DISubprogram(name: "c"{{.*}}, line: [[C_LINE:[0-9]+]]{{.*}} DISPFlagDefinition
-
-// Back to C. -- 55
-// CHECK: ![[LAM_C:.*]] = distinct !DICompositeType(tag: DW_TAG_class_type{{.*}}, scope: ![[C_FUNC]]{{.*}}, line: [[C_LINE]],
-// CHECK-SAME: elements: ![[LAM_C_ARGS:[0-9]+]]
-// CHECK: ![[LAM_C_ARGS]] = !{![[CAP_C:[0-9]+]], ![[CON_LAM_C:[0-9]+]]}
-// CHECK: ![[CAP_C]] = !DIDerivedType(tag: DW_TAG_member, name: "x"
-// CHECK-SAME: scope: ![[LAM_C]]
-// CHECK-SAME: line: [[C_LINE]],
-// CHECK-SAME: baseType: ![[TYPE_C_x:[0-9]+]]
-// CHECK: ![[TYPE_C_x]] = !DIDerivedType(tag: DW_TAG_reference_type, baseType: ![[INT]]
-// CHECK: ![[CON_LAM_C]] = !DISubprogram(name: "operator()"
-// CHECK-SAME: scope: ![[LAM_C]]
-// CHECK-SAME: line: [[C_LINE]]
-// CHECK-SAME: DIFlagPublic
-
-// D: 18
-// CHECK: ![[D_FUNC:.*]] = distinct !DISubprogram(name: "d"{{.*}}, line: [[D_LINE:[0-9]+]]{{.*}} DISPFlagDefinition
-
-// Back to D. -- 24
-// CHECK: ![[LAM_D:.*]] = distinct !DICompositeType(tag: DW_TAG_class_type{{.*}}, scope: ![[D_FUNC]]{{.*}}, line: [[D_LINE]],
-// CHECK-SAME: elements: ![[LAM_D_ARGS:[0-9]+]]
-// CHECK: ![[LAM_D_ARGS]] = !{![[CAP_D_X:[0-9]+]], ![[CAP_D_Y:[0-9]+]], ![[CON_LAM_D:[0-9]+]]}
-// CHECK: ![[CAP_D_X]] = !DIDerivedType(tag: DW_TAG_member, name: "x"
-// CHECK-SAME: scope: ![[LAM_D]]
-// CHECK-SAME: line: [[D_LINE]],
-// CHECK: ![[CAP_D_Y]] = !DIDerivedType(tag: DW_TAG_member, name: "y"
-// CHECK-SAME: scope: ![[LAM_D]]
-// CHECK-SAME: line: [[D_LINE]],
-// CHECK: ![[CON_LAM_D]] = !DISubprogram(name: "operator()"
-// CHECK-SAME: scope: ![[LAM_D]]
-// CHECK-SAME: line: [[D_LINE]]
-// CHECK-SAME: DIFlagPublic
diff --git a/clang/test/CodeGenCXX/debug-lambda-this.cpp b/clang/test/CodeGenCXX/debug-lambda-this.cpp
deleted file mode 100644
index 019d09c..0000000
--- a/clang/test/CodeGenCXX/debug-lambda-this.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10.0.0 -emit-llvm -o - %s -fexceptions -std=c++11 -debug-info-kind=limited | FileCheck %s
-
-struct D {
- D();
- D(const D&);
- int x;
- void d(int x);
-};
-void D::d(int x) {
- [=] {
- return this->x;
- }();
-}
-
-// CHECK: ![[D:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "D",
-// CHECK: ![[POINTER:.*]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[D]], size: 64)
-// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "this",
-// CHECK-SAME: line: 11
-// CHECK-SAME: baseType: ![[POINTER]]
-// CHECK-SAME: size: 64
-// CHECK-NOT: offset: 0
-// CHECK-SAME: ){{$}}
diff --git a/clang/test/CodeGenCXX/debug-prefix-map-lambda.cpp b/clang/test/CodeGenCXX/debug-prefix-map-lambda.cpp
deleted file mode 100644
index f0fb1a3..0000000
--- a/clang/test/CodeGenCXX/debug-prefix-map-lambda.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \
-// RUN: -fdebug-prefix-map=%S=/SOURCE_ROOT %s -emit-llvm -o - | FileCheck %s
-
-template <typename T> void b(T) {}
-void c() {
- // CHECK: !DISubprogram(name: "b<(lambda at
- // CHECK-SAME: SOURCE_ROOT
- // CHECK-SAME: [[@LINE+1]]:{{[0-9]+}})>"
- b([]{});
-}
diff --git a/clang/test/CodeGenCXX/defaulted-template-alias.cpp b/clang/test/CodeGenCXX/defaulted-template-alias.cpp
deleted file mode 100644
index a038aa0..0000000
--- a/clang/test/CodeGenCXX/defaulted-template-alias.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-unk-unk -o - -emit-llvm -debug-info-kind=standalone -gtemplate-alias %s -gsimple-template-names=simple \
-// RUN: | FileCheck %s
-
-//// Check that -gtemplate-alias causes DW_TAG_template_alias emission for
-//// template aliases with default parameter values. See template-alias.cpp for
-//// more template alias tests.
-//// FIXME: We currently do not emit defaulted arguments.
-
-template<typename T>
-struct X {
- char m;
-};
-
-template<typename T>
-struct Y {
- char n;
-};
-
-template <typename NonDefault, template <typename C> class T = Y, int I = 5, typename... Ts>
-using A = X<NonDefault>;
-
-//// We should be able to emit type alias metadata which describes all the
-//// values, including the defaulted parameters and empty parameter pack.
-A<int> a;
-
-// CHECK: !DIDerivedType(tag: DW_TAG_template_alias, name: "A", file: ![[#]], line: [[#]], baseType: ![[baseType:[0-9]+]], extraData: ![[extraData:[0-9]+]])
-// CHECK: ![[baseType]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "X",
-// CHECK: ![[int:[0-9]+]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-// CHECK: ![[extraData]] = !{![[NonDefault:[0-9]+]]}
-// CHECK: ![[NonDefault]] = !DITemplateTypeParameter(name: "NonDefault", type: ![[int]])
-
-//// FIXME: Ideally, we would describe the deafulted args, like this:
-// : ![[extraData]] = !{![[NonDefault:[0-9]+]], ![[T:[0-9]+]], ![[I:[0-9]+]], ![[Ts:[0-9]+]]}
-// : ![[NonDefault]] = !DITemplateTypeParameter(name: "NonDefault", type: ![[int]])
-// : ![[T]] = !DITemplateValueParameter(tag: DW_TAG_GNU_template_template_param, name: "T", defaulted: true, value: !"Y")
-// : ![[I]] = !DITemplateValueParameter(name: "I", type: ![[int]], defaulted: true, value: i32 5)
-// : ![[Ts]] = !DITemplateValueParameter(tag: DW_TAG_GNU_template_parameter_pack, name: "Ts", value: ![[types:[0-9]+]])
-// : ![[types]] = !{}
diff --git a/clang/test/CodeGenCXX/dependent-template-alias.cpp b/clang/test/CodeGenCXX/dependent-template-alias.cpp
deleted file mode 100644
index 324b16f..0000000
--- a/clang/test/CodeGenCXX/dependent-template-alias.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-unk-unk -o - -emit-llvm -debug-info-kind=standalone -gtemplate-alias %s -gsimple-template-names=simple \
-// RUN: | FileCheck %s
-
-template <int>
-using A = int;
-
-template<int I>
-struct S {
- using AA = A<I>;
- AA aa;
-};
-
-S<0> s;
-
-// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "aa", scope: ![[#]], file: ![[#]], line: [[#]], baseType: ![[AA:[0-9]+]], size: 32)
-// CHECK: [[AA]] = !DIDerivedType(tag: DW_TAG_typedef, name: "AA", scope: ![[#]], file: ![[#]], line: [[#]], baseType: ![[A:[0-9]+]])
-// CHECK: [[A]] = !DIDerivedType(tag: DW_TAG_template_alias, name: "A", file: ![[#]], line: [[#]], baseType: ![[int:[0-9]+]], extraData: ![[#]])
-// CHECK: [[int]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
diff --git a/clang/test/CodeGenCXX/destructor-debug-info.cpp b/clang/test/CodeGenCXX/destructor-debug-info.cpp
deleted file mode 100644
index d30c6c3..0000000
--- a/clang/test/CodeGenCXX/destructor-debug-info.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s
-
-class A { int a; };
-class B {
-public:
- B() { a = new A; }
- ~B() { delete a; }
-private:
- A *a;
-};
-
-void fn(B b);
-
-int i;
-void foo() {
- if (i) {
- B b1;
- fn (b1);
- }
-}
-// Check there is a line number entry for line 19 where b1 is destructed.
-// CHECK: !DILocation(line: 19,
diff --git a/clang/test/CodeGenCXX/difile_entry.cpp b/clang/test/CodeGenCXX/difile_entry.cpp
deleted file mode 100644
index 5fcd56e..0000000
--- a/clang/test/CodeGenCXX/difile_entry.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-/// PR47391: if the filename is absolute and starts with current working
-/// directory, there may be two ways describing the filename field of DIFile.
-/// Test that we canonicalize the DIFile.
-// RUN: rm -rf %t && mkdir %t && cd %t
-// RUN: cp %s .
-// RUN: %clang_cc1 -triple %itanium_abi_triple -main-file-name difile_entry.cpp -fdebug-compilation-dir=%t -debug-info-kind=limited %t/difile_entry.cpp -std=c++11 -emit-llvm -o - | FileCheck %s
-int x();
-static int i = x();
-
-// CHECK: distinct !DIGlobalVariable(name: "i", {{.*}}, file: ![[#FILE:]],
-// CHECK: ![[#FILE]] = !DIFile(filename: "difile_entry.cpp", directory:
-// CHECK: distinct !DISubprogram(name: "__cxx_global_var_init", {{.*}}, file: ![[#FILE]],
-// CHECK: distinct !DISubprogram(linkageName: "_GLOBAL__sub_I_difile_entry.cpp", {{.*}}, file: ![[#FILE]]
diff --git a/clang/test/CodeGenCXX/ext-vector-type-conditional.cpp b/clang/test/CodeGenCXX/ext-vector-type-conditional.cpp
index 4504000..8ef3fbb 100644
--- a/clang/test/CodeGenCXX/ext-vector-type-conditional.cpp
+++ b/clang/test/CodeGenCXX/ext-vector-type-conditional.cpp
@@ -1,3 +1,4 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5
// RUN: %clang_cc1 %s -triple x86_64-linux-gnu -Wno-unused -std=c++11 -emit-llvm -o - | FileCheck %s
using FourShorts = short __attribute__((ext_vector_type(4)));
@@ -11,6 +12,7 @@ using TwoFloats = float __attribute__((ext_vector_type(2)));
using FourFloats = float __attribute__((ext_vector_type(4)));
using TwoDoubles = double __attribute__((ext_vector_type(2)));
using FourDoubles = double __attribute__((ext_vector_type(4)));
+using TwoBools = bool __attribute__((ext_vector_type(2)));
FourShorts four_shorts;
TwoInts two_ints;
@@ -23,6 +25,7 @@ TwoFloats two_floats;
FourFloats four_floats;
TwoDoubles two_doubles;
FourDoubles four_doubles;
+TwoBools two_bools;
short some_short;
unsigned short some_ushort;
@@ -33,235 +36,186 @@ long long some_ll;
unsigned long long some_ull;
double some_double;
-// CHECK: TwoVectorOps
+// CHECK-LABEL: define dso_local void @_Z12TwoVectorOpsv(
+// CHECK-SAME: ) #[[ATTR0:[0-9]+]] {
+// CHECK-NEXT: [[ENTRY:.*:]]
+// CHECK-NEXT: [[TMP0:%.*]] = load <2 x i32>, ptr @two_ints, align 8
+// CHECK-NEXT: [[TMP1:%.*]] = load <2 x i32>, ptr @two_ints, align 8
+// CHECK-NEXT: [[TMP2:%.*]] = load <2 x i32>, ptr @two_ints, align 8
+// CHECK-NEXT: [[VECTOR_COND:%.*]] = icmp slt <2 x i32> [[TMP0]], zeroinitializer
+// CHECK-NEXT: [[VECTOR_SELECT:%.*]] = select <2 x i1> [[VECTOR_COND]], <2 x i32> [[TMP1]], <2 x i32> [[TMP2]]
+// CHECK-NEXT: [[TMP3:%.*]] = load <2 x i32>, ptr @two_ints, align 8
+// CHECK-NEXT: [[TMP4:%.*]] = load <2 x float>, ptr @two_floats, align 8
+// CHECK-NEXT: [[TMP5:%.*]] = load <2 x float>, ptr @two_floats, align 8
+// CHECK-NEXT: [[VECTOR_COND1:%.*]] = icmp slt <2 x i32> [[TMP3]], zeroinitializer
+// CHECK-NEXT: [[VECTOR_SELECT2:%.*]] = select <2 x i1> [[VECTOR_COND1]], <2 x float> [[TMP4]], <2 x float> [[TMP5]]
+// CHECK-NEXT: [[TMP6:%.*]] = load <2 x i64>, ptr @two_ll, align 16
+// CHECK-NEXT: [[TMP7:%.*]] = load <2 x double>, ptr @two_doubles, align 16
+// CHECK-NEXT: [[TMP8:%.*]] = load <2 x double>, ptr @two_doubles, align 16
+// CHECK-NEXT: [[VECTOR_COND3:%.*]] = icmp slt <2 x i64> [[TMP6]], zeroinitializer
+// CHECK-NEXT: [[VECTOR_SELECT4:%.*]] = select <2 x i1> [[VECTOR_COND3]], <2 x double> [[TMP7]], <2 x double> [[TMP8]]
+// CHECK-NEXT: [[LOAD_BITS:%.*]] = load i8, ptr @two_bools, align 1
+// CHECK-NEXT: [[TMP9:%.*]] = bitcast i8 [[LOAD_BITS]] to <8 x i1>
+// CHECK-NEXT: [[EXTRACTVEC:%.*]] = shufflevector <8 x i1> [[TMP9]], <8 x i1> poison, <2 x i32> <i32 0, i32 1>
+// CHECK-NEXT: [[TMP10:%.*]] = load <2 x i32>, ptr @two_ints, align 8
+// CHECK-NEXT: [[TMP11:%.*]] = load <2 x i32>, ptr @two_ints, align 8
+// CHECK-NEXT: [[VECTOR_SELECT5:%.*]] = select <2 x i1> [[EXTRACTVEC]], <2 x i32> [[TMP10]], <2 x i32> [[TMP11]]
+// CHECK-NEXT: [[LOAD_BITS6:%.*]] = load i8, ptr @two_bools, align 1
+// CHECK-NEXT: [[TMP12:%.*]] = bitcast i8 [[LOAD_BITS6]] to <8 x i1>
+// CHECK-NEXT: [[EXTRACTVEC7:%.*]] = shufflevector <8 x i1> [[TMP12]], <8 x i1> poison, <2 x i32> <i32 0, i32 1>
+// CHECK-NEXT: [[TMP13:%.*]] = load <2 x double>, ptr @two_doubles, align 16
+// CHECK-NEXT: [[TMP14:%.*]] = load <2 x double>, ptr @two_doubles, align 16
+// CHECK-NEXT: [[VECTOR_SELECT8:%.*]] = select <2 x i1> [[EXTRACTVEC7]], <2 x double> [[TMP13]], <2 x double> [[TMP14]]
+// CHECK-NEXT: ret void
+//
void TwoVectorOps() {
two_ints ? two_ints : two_ints;
- // CHECK: [[COND:%.+]] = load <2 x i32>
- // CHECK: [[LHS:%.+]] = load <2 x i32>
- // CHECK: [[RHS:%.+]] = load <2 x i32>
- // CHECK: [[NEG:%.+]] = icmp slt <2 x i32> [[COND]], zeroinitializer
- // CHECK: [[SEXT:%.+]] = sext <2 x i1> [[NEG]] to <2 x i32>
- // CHECK: [[XOR:%.+]] = xor <2 x i32> [[SEXT]], splat (i32 -1)
- // CHECK: [[RHS_AND:%.+]] = and <2 x i32> [[RHS]], [[XOR]]
- // CHECK: [[LHS_AND:%.+]] = and <2 x i32> [[LHS]], [[SEXT]]
- // CHECK: = or <2 x i32> [[RHS_AND]], [[LHS_AND]]
two_ints ? two_floats : two_floats;
- // CHECK: [[COND:%.+]] = load <2 x i32>
- // CHECK: [[LHS:%.+]] = load <2 x float>
- // CHECK: [[RHS:%.+]] = load <2 x float>
- // CHECK: [[NEG:%.+]] = icmp slt <2 x i32> [[COND]], zeroinitializer
- // CHECK: [[SEXT:%.+]] = sext <2 x i1> [[NEG]] to <2 x i32>
- // CHECK: [[XOR:%.+]] = xor <2 x i32> [[SEXT]], splat (i32 -1)
- // CHECK: [[RHS_EXT:%.+]] = bitcast <2 x float> [[RHS]] to <2 x i32>
- // CHECK: [[LHS_EXT:%.+]] = bitcast <2 x float> [[LHS]] to <2 x i32>
- // CHECK: [[RHS_AND:%.+]] = and <2 x i32> [[RHS_EXT]], [[XOR]]
- // CHECK: [[LHS_AND:%.+]] = and <2 x i32> [[LHS_EXT]], [[SEXT]]
- // CHECK: [[OR:%.+]] = or <2 x i32> [[RHS_AND]], [[LHS_AND]]
- // CHECK: = bitcast <2 x i32> [[OR]] to <2 x float>
two_ll ? two_doubles : two_doubles;
- // CHECK: [[COND:%.+]] = load <2 x i64>
- // CHECK: [[LHS:%.+]] = load <2 x double>
- // CHECK: [[RHS:%.+]] = load <2 x double>
- // CHECK: [[NEG:%.+]] = icmp slt <2 x i64> [[COND]], zeroinitializer
- // CHECK: [[SEXT:%.+]] = sext <2 x i1> [[NEG]] to <2 x i64>
- // CHECK: [[XOR:%.+]] = xor <2 x i64> [[SEXT]], splat (i64 -1)
- // CHECK: [[RHS_EXT:%.+]] = bitcast <2 x double> [[RHS]] to <2 x i64>
- // CHECK: [[LHS_EXT:%.+]] = bitcast <2 x double> [[LHS]] to <2 x i64>
- // CHECK: [[RHS_AND:%.+]] = and <2 x i64> [[RHS_EXT]], [[XOR]]
- // CHECK: [[LHS_AND:%.+]] = and <2 x i64> [[LHS_EXT]], [[SEXT]]
- // CHECK: [[OR:%.+]] = or <2 x i64> [[RHS_AND]], [[LHS_AND]]
- // CHECK: = bitcast <2 x i64> [[OR]] to <2 x double>
+
+ two_bools ? two_ints : two_ints;
+
+ two_bools ? two_doubles : two_doubles;
}
-// CHECK: TwoScalarOps
+// CHECK-LABEL: define dso_local void @_Z12TwoScalarOpsv(
+// CHECK-SAME: ) #[[ATTR0]] {
+// CHECK-NEXT: [[ENTRY:.*:]]
+// CHECK-NEXT: [[TMP0:%.*]] = load <4 x i16>, ptr @four_shorts, align 8
+// CHECK-NEXT: [[TMP1:%.*]] = load i16, ptr @some_short, align 2
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <4 x i16> poison, i16 [[TMP1]], i64 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <4 x i16> [[SPLAT_SPLATINSERT]], <4 x i16> poison, <4 x i32> zeroinitializer
+// CHECK-NEXT: [[TMP2:%.*]] = load i16, ptr @some_short, align 2
+// CHECK-NEXT: [[SPLAT_SPLATINSERT1:%.*]] = insertelement <4 x i16> poison, i16 [[TMP2]], i64 0
+// CHECK-NEXT: [[SPLAT_SPLAT2:%.*]] = shufflevector <4 x i16> [[SPLAT_SPLATINSERT1]], <4 x i16> poison, <4 x i32> zeroinitializer
+// CHECK-NEXT: [[VECTOR_COND:%.*]] = icmp slt <4 x i16> [[TMP0]], zeroinitializer
+// CHECK-NEXT: [[VECTOR_SELECT:%.*]] = select <4 x i1> [[VECTOR_COND]], <4 x i16> [[SPLAT_SPLAT]], <4 x i16> [[SPLAT_SPLAT2]]
+// CHECK-NEXT: [[TMP3:%.*]] = load <4 x i16>, ptr @four_shorts, align 8
+// CHECK-NEXT: [[TMP4:%.*]] = load i16, ptr @some_ushort, align 2
+// CHECK-NEXT: [[SPLAT_SPLATINSERT3:%.*]] = insertelement <4 x i16> poison, i16 [[TMP4]], i64 0
+// CHECK-NEXT: [[SPLAT_SPLAT4:%.*]] = shufflevector <4 x i16> [[SPLAT_SPLATINSERT3]], <4 x i16> poison, <4 x i32> zeroinitializer
+// CHECK-NEXT: [[TMP5:%.*]] = load i16, ptr @some_ushort, align 2
+// CHECK-NEXT: [[SPLAT_SPLATINSERT5:%.*]] = insertelement <4 x i16> poison, i16 [[TMP5]], i64 0
+// CHECK-NEXT: [[SPLAT_SPLAT6:%.*]] = shufflevector <4 x i16> [[SPLAT_SPLATINSERT5]], <4 x i16> poison, <4 x i32> zeroinitializer
+// CHECK-NEXT: [[VECTOR_COND7:%.*]] = icmp slt <4 x i16> [[TMP3]], zeroinitializer
+// CHECK-NEXT: [[VECTOR_SELECT8:%.*]] = select <4 x i1> [[VECTOR_COND7]], <4 x i16> [[SPLAT_SPLAT4]], <4 x i16> [[SPLAT_SPLAT6]]
+// CHECK-NEXT: [[TMP6:%.*]] = load <4 x i32>, ptr @four_ints, align 16
+// CHECK-NEXT: [[TMP7:%.*]] = load i16, ptr @some_ushort, align 2
+// CHECK-NEXT: [[CONV:%.*]] = zext i16 [[TMP7]] to i32
+// CHECK-NEXT: [[SPLAT_SPLATINSERT9:%.*]] = insertelement <4 x i32> poison, i32 [[CONV]], i64 0
+// CHECK-NEXT: [[SPLAT_SPLAT10:%.*]] = shufflevector <4 x i32> [[SPLAT_SPLATINSERT9]], <4 x i32> poison, <4 x i32> zeroinitializer
+// CHECK-NEXT: [[TMP8:%.*]] = load i16, ptr @some_short, align 2
+// CHECK-NEXT: [[CONV11:%.*]] = sext i16 [[TMP8]] to i32
+// CHECK-NEXT: [[SPLAT_SPLATINSERT12:%.*]] = insertelement <4 x i32> poison, i32 [[CONV11]], i64 0
+// CHECK-NEXT: [[SPLAT_SPLAT13:%.*]] = shufflevector <4 x i32> [[SPLAT_SPLATINSERT12]], <4 x i32> poison, <4 x i32> zeroinitializer
+// CHECK-NEXT: [[VECTOR_COND14:%.*]] = icmp slt <4 x i32> [[TMP6]], zeroinitializer
+// CHECK-NEXT: [[VECTOR_SELECT15:%.*]] = select <4 x i1> [[VECTOR_COND14]], <4 x i32> [[SPLAT_SPLAT10]], <4 x i32> [[SPLAT_SPLAT13]]
+// CHECK-NEXT: [[TMP9:%.*]] = load <4 x i32>, ptr @four_ints, align 16
+// CHECK-NEXT: [[TMP10:%.*]] = load i32, ptr @some_int, align 4
+// CHECK-NEXT: [[CONV16:%.*]] = sitofp i32 [[TMP10]] to float
+// CHECK-NEXT: [[SPLAT_SPLATINSERT17:%.*]] = insertelement <4 x float> poison, float [[CONV16]], i64 0
+// CHECK-NEXT: [[SPLAT_SPLAT18:%.*]] = shufflevector <4 x float> [[SPLAT_SPLATINSERT17]], <4 x float> poison, <4 x i32> zeroinitializer
+// CHECK-NEXT: [[TMP11:%.*]] = load float, ptr @some_float, align 4
+// CHECK-NEXT: [[SPLAT_SPLATINSERT19:%.*]] = insertelement <4 x float> poison, float [[TMP11]], i64 0
+// CHECK-NEXT: [[SPLAT_SPLAT20:%.*]] = shufflevector <4 x float> [[SPLAT_SPLATINSERT19]], <4 x float> poison, <4 x i32> zeroinitializer
+// CHECK-NEXT: [[VECTOR_COND21:%.*]] = icmp slt <4 x i32> [[TMP9]], zeroinitializer
+// CHECK-NEXT: [[VECTOR_SELECT22:%.*]] = select <4 x i1> [[VECTOR_COND21]], <4 x float> [[SPLAT_SPLAT18]], <4 x float> [[SPLAT_SPLAT20]]
+// CHECK-NEXT: [[TMP12:%.*]] = load <4 x i64>, ptr @four_ll, align 32
+// CHECK-NEXT: [[TMP13:%.*]] = load double, ptr @some_double, align 8
+// CHECK-NEXT: [[SPLAT_SPLATINSERT23:%.*]] = insertelement <4 x double> poison, double [[TMP13]], i64 0
+// CHECK-NEXT: [[SPLAT_SPLAT24:%.*]] = shufflevector <4 x double> [[SPLAT_SPLATINSERT23]], <4 x double> poison, <4 x i32> zeroinitializer
+// CHECK-NEXT: [[TMP14:%.*]] = load i64, ptr @some_ll, align 8
+// CHECK-NEXT: [[CONV25:%.*]] = sitofp i64 [[TMP14]] to double
+// CHECK-NEXT: [[SPLAT_SPLATINSERT26:%.*]] = insertelement <4 x double> poison, double [[CONV25]], i64 0
+// CHECK-NEXT: [[SPLAT_SPLAT27:%.*]] = shufflevector <4 x double> [[SPLAT_SPLATINSERT26]], <4 x double> poison, <4 x i32> zeroinitializer
+// CHECK-NEXT: [[VECTOR_COND28:%.*]] = icmp slt <4 x i64> [[TMP12]], zeroinitializer
+// CHECK-NEXT: [[VECTOR_SELECT29:%.*]] = select <4 x i1> [[VECTOR_COND28]], <4 x double> [[SPLAT_SPLAT24]], <4 x double> [[SPLAT_SPLAT27]]
+// CHECK-NEXT: [[TMP15:%.*]] = load <4 x i32>, ptr @four_ints, align 16
+// CHECK-NEXT: [[TMP16:%.*]] = load i32, ptr @some_int, align 4
+// CHECK-NEXT: [[SPLAT_SPLATINSERT30:%.*]] = insertelement <4 x i32> poison, i32 [[TMP16]], i64 0
+// CHECK-NEXT: [[SPLAT_SPLAT31:%.*]] = shufflevector <4 x i32> [[SPLAT_SPLATINSERT30]], <4 x i32> poison, <4 x i32> zeroinitializer
+// CHECK-NEXT: [[TMP17:%.*]] = load i16, ptr @some_short, align 2
+// CHECK-NEXT: [[CONV32:%.*]] = sext i16 [[TMP17]] to i32
+// CHECK-NEXT: [[SPLAT_SPLATINSERT33:%.*]] = insertelement <4 x i32> poison, i32 [[CONV32]], i64 0
+// CHECK-NEXT: [[SPLAT_SPLAT34:%.*]] = shufflevector <4 x i32> [[SPLAT_SPLATINSERT33]], <4 x i32> poison, <4 x i32> zeroinitializer
+// CHECK-NEXT: [[VECTOR_COND35:%.*]] = icmp slt <4 x i32> [[TMP15]], zeroinitializer
+// CHECK-NEXT: [[VECTOR_SELECT36:%.*]] = select <4 x i1> [[VECTOR_COND35]], <4 x i32> [[SPLAT_SPLAT31]], <4 x i32> [[SPLAT_SPLAT34]]
+// CHECK-NEXT: ret void
+//
void TwoScalarOps() {
four_shorts ? some_short : some_short;
- // CHECK: [[COND:%.+]] = load <4 x i16>
- // CHECK: [[LHS:%.+]] = load i16
- // CHECK: [[LHS_SPLAT_INSERT:%.+]] = insertelement <4 x i16> poison, i16 [[LHS]], i64 0
- // CHECK: [[LHS_SPLAT:%.+]] = shufflevector <4 x i16> [[LHS_SPLAT_INSERT]], <4 x i16> poison, <4 x i32> zeroinitializer
- // CHECK: [[RHS:%.+]] = load i16
- // CHECK: [[RHS_SPLAT_INSERT:%.+]] = insertelement <4 x i16> poison, i16 [[RHS]], i64 0
- // CHECK: [[RHS_SPLAT:%.+]] = shufflevector <4 x i16> [[RHS_SPLAT_INSERT]], <4 x i16> poison, <4 x i32> zeroinitializer
- // CHECK: [[NEG:%.+]] = icmp slt <4 x i16> [[COND]], zeroinitializer
- // CHECK: [[SEXT:%.+]] = sext <4 x i1> [[NEG]] to <4 x i16>
- // CHECK: [[XOR:%.+]] = xor <4 x i16> [[SEXT]], splat (i16 -1)
- // CHECK: [[RHS_AND:%.+]] = and <4 x i16> [[RHS_SPLAT]], [[XOR]]
- // CHECK: [[LHS_AND:%.+]] = and <4 x i16> [[LHS_SPLAT]], [[SEXT]]
- // CHECK: = or <4 x i16> [[RHS_AND]], [[LHS_AND]]
four_shorts ? some_ushort : some_ushort;
- // CHECK: [[COND:%.+]] = load <4 x i16>
- // CHECK: [[LHS:%.+]] = load i16
- // CHECK: [[LHS_SPLAT_INSERT:%.+]] = insertelement <4 x i16> poison, i16 [[LHS]], i64 0
- // CHECK: [[LHS_SPLAT:%.+]] = shufflevector <4 x i16> [[LHS_SPLAT_INSERT]], <4 x i16> poison, <4 x i32> zeroinitializer
- // CHECK: [[RHS:%.+]] = load i16
- // CHECK: [[RHS_SPLAT_INSERT:%.+]] = insertelement <4 x i16> poison, i16 [[RHS]], i64 0
- // CHECK: [[RHS_SPLAT:%.+]] = shufflevector <4 x i16> [[RHS_SPLAT_INSERT]], <4 x i16> poison, <4 x i32> zeroinitializer
- // CHECK: [[NEG:%.+]] = icmp slt <4 x i16> [[COND]], zeroinitializer
- // CHECK: [[SEXT:%.+]] = sext <4 x i1> [[NEG]] to <4 x i16>
- // CHECK: [[XOR:%.+]] = xor <4 x i16> [[SEXT]], splat (i16 -1)
- // CHECK: [[RHS_AND:%.+]] = and <4 x i16> [[RHS_SPLAT]], [[XOR]]
- // CHECK: [[LHS_AND:%.+]] = and <4 x i16> [[LHS_SPLAT]], [[SEXT]]
- // CHECK: = or <4 x i16> [[RHS_AND]], [[LHS_AND]]
four_ints ? some_ushort : some_short;
- // CHECK: [[COND:%.+]] = load <4 x i32>
- // CHECK: [[LHS:%.+]] = load i16
- // CHECK: [[LHS_ZEXT:%.+]] = zext i16 [[LHS]] to i32
- // CHECK: [[LHS_SPLAT_INSERT:%.+]] = insertelement <4 x i32> poison, i32 [[LHS_ZEXT]], i64 0
- // CHECK: [[LHS_SPLAT:%.+]] = shufflevector <4 x i32> [[LHS_SPLAT_INSERT]], <4 x i32> poison, <4 x i32> zeroinitializer
- // CHECK: [[RHS:%.+]] = load i16
- // CHECK: [[RHS_SEXT:%.+]] = sext i16 [[RHS]] to i32
- // CHECK: [[RHS_SPLAT_INSERT:%.+]] = insertelement <4 x i32> poison, i32 [[RHS_SEXT]], i64 0
- // CHECK: [[RHS_SPLAT:%.+]] = shufflevector <4 x i32> [[RHS_SPLAT_INSERT]], <4 x i32> poison, <4 x i32> zeroinitializer
- // CHECK: [[NEG:%.+]] = icmp slt <4 x i32> [[COND]], zeroinitializer
- // CHECK: [[SEXT:%.+]] = sext <4 x i1> [[NEG]] to <4 x i32>
- // CHECK: [[XOR:%.+]] = xor <4 x i32> [[SEXT]], splat (i32 -1)
- // CHECK: [[RHS_AND:%.+]] = and <4 x i32> [[RHS_SPLAT]], [[XOR]]
- // CHECK: [[LHS_AND:%.+]] = and <4 x i32> [[LHS_SPLAT]], [[SEXT]]
- // CHECK: = or <4 x i32> [[RHS_AND]], [[LHS_AND]]
four_ints ? some_int : some_float;
- // CHECK: [[COND:%.+]] = load <4 x i32>
- // CHECK: [[LHS:%.+]] = load i32
- // CHECK: [[LHS_CONV:%.+]] = sitofp i32 [[LHS]] to float
- // CHECK: [[LHS_SPLAT_INSERT:%.+]] = insertelement <4 x float> poison, float [[LHS_CONV]], i64 0
- // CHECK: [[LHS_SPLAT:%.+]] = shufflevector <4 x float> [[LHS_SPLAT_INSERT]], <4 x float> poison, <4 x i32> zeroinitializer
- // CHECK: [[RHS:%.+]] = load float
- // CHECK: [[RHS_SPLAT_INSERT:%.+]] = insertelement <4 x float> poison, float [[RHS]], i64 0
- // CHECK: [[RHS_SPLAT:%.+]] = shufflevector <4 x float> [[RHS_SPLAT_INSERT]], <4 x float> poison, <4 x i32> zeroinitializer
- // CHECK: [[NEG:%.+]] = icmp slt <4 x i32> [[COND]], zeroinitializer
- // CHECK: [[SEXT:%.+]] = sext <4 x i1> [[NEG]] to <4 x i32>
- // CHECK: [[XOR:%.+]] = xor <4 x i32> [[SEXT]], splat (i32 -1)
- // CHECK: [[RHS_CAST:%.+]] = bitcast <4 x float> [[RHS_SPLAT]] to <4 x i32>
- // CHECK: [[LHS_CAST:%.+]] = bitcast <4 x float> [[LHS_SPLAT]] to <4 x i32>
- // CHECK: [[RHS_AND:%.+]] = and <4 x i32> [[RHS_CAST]], [[XOR]]
- // CHECK: [[LHS_AND:%.+]] = and <4 x i32> [[LHS_CAST]], [[SEXT]]
- // CHECK: = or <4 x i32> [[RHS_AND]], [[LHS_AND]]
four_ll ? some_double : some_ll;
- // CHECK: [[COND:%.+]] = load <4 x i64>
- // CHECK: [[LHS:%.+]] = load double
- // CHECK: [[LHS_SPLAT_INSERT:%.+]] = insertelement <4 x double> poison, double [[LHS]], i64 0
- // CHECK: [[LHS_SPLAT:%.+]] = shufflevector <4 x double> [[LHS_SPLAT_INSERT]], <4 x double> poison, <4 x i32> zeroinitializer
- // CHECK: [[RHS:%.+]] = load i64
- // CHECK: [[RHS_CONV:%.+]] = sitofp i64 [[RHS]] to double
- // CHECK: [[RHS_SPLAT_INSERT:%.+]] = insertelement <4 x double> poison, double [[RHS_CONV]], i64 0
- // CHECK: [[RHS_SPLAT:%.+]] = shufflevector <4 x double> [[RHS_SPLAT_INSERT]], <4 x double> poison, <4 x i32> zeroinitializer
- // CHECK: [[NEG:%.+]] = icmp slt <4 x i64> [[COND]], zeroinitializer
- // CHECK: [[SEXT:%.+]] = sext <4 x i1> [[NEG]] to <4 x i64>
- // CHECK: [[XOR:%.+]] = xor <4 x i64> [[SEXT]], splat (i64 -1)
- // CHECK: [[RHS_CAST:%.+]] = bitcast <4 x double> [[RHS_SPLAT]] to <4 x i64>
- // CHECK: [[LHS_CAST:%.+]] = bitcast <4 x double> [[LHS_SPLAT]] to <4 x i64>
- // CHECK: [[RHS_AND:%.+]] = and <4 x i64> [[RHS_CAST]], [[XOR]]
- // CHECK: [[LHS_AND:%.+]] = and <4 x i64> [[LHS_CAST]], [[SEXT]]
- // CHECK: = or <4 x i64> [[RHS_AND]], [[LHS_AND]]
four_ints ? some_int : some_short;
- // CHECK: [[COND:%.+]] = load <4 x i32>
- // CHECK: [[LHS:%.+]] = load i32
- // CHECK: [[LHS_SPLAT_INSERT:%.+]] = insertelement <4 x i32> poison, i32 [[LHS]], i64 0
- // CHECK: [[LHS_SPLAT:%.+]] = shufflevector <4 x i32> [[LHS_SPLAT_INSERT]], <4 x i32> poison, <4 x i32> zeroinitializer
- // CHECK: [[RHS:%.+]] = load i16
- // CHECK: [[RHS_SEXT:%.+]] = sext i16 [[RHS]] to i32
- // CHECK: [[RHS_SPLAT_INSERT:%.+]] = insertelement <4 x i32> poison, i32 [[RHS_SEXT]], i64 0
- // CHECK: [[RHS_SPLAT:%.+]] = shufflevector <4 x i32> [[RHS_SPLAT_INSERT]], <4 x i32> poison, <4 x i32> zeroinitializer
- // CHECK: [[NEG:%.+]] = icmp slt <4 x i32> [[COND]], zeroinitializer
- // CHECK: [[SEXT:%.+]] = sext <4 x i1> [[NEG]] to <4 x i32>
- // CHECK: [[XOR:%.+]] = xor <4 x i32> [[SEXT]], splat (i32 -1)
- // CHECK: [[RHS_AND:%.+]] = and <4 x i32> [[RHS_SPLAT]], [[XOR]]
- // CHECK: [[LHS_AND:%.+]] = and <4 x i32> [[LHS_SPLAT]], [[SEXT]]
- // CHECK: = or <4 x i32> [[RHS_AND]], [[LHS_AND]]
}
-// CHECK: OneScalarOp
+// CHECK-LABEL: define dso_local void @_Z11OneScalarOpv(
+// CHECK-SAME: ) #[[ATTR0]] {
+// CHECK-NEXT: [[ENTRY:.*:]]
+// CHECK-NEXT: [[TMP0:%.*]] = load <4 x i32>, ptr @four_ints, align 16
+// CHECK-NEXT: [[TMP1:%.*]] = load <4 x i32>, ptr @four_ints, align 16
+// CHECK-NEXT: [[TMP2:%.*]] = load i32, ptr @some_int, align 4
+// CHECK-NEXT: [[SPLAT_SPLATINSERT:%.*]] = insertelement <4 x i32> poison, i32 [[TMP2]], i64 0
+// CHECK-NEXT: [[SPLAT_SPLAT:%.*]] = shufflevector <4 x i32> [[SPLAT_SPLATINSERT]], <4 x i32> poison, <4 x i32> zeroinitializer
+// CHECK-NEXT: [[VECTOR_COND:%.*]] = icmp slt <4 x i32> [[TMP0]], zeroinitializer
+// CHECK-NEXT: [[VECTOR_SELECT:%.*]] = select <4 x i1> [[VECTOR_COND]], <4 x i32> [[TMP1]], <4 x i32> [[SPLAT_SPLAT]]
+// CHECK-NEXT: [[TMP3:%.*]] = load <4 x i32>, ptr @four_ints, align 16
+// CHECK-NEXT: [[TMP4:%.*]] = load <4 x i32>, ptr @four_ints, align 16
+// CHECK-NEXT: [[VECTOR_COND1:%.*]] = icmp slt <4 x i32> [[TMP3]], zeroinitializer
+// CHECK-NEXT: [[VECTOR_SELECT2:%.*]] = select <4 x i1> [[VECTOR_COND1]], <4 x i32> [[TMP4]], <4 x i32> splat (i32 5)
+// CHECK-NEXT: [[TMP5:%.*]] = load <4 x i32>, ptr @four_ints, align 16
+// CHECK-NEXT: [[TMP6:%.*]] = load <4 x float>, ptr @four_floats, align 16
+// CHECK-NEXT: [[TMP7:%.*]] = load float, ptr @some_float, align 4
+// CHECK-NEXT: [[SPLAT_SPLATINSERT3:%.*]] = insertelement <4 x float> poison, float [[TMP7]], i64 0
+// CHECK-NEXT: [[SPLAT_SPLAT4:%.*]] = shufflevector <4 x float> [[SPLAT_SPLATINSERT3]], <4 x float> poison, <4 x i32> zeroinitializer
+// CHECK-NEXT: [[VECTOR_COND5:%.*]] = icmp slt <4 x i32> [[TMP5]], zeroinitializer
+// CHECK-NEXT: [[VECTOR_SELECT6:%.*]] = select <4 x i1> [[VECTOR_COND5]], <4 x float> [[TMP6]], <4 x float> [[SPLAT_SPLAT4]]
+// CHECK-NEXT: [[TMP8:%.*]] = load <4 x i64>, ptr @four_ll, align 32
+// CHECK-NEXT: [[TMP9:%.*]] = load <4 x double>, ptr @four_doubles, align 32
+// CHECK-NEXT: [[VECTOR_COND7:%.*]] = icmp slt <4 x i64> [[TMP8]], zeroinitializer
+// CHECK-NEXT: [[VECTOR_SELECT8:%.*]] = select <4 x i1> [[VECTOR_COND7]], <4 x double> [[TMP9]], <4 x double> splat (double 6.000000e+00)
+// CHECK-NEXT: [[TMP10:%.*]] = load <4 x i64>, ptr @four_ll, align 32
+// CHECK-NEXT: [[TMP11:%.*]] = load <4 x i64>, ptr @four_ll, align 32
+// CHECK-NEXT: [[VECTOR_COND9:%.*]] = icmp slt <4 x i64> [[TMP10]], zeroinitializer
+// CHECK-NEXT: [[VECTOR_SELECT10:%.*]] = select <4 x i1> [[VECTOR_COND9]], <4 x i64> [[TMP11]], <4 x i64> splat (i64 6)
+// CHECK-NEXT: [[TMP12:%.*]] = load <4 x i64>, ptr @four_ll, align 32
+// CHECK-NEXT: [[TMP13:%.*]] = load <4 x i64>, ptr @four_ll, align 32
+// CHECK-NEXT: [[TMP14:%.*]] = load i32, ptr @some_int, align 4
+// CHECK-NEXT: [[CONV:%.*]] = sext i32 [[TMP14]] to i64
+// CHECK-NEXT: [[SPLAT_SPLATINSERT11:%.*]] = insertelement <4 x i64> poison, i64 [[CONV]], i64 0
+// CHECK-NEXT: [[SPLAT_SPLAT12:%.*]] = shufflevector <4 x i64> [[SPLAT_SPLATINSERT11]], <4 x i64> poison, <4 x i32> zeroinitializer
+// CHECK-NEXT: [[VECTOR_COND13:%.*]] = icmp slt <4 x i64> [[TMP12]], zeroinitializer
+// CHECK-NEXT: [[VECTOR_SELECT14:%.*]] = select <4 x i1> [[VECTOR_COND13]], <4 x i64> [[TMP13]], <4 x i64> [[SPLAT_SPLAT12]]
+// CHECK-NEXT: [[TMP15:%.*]] = load <4 x i64>, ptr @four_ll, align 32
+// CHECK-NEXT: [[TMP16:%.*]] = load <4 x i64>, ptr @four_ll, align 32
+// CHECK-NEXT: [[TMP17:%.*]] = load i64, ptr @some_ll, align 8
+// CHECK-NEXT: [[SPLAT_SPLATINSERT15:%.*]] = insertelement <4 x i64> poison, i64 [[TMP17]], i64 0
+// CHECK-NEXT: [[SPLAT_SPLAT16:%.*]] = shufflevector <4 x i64> [[SPLAT_SPLATINSERT15]], <4 x i64> poison, <4 x i32> zeroinitializer
+// CHECK-NEXT: [[VECTOR_COND17:%.*]] = icmp slt <4 x i64> [[TMP15]], zeroinitializer
+// CHECK-NEXT: [[VECTOR_SELECT18:%.*]] = select <4 x i1> [[VECTOR_COND17]], <4 x i64> [[TMP16]], <4 x i64> [[SPLAT_SPLAT16]]
+// CHECK-NEXT: ret void
+//
void OneScalarOp() {
four_ints ? four_ints : some_int;
- // CHECK: [[COND:%.+]] = load <4 x i32>
- // CHECK: [[LHS:%.+]] = load <4 x i32>
- // CHECK: [[RHS:%.+]] = load i32
- // CHECK: [[RHS_SPLAT_INSERT:%.+]] = insertelement <4 x i32> poison, i32 [[RHS]], i64 0
- // CHECK: [[RHS_SPLAT:%.+]] = shufflevector <4 x i32> [[RHS_SPLAT_INSERT]], <4 x i32> poison, <4 x i32> zeroinitializer
- // CHECK: [[NEG:%.+]] = icmp slt <4 x i32> [[COND]], zeroinitializer
- // CHECK: [[SEXT:%.+]] = sext <4 x i1> [[NEG]] to <4 x i32>
- // CHECK: [[XOR:%.+]] = xor <4 x i32> [[SEXT]], splat (i32 -1)
- // CHECK: [[RHS_AND:%.+]] = and <4 x i32> [[RHS_SPLAT]], [[XOR]]
- // CHECK: [[LHS_AND:%.+]] = and <4 x i32> [[LHS]], [[SEXT]]
- // CHECK: = or <4 x i32> [[RHS_AND]], [[LHS_AND]]
four_ints ? four_ints : 5;
- // CHECK: [[COND:%.+]] = load <4 x i32>
- // CHECK: [[LHS:%.+]] = load <4 x i32>
- // CHECK: [[NEG:%.+]] = icmp slt <4 x i32> [[COND]], zeroinitializer
- // CHECK: [[SEXT:%.+]] = sext <4 x i1> [[NEG]] to <4 x i32>
- // CHECK: [[XOR:%.+]] = xor <4 x i32> [[SEXT]], splat (i32 -1)
- // CHECK: [[RHS_AND:%.+]] = and <4 x i32> splat (i32 5), [[XOR]]
- // CHECK: [[LHS_AND:%.+]] = and <4 x i32> [[LHS]], [[SEXT]]
- // CHECK: = or <4 x i32> [[RHS_AND]], [[LHS_AND]]
four_ints ? four_floats : some_float;
- // CHECK: [[COND:%.+]] = load <4 x i32>
- // CHECK: [[LHS:%.+]] = load <4 x float>
- // CHECK: [[RHS:%.+]] = load float
- // CHECK: [[RHS_SPLAT_INSERT:%.+]] = insertelement <4 x float> poison, float [[RHS]], i64 0
- // CHECK: [[RHS_SPLAT:%.+]] = shufflevector <4 x float> [[RHS_SPLAT_INSERT]], <4 x float> poison, <4 x i32> zeroinitializer
- // CHECK: [[NEG:%.+]] = icmp slt <4 x i32> [[COND]], zeroinitializer
- // CHECK: [[SEXT:%.+]] = sext <4 x i1> [[NEG]] to <4 x i32>
- // CHECK: [[XOR:%.+]] = xor <4 x i32> [[SEXT]], splat (i32 -1)
- // CHECK: [[RHS_CAST:%.+]] = bitcast <4 x float> [[RHS_SPLAT]] to <4 x i32>
- // CHECK: [[LHS_CAST:%.+]] = bitcast <4 x float> [[LHS]] to <4 x i32>
- // CHECK: [[RHS_AND:%.+]] = and <4 x i32> [[RHS_CAST]], [[XOR]]
- // CHECK: [[LHS_AND:%.+]] = and <4 x i32> [[LHS_CAST]], [[SEXT]]
- // CHECK: = or <4 x i32> [[RHS_AND]], [[LHS_AND]]
four_ll ? four_doubles : 6.0;
- // CHECK: [[COND:%.+]] = load <4 x i64>
- // CHECK: [[LHS:%.+]] = load <4 x double>
- // CHECK: [[NEG:%.+]] = icmp slt <4 x i64> [[COND]], zeroinitializer
- // CHECK: [[SEXT:%.+]] = sext <4 x i1> [[NEG]] to <4 x i64>
- // CHECK: [[XOR:%.+]] = xor <4 x i64> [[SEXT]], splat (i64 -1)
- // CHECK: [[LHS_CAST:%.+]] = bitcast <4 x double> [[LHS]] to <4 x i64>
- // CHECK: [[RHS_AND:%.+]] = and <4 x i64> splat (i64 4618441417868443648), [[XOR]]
- // CHECK: [[LHS_AND:%.+]] = and <4 x i64> [[LHS_CAST]], [[SEXT]]
- // CHECK: = or <4 x i64> [[RHS_AND]], [[LHS_AND]]
four_ll ? four_ll : 6;
- // CHECK: [[COND:%.+]] = load <4 x i64>
- // CHECK: [[LHS:%.+]] = load <4 x i64>
- // CHECK: [[NEG:%.+]] = icmp slt <4 x i64> [[COND]], zeroinitializer
- // CHECK: [[SEXT:%.+]] = sext <4 x i1> [[NEG]] to <4 x i64>
- // CHECK: [[XOR:%.+]] = xor <4 x i64> [[SEXT]], splat (i64 -1)
- // CHECK: [[RHS_AND:%.+]] = and <4 x i64> splat (i64 6), [[XOR]]
- // CHECK: [[LHS_AND:%.+]] = and <4 x i64> [[LHS]], [[SEXT]]
- // CHECK: [[OR:%.+]] = or <4 x i64> [[RHS_AND]], [[LHS_AND]]
four_ll ? four_ll : some_int;
- // CHECK: [[COND:%.+]] = load <4 x i64>
- // CHECK: [[LHS:%.+]] = load <4 x i64>
- // CHECK: [[RHS:%.+]] = load i32
- // CHECK: [[RHS_CONV:%.+]] = sext i32 [[RHS]] to i64
- // CHECK: [[RHS_SPLAT_INSERT:%.+]] = insertelement <4 x i64> poison, i64 [[RHS_CONV]], i64 0
- // CHECK: [[RHS_SPLAT:%.+]] = shufflevector <4 x i64> [[RHS_SPLAT_INSERT]], <4 x i64> poison, <4 x i32> zeroinitializer
- // CHECK: [[NEG:%.+]] = icmp slt <4 x i64> [[COND]], zeroinitializer
- // CHECK: [[SEXT:%.+]] = sext <4 x i1> [[NEG]] to <4 x i64>
- // CHECK: [[XOR:%.+]] = xor <4 x i64> [[SEXT]], splat (i64 -1)
- // CHECK: [[RHS_AND:%.+]] = and <4 x i64> [[RHS_SPLAT]], [[XOR]]
- // CHECK: [[LHS_AND:%.+]] = and <4 x i64> [[LHS]], [[SEXT]]
- // CHECK: [[OR:%.+]] = or <4 x i64> [[RHS_AND]], [[LHS_AND]]
four_ll ? four_ll : some_ll;
- // CHECK: [[COND:%.+]] = load <4 x i64>
- // CHECK: [[LHS:%.+]] = load <4 x i64>
- // CHECK: [[RHS:%.+]] = load i64
- // CHECK: [[RHS_SPLAT_INSERT:%.+]] = insertelement <4 x i64> poison, i64 [[RHS]], i64 0
- // CHECK: [[RHS_SPLAT:%.+]] = shufflevector <4 x i64> [[RHS_SPLAT_INSERT]], <4 x i64> poison, <4 x i32> zeroinitializer
- // CHECK: [[NEG:%.+]] = icmp slt <4 x i64> [[COND]], zeroinitializer
- // CHECK: [[SEXT:%.+]] = sext <4 x i1> [[NEG]] to <4 x i64>
- // CHECK: [[XOR:%.+]] = xor <4 x i64> [[SEXT]], splat (i64 -1)
- // CHECK: [[RHS_AND:%.+]] = and <4 x i64> [[RHS_SPLAT]], [[XOR]]
- // CHECK: [[LHS_AND:%.+]] = and <4 x i64> [[LHS]], [[SEXT]]
- // CHECK: [[OR:%.+]] = or <4 x i64> [[RHS_AND]], [[LHS_AND]]
}
diff --git a/clang/test/CodeGenCXX/fdebug-info-for-profiling.cpp b/clang/test/CodeGenCXX/fdebug-info-for-profiling.cpp
deleted file mode 100644
index e468a80..0000000
--- a/clang/test/CodeGenCXX/fdebug-info-for-profiling.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/// Normally -g1 does not add linkageName. -fdebug-info-for-profiling adds linkageName.
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -debug-info-kind=line-tables-only %s -o - | FileCheck %s --check-prefix=LINE
-// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -debug-info-kind=line-tables-only -fdebug-info-for-profiling %s -o - | FileCheck %s
-
-// LINE: = distinct !DISubprogram(name: "foo", scope:
-
-// CHECK: = distinct !DICompileUnit({{.*}}, debugInfoForProfiling: true,
-// CHECK: = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope:
-
-/// Add a DWARF discriminators pass for PGO.
-// RUN: %clang_cc1 -emit-llvm -fdebug-pass-manager -O1 -fprofile-instrument-path=a.profdata %s -o - 2>&1 | FileCheck %s --check-prefix=NODISCR
-// RUN: %clang_cc1 -emit-llvm -fdebug-pass-manager -O1 -fprofile-instrument-path=a.profdata -fdebug-info-for-profiling %s -o - 2>&1 | FileCheck %s --check-prefix=DISCR
-
-// RUN: echo > %t.proftext
-// RUN: llvm-profdata merge %t.proftext -o %t.profdata
-// RUN: %clang_cc1 -emit-llvm -fdebug-pass-manager -O1 -fprofile-instrument-use-path=%t.profdata -fdebug-info-for-profiling %s -o - 2>&1 | FileCheck %s --check-prefix=DISCR
-// RUN: %clang_cc1 -emit-llvm -fdebug-pass-manager -O1 -fdebug-info-for-profiling -fpseudo-probe-for-profiling %s -o - 2>&1 | FileCheck %s --check-prefix=PROBE
-
-// NODISCR-NOT: Running pass: AddDiscriminatorsPass
-// DISCR: Running pass: AddDiscriminatorsPass on {{.*}}
-// PROBE: Running pass: AddDiscriminatorsPass on {{.*}}
-// PROBE: Running pass: SampleProfileProbePass on {{.*}}
-
-void foo() {}
diff --git a/clang/test/CodeGenCXX/field-access-debug-info.cpp b/clang/test/CodeGenCXX/field-access-debug-info.cpp
deleted file mode 100644
index 38c06f1..0000000
--- a/clang/test/CodeGenCXX/field-access-debug-info.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-// RUN: %clang -g -S -emit-llvm %s -o - | FileCheck %s
-
-// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "p"
-// CHECK-SAME: baseType: ![[INT:[0-9]+]]
-// CHECK-SAME: DIFlagPublic
-// CHECK: ![[INT]] = !DIBasicType(name: "int"
-// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "pr"
-// CHECK-NOT: flags:
-// CHECK-SAME: baseType: ![[INT]]
-
-class A {
-public:
- int p;
-private:
- int pr;
-};
-
-A a;
diff --git a/clang/test/CodeGenCXX/globalinit-loc.cpp b/clang/test/CodeGenCXX/globalinit-loc.cpp
deleted file mode 100644
index fb482b6..0000000
--- a/clang/test/CodeGenCXX/globalinit-loc.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
-//
-// Verify that the global init helper function does not get associated
-// with any source location.
-//
-// CHECK: define internal {{.*}}void @_GLOBAL__sub_I_globalinit_loc.cpp({{.*}} {
-// CHECK: !dbg ![[DBG:.*]]
-// CHECK: !DISubprogram(linkageName: "_GLOBAL__sub_I_globalinit_loc.cpp"
-// CHECK-NOT: line:
-// CHECK-SAME: DISPFlagLocalToUnit
-// CHECK-SAME: DISPFlagDefinition
-// CHECK: ![[DBG]] = !DILocation(line: 0,
-# 99 "someheader.h"
-class A {
-public:
- A();
- int foo() { return 0; }
-};
-# 5 "main.cpp"
-A a;
-
-int f() {
- return a.foo();
-}
-
diff --git a/clang/test/CodeGenCXX/inline-dllexport-member.cpp b/clang/test/CodeGenCXX/inline-dllexport-member.cpp
deleted file mode 100644
index d6b004d..0000000
--- a/clang/test/CodeGenCXX/inline-dllexport-member.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: %clang_cc1 -triple i686-windows-win32 -fms-extensions -debug-info-kind=limited -emit-llvm %s -o - \
-// RUN: | FileCheck %s
-
-// CHECK: @"?ui@s@@2IB" = weak_odr dso_local dllexport constant i32 0, comdat, align 4, !dbg [[UI:![0-9]+]]
-
-struct __declspec(dllexport) s {
- static const unsigned int ui = 0;
-};
-
-// CHECK: [[UI]] = !DIGlobalVariableExpression(var: [[UIV:.*]], expr: !DIExpression())
-// CHECK: [[UIV]] = distinct !DIGlobalVariable(name: "ui", linkageName: "?ui@s@@2IB", scope: ![[SCOPE:[0-9]+]],
-// CHECK: ![[SCOPE]] = distinct !DICompileUnit(
-
diff --git a/clang/test/CodeGenCXX/int64_uint64.cpp b/clang/test/CodeGenCXX/int64_uint64.cpp
index f4fd9ea..8046ea9 100644
--- a/clang/test/CodeGenCXX/int64_uint64.cpp
+++ b/clang/test/CodeGenCXX/int64_uint64.cpp
@@ -6,6 +6,14 @@
// RUN: -target-feature +neon \
// RUN: -emit-llvm -w -O1 -o - %s | FileCheck --check-prefix=CHECK-AARCH64 %s
+// RUN: %clang_cc1 -triple arm-linux-guneabi \
+// RUN: -target-cpu cortex-a8 -fexperimental-new-constant-interpreter \
+// RUN: -emit-llvm -w -O1 -o - %s | FileCheck --check-prefix=CHECK-ARM %s
+
+// RUN: %clang_cc1 -triple arm64-linux-gnueabi \
+// RUN: -target-feature +neon -fexperimental-new-constant-interpreter \
+// RUN: -emit-llvm -w -O1 -o - %s | FileCheck --check-prefix=CHECK-AARCH64 %s
+
// REQUIRES: aarch64-registered-target || arm-registered-target
// Test if int64_t and uint64_t can be correctly mangled.
diff --git a/clang/test/CodeGenCXX/debug-info-lambda-this.cpp b/clang/test/CodeGenCXX/lambda-this-2.cpp
index e5acab1..e5acab1 100644
--- a/clang/test/CodeGenCXX/debug-info-lambda-this.cpp
+++ b/clang/test/CodeGenCXX/lambda-this-2.cpp
diff --git a/clang/test/CodeGenCXX/linetable-cleanup.cpp b/clang/test/CodeGenCXX/linetable-cleanup.cpp
deleted file mode 100644
index 7e4ad9a..0000000
--- a/clang/test/CodeGenCXX/linetable-cleanup.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -gno-column-info -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -gno-column-info -triple x86_64-apple-darwin10 -std=c++98 %s -o - | FileCheck %s
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -gno-column-info -triple x86_64-apple-darwin10 -std=c++11 %s -o - | FileCheck %s
-
-// Check the line numbers for cleanup code with EH in combination with
-// simple return expressions.
-
-// CHECK: define {{.*}}foo
-// CHECK: call void @_ZN1CD1Ev(ptr {{.*}}){{( #[0-9])?}}, !dbg ![[RET:[0-9]+]]
-// CHECK: ret i32 0, !dbg ![[RET]]
-
-// CHECK: define {{.*}}bar
-// CHECK: ret void, !dbg ![[RETBAR:[0-9]+]]
-
-// CHECK: define {{.*}}baz
-// CHECK: ret void, !dbg ![[RETBAZ:[0-9]+]]
-
-class C {
-public:
- ~C() {}
- int i;
-};
-
-int foo()
-{
- C c;
- c.i = 42;
- return 0;
- // This breakpoint should be at/before the cleanup code.
- // CHECK: ![[RET]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
-}
-
-void bar()
-{
- if (!foo())
- // CHECK: {{.*}} = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
- return;
-
- if (foo()) {
- C c;
- c.i = foo();
- }
- // Clang creates only a single ret instruction. Make sure it is at a useful line.
- // CHECK: ![[RETBAR]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
-}
-
-void baz()
-{
- if (!foo())
- // CHECK: ![[SCOPE1:.*]] = distinct !DILexicalBlock({{.*}}, line: [[@LINE-1]])
- // CHECK: {{.*}} = !DILocation(line: [[@LINE+1]], scope: ![[SCOPE1]])
- return;
-
- if (foo()) {
- // no cleanup
- // CHECK: {{.*}} = !DILocation(line: [[@LINE+2]], scope: ![[SCOPE2:.*]])
- // CHECK: ![[SCOPE2]] = distinct !DILexicalBlock({{.*}}, line: [[@LINE-3]])
- return;
- }
- // CHECK: ![[RETBAZ]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
-}
diff --git a/clang/test/CodeGenCXX/linetable-eh.cpp b/clang/test/CodeGenCXX/linetable-eh.cpp
deleted file mode 100644
index 362c626..0000000
--- a/clang/test/CodeGenCXX/linetable-eh.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -gno-column-info -triple x86_64-apple-macosx10.9.0 -funwind-tables=2 -std=c++11 -fcxx-exceptions -fexceptions %s -o - | FileCheck -allow-deprecated-dag-overlap %s
-
-// Test that emitting a landing pad does not affect the line table
-// entries for the code that triggered it.
-
-// CHECK: #dbg_declare
-// CHECK: #dbg_declare({{.*}}, ![[CURRENT_ADDR:.*]], !{{.*}}, ![[DBG1:[0-9]+]]
-// CHECK: unwind label %{{.*}}, !dbg ![[DBG1]]
-// CHECK: store i64 %{{.*}}, ptr %current_address, align 8, !dbg ![[DBG4:.*]]
-// CHECK-NEXT: #dbg_declare({{.*}}, ![[FOUND_IT:.*]], !{{.*}}, ![[DBG2:[0-9]+]]
-// CHECK: = landingpad
-// CHECK-NEXT: cleanup, !dbg ![[DBG3:.*]]
-// CHECK-DAG: ![[CURRENT_ADDR]] = {{.*}}name: "current_address"
-// CHECK-DAG: ![[FOUND_IT]] = {{.*}}name: "found_it"
-// CHECK-DAG: ![[DBG1]] = !DILocation(line: 256,
-// CHECK-DAG: ![[DBG2]] = !DILocation(line: 257,
-// CHECK-DAG: ![[DBG3]] = !DILocation(line: 268,
-// CHECK-DAG: ![[DBG4]] = !DILocation(line: 256,
-typedef unsigned long long uint64_t;
-template<class _Tp> class shared_ptr {
-public:
- typedef _Tp element_type;
- element_type* __ptr_;
- ~shared_ptr();
- element_type* operator->() const noexcept {return __ptr_;}
-};
-class Context {
-public:
- uint64_t GetIt();
-};
-class Foo
-{
- bool bar();
- virtual shared_ptr<Context> GetContext () = 0;
-};
-# 253 "Foo.cpp" 3
-bool
-Foo::bar ()
-{
- uint64_t current_address = GetContext()->GetIt();
- bool found_it = false;
-# 267 "Foo.cpp" 3
- return found_it;
-}
diff --git a/clang/test/CodeGenCXX/linetable-fnbegin.cpp b/clang/test/CodeGenCXX/linetable-fnbegin.cpp
deleted file mode 100644
index d64b5a6..0000000
--- a/clang/test/CodeGenCXX/linetable-fnbegin.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %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:.*]] = !DIFile(filename: "./template.hpp",
-// CHECK: [[SP:.*]] = distinct !DISubprogram(name: "bar",
-// CHECK-SAME: file: [[HPP]], line: 22
-// CHECK-SAME: DISPFlagDefinition
-// We shouldn't need a lexical block for this function.
-// CHECK: [[DBG]] = !DILocation(line: 23, column: 3, scope: [[SP]])
-
-
-# 1 "./template.h" 1
-template <typename T>
-class Foo {
-public:
- int bar();
-};
-# 21 "./template.hpp"
-template <typename T>
-int Foo<T>::bar() {
- return 23;
-}
-int main (int argc, const char * argv[])
-{
- Foo<int> f;
- return f.bar();
-}
diff --git a/clang/test/CodeGenCXX/linetable-virtual-variadic.cpp b/clang/test/CodeGenCXX/linetable-virtual-variadic.cpp
deleted file mode 100644
index 9d7cd3e..0000000
--- a/clang/test/CodeGenCXX/linetable-virtual-variadic.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-// Sparc64 is used because AArch64 and X86_64 would both use musttail.
-// RUN: %clang_cc1 -triple sparc64-linux-gnu -emit-llvm -debug-info-kind=line-tables-only %s -o - | FileCheck %s
-// RUN: %clang_cc1 -triple sparc64-linux-gnu -emit-llvm -debug-info-kind=line-directives-only %s -o - | FileCheck %s
-// Crasher for PR22929.
-class Base {
- virtual void VariadicFunction(...);
-};
-
-class Derived : public virtual Base {
- virtual void VariadicFunction(...);
-};
-
-void Derived::VariadicFunction(...) { }
-
-// CHECK: define{{.*}} void @_ZN7Derived16VariadicFunctionEz({{.*}} !dbg ![[SP:[0-9]+]]
-// CHECK: ret void, !dbg ![[LOC:[0-9]+]]
-// CHECK: define{{.*}} void @_ZT{{.+}}N7Derived16VariadicFunctionEz({{.*}} !dbg ![[SP_I:[0-9]+]]
-// CHECK: ret void, !dbg ![[LOC_I:[0-9]+]]
-//
-// CHECK: ![[SP]] = distinct !DISubprogram(name: "VariadicFunction"
-// CHECK: ![[LOC]] = !DILocation({{.*}}scope: ![[SP]])
-// CHECK: ![[SP_I]] = distinct !DISubprogram(name: "VariadicFunction"
-// CHECK: ![[LOC_I]] = !DILocation({{.*}}scope: ![[SP_I]])
diff --git a/clang/test/CodeGenCXX/lpad-linetable.cpp b/clang/test/CodeGenCXX/lpad-linetable.cpp
deleted file mode 100644
index d32aadf..0000000
--- a/clang/test/CodeGenCXX/lpad-linetable.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin10 -std=c++98 %s -o - | FileCheck %s
-// The landing pad should have the line number of the closing brace of the function.
-// CHECK: ret i32
-// CHECK: landingpad {{.*}}
-// CHECK-NEXT: !dbg ![[LPAD:[0-9]+]]
-// CHECK: ![[LPAD]] = !DILocation(line: 24, column: 1, scope: !{{.*}})
-
-# 1 "/usr/include/c++/4.2.1/vector" 1 3
-typedef long unsigned int __darwin_size_t;
-typedef __darwin_size_t size_t;
-namespace std {
- template<typename _Tp>
- class allocator
- {
- public:
- template<typename _Tp1>
- struct rebind
- { typedef allocator<_Tp1> other; };
- ~allocator() throw() { }
- };
- template<typename _Tp, typename _Alloc>
- struct _Vector_base
- {
- typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type;
- struct _Vector_impl
- {
- _Vector_impl(_Tp_alloc_type const& __a) { }
- };
- typedef _Alloc allocator_type;
- _Vector_base(const allocator_type& __a)
- : _M_impl(__a)
- { }
- ~_Vector_base() { }
- _Vector_impl _M_impl;
- };
- template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
- class vector
- : protected _Vector_base<_Tp, _Alloc>
- {
- typedef _Vector_base<_Tp, _Alloc> _Base;
- public:
- typedef _Tp value_type;
- typedef size_t size_type;
- typedef _Alloc allocator_type;
- vector(const allocator_type& __a = allocator_type())
- : _Base(__a)
- { }
- size_type
- push_back(const value_type& __x)
- {}
- };
-}
-# 10 "main.cpp" 2
-
-
-
-
-int main (int argc, char const *argv[], char const *envp[])
-{ // 15
- std::vector<long> longs;
- std::vector<short> shorts;
- for (int i=0; i<12; i++)
- {
- longs.push_back(i);
- shorts.push_back(i);
- }
- return 0; // 23
-} // 24
diff --git a/clang/test/CodeGenCXX/mangle-ms-cxx11.cpp b/clang/test/CodeGenCXX/mangle-ms-cxx11.cpp
index 312c70cc..44f4436 100644
--- a/clang/test/CodeGenCXX/mangle-ms-cxx11.cpp
+++ b/clang/test/CodeGenCXX/mangle-ms-cxx11.cpp
@@ -358,3 +358,42 @@ struct s { enum {}; enum {}; };
// DBG-DAG: DW_TAG_enumeration_type{{.*}}identifier: ".?AW4<unnamed-type-$S3>@s@pr37723@@"
s x;
}
+
+namespace InconsistentTagKinds {
+ namespace t1 {
+ class A;
+ struct A;
+ void f(A*) {}
+ // CHECK-DAG: @"?f@t1@InconsistentTagKinds@@YAXPAVA@12@@Z"
+ } // namespace t1
+ namespace t2 {
+ struct A;
+ class A;
+ void f(A*) {}
+ // CHECK-DAG: @"?f@t2@InconsistentTagKinds@@YAXPAUA@12@@Z"
+ } // namespace t2
+ namespace t3 {
+ class A {};
+ struct A;
+ void f(A*) {}
+ // CHECK-DAG: @"?f@t3@InconsistentTagKinds@@YAXPAVA@12@@Z"
+ } // namespace t3
+ namespace t4 {
+ struct A {};
+ class A;
+ void f(A*) {}
+ // CHECK-DAG: @"?f@t4@InconsistentTagKinds@@YAXPAUA@12@@Z"
+ } // namespace t4
+ namespace t5 {
+ class A;
+ struct A {};
+ void f(A*) {}
+ // CHECK-DAG: @"?f@t5@InconsistentTagKinds@@YAXPAUA@12@@Z"
+ } // namespace t5
+ namespace t6 {
+ struct A;
+ class A {};
+ void f(A*) {}
+ // CHECK-DAG: @"?f@t6@InconsistentTagKinds@@YAXPAVA@12@@Z"
+ } // namespace t6
+} // namespace InconsistentTagKinds
diff --git a/clang/test/CodeGenCXX/microsoft-abi-member-pointers-debug-info.cpp b/clang/test/CodeGenCXX/microsoft-abi-member-pointers-debug-info.cpp
deleted file mode 100644
index 34be555..0000000
--- a/clang/test/CodeGenCXX/microsoft-abi-member-pointers-debug-info.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %clang_cc1 -std=c++11 -debug-info-kind=line-tables-only -fno-rtti -emit-llvm %s -o - -triple=x86_64-pc-win32 -fms-extensions | FileCheck %s
-
-struct Task {
- virtual void Run() = 0;
-};
-
-auto b = &Task::Run;
-
-// CHECK: define {{.*}}@"??_9Task@@$BA@AA"
-// CHECK-NOT: define
-// CHECK: musttail call {{.*}}, !dbg ![[DBG:[0-9]+]]
-
-// CHECK: ![[DBG]] = !DILocation(line: 4
-
diff --git a/clang/test/CodeGenCXX/modules-vtable.cppm b/clang/test/CodeGenCXX/modules-vtable.cppm
index 6589b9f..75f7598 100644
--- a/clang/test/CodeGenCXX/modules-vtable.cppm
+++ b/clang/test/CodeGenCXX/modules-vtable.cppm
@@ -1,4 +1,4 @@
-// REQUIRES: !system-windows
+// REQUIRES: !system-windows, !system-cygwin
// RUN: rm -rf %t
// RUN: split-file %s %t
diff --git a/clang/test/CodeGenCXX/pr70585.cppm b/clang/test/CodeGenCXX/pr70585.cppm
index ad4e135..d44a4f4 100644
--- a/clang/test/CodeGenCXX/pr70585.cppm
+++ b/clang/test/CodeGenCXX/pr70585.cppm
@@ -1,4 +1,4 @@
-// REQUIRES: !system-windows
+// REQUIRES: !system-windows, !system-cygwin
// RUN: rm -rf %t
// RUN: split-file %s %t
diff --git a/clang/test/CodeGenCXX/ptrauth-explicit-vtable-pointer-control.cpp b/clang/test/CodeGenCXX/ptrauth-explicit-vtable-pointer-control.cpp
index 1b10371..e33525c 100644
--- a/clang/test/CodeGenCXX/ptrauth-explicit-vtable-pointer-control.cpp
+++ b/clang/test/CodeGenCXX/ptrauth-explicit-vtable-pointer-control.cpp
@@ -1,31 +1,31 @@
-// RUN: %clang_cc1 %s -x c++ -std=c++11 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics \
+// RUN: %clang_cc1 %s -x c++ -std=c++20 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics \
// RUN: -emit-llvm -o - | FileCheck --check-prefixes=CHECK,NODISC %s
-// RUN: %clang_cc1 %s -x c++ -std=c++11 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics \
+// RUN: %clang_cc1 %s -x c++ -std=c++20 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics \
// RUN: -fptrauth-vtable-pointer-type-discrimination \
// RUN: -emit-llvm -o - | FileCheck --check-prefixes=CHECK,TYPE %s
-// RUN: %clang_cc1 %s -x c++ -std=c++11 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics \
+// RUN: %clang_cc1 %s -x c++ -std=c++20 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics \
// RUN: -fptrauth-vtable-pointer-address-discrimination \
// RUN: -emit-llvm -o - | FileCheck --check-prefixes=CHECK,ADDR %s
-// RUN: %clang_cc1 %s -x c++ -std=c++11 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics \
+// RUN: %clang_cc1 %s -x c++ -std=c++20 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics \
// RUN: -fptrauth-vtable-pointer-type-discrimination \
// RUN: -fptrauth-vtable-pointer-address-discrimination \
// RUN: -emit-llvm -o - | FileCheck --check-prefixes=CHECK,BOTH %s
-// RUN: %clang_cc1 %s -x c++ -std=c++11 -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics \
+// RUN: %clang_cc1 %s -x c++ -std=c++20 -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics \
// RUN: -emit-llvm -o - | FileCheck --check-prefixes=CHECK,NODISC %s
-// RUN: %clang_cc1 %s -x c++ -std=c++11 -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics \
+// RUN: %clang_cc1 %s -x c++ -std=c++20 -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics \
// RUN: -fptrauth-vtable-pointer-type-discrimination \
// RUN: -emit-llvm -o - | FileCheck --check-prefixes=CHECK,TYPE %s
-// RUN: %clang_cc1 %s -x c++ -std=c++11 -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics \
+// RUN: %clang_cc1 %s -x c++ -std=c++20 -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics \
// RUN: -fptrauth-vtable-pointer-address-discrimination \
// RUN: -emit-llvm -o - | FileCheck --check-prefixes=CHECK,ADDR %s
-// RUN: %clang_cc1 %s -x c++ -std=c++11 -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics \
+// RUN: %clang_cc1 %s -x c++ -std=c++20 -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics \
// RUN: -fptrauth-vtable-pointer-type-discrimination \
// RUN: -fptrauth-vtable-pointer-address-discrimination \
// RUN: -emit-llvm -o - | FileCheck --check-prefixes=CHECK,BOTH %s
@@ -78,6 +78,27 @@ struct authenticated(default_key, default_address_discrimination, custom_discrim
virtual void g();
};
+// CHECK: @_ZTVN5test19ConstEvalE = external unnamed_addr constant { [3 x ptr] }, align 8
+// CHECK: @_ZN5test12ceE = global %{{.*}} { ptr ptrauth (ptr getelementptr inbounds inrange(-16, 8) ({ [3 x ptr] }, ptr @_ZTVN5test19ConstEvalE, i32 0, i32 0, i32 2), i32 2, i64 0, ptr @_ZN5test12ceE) }, align 8
+// CHECK: @_ZTVN5test116ConstEvalDerivedE = linkonce_odr unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr null, ptr @_ZTIN5test116ConstEvalDerivedE, ptr ptrauth (ptr @_ZN5test19ConstEval1fEv, i32 0, i64 26259, ptr getelementptr inbounds ({ [3 x ptr] }, ptr @_ZTVN5test116ConstEvalDerivedE, i32 0, i32 0, i32 2))] },{{.*}}align 8
+// CHECK: @_ZN5test13cedE = global { ptr } { ptr ptrauth (ptr getelementptr inbounds inrange(-16, 8) ({ [3 x ptr] }, ptr @_ZTVN5test116ConstEvalDerivedE, i32 0, i32 0, i32 2), i32 2, i64 0, ptr @_ZN5test13cedE) }, align 8
+
+struct authenticated(default_key, address_discrimination, no_extra_discrimination) ConstEval {
+ consteval ConstEval() {}
+ virtual void f();
+};
+
+// clang used to bail out with error message "could not emit constant value abstractly".
+ConstEval ce;
+
+struct ConstEvalDerived : public ConstEval {
+public:
+ consteval ConstEvalDerived() {}
+};
+
+// clang used to emit an undef initializer.
+ConstEvalDerived ced;
+
template <typename T>
struct SubClass : T {
virtual void g();
diff --git a/clang/test/CodeGenCXX/scoped-enums-debug-info.cpp b/clang/test/CodeGenCXX/scoped-enums-debug-info.cpp
deleted file mode 100644
index 131e31b..0000000
--- a/clang/test/CodeGenCXX/scoped-enums-debug-info.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-// RUN: %clang_cc1 -std=c++11 -emit-llvm -debug-info-kind=limited -o - %s | FileCheck %s
-// Test that we are emitting debug info and base types for scoped enums.
-
-// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "Color"
-// CHECK-SAME: baseType: ![[INT:[0-9]+]]
-// CHECK: ![[INT]] = !DIBasicType(name: "int"
-enum class Color { gray };
-
-void f(Color);
-void g() {
- f(Color::gray);
-}
-
-// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "Colour"
-// CHECK-SAME: baseType: ![[INT]]
-enum struct Colour { grey };
-
-void h(Colour);
-void i() {
- h(Colour::grey);
-}
-
-// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "Couleur"
-// CHECK-SAME: baseType: ![[UCHAR:[0-9]+]]
-// CHECK: ![[UCHAR]] = !DIBasicType(name: "unsigned char"
-enum class Couleur : unsigned char { gris };
-
-void j(Couleur);
-void k() {
- j(Couleur::gris);
-}
diff --git a/clang/test/CodeGenCXX/sret_cast_with_nonzero_alloca_as.cpp b/clang/test/CodeGenCXX/sret_cast_with_nonzero_alloca_as.cpp
index 320c712..a1a6ada 100644
--- a/clang/test/CodeGenCXX/sret_cast_with_nonzero_alloca_as.cpp
+++ b/clang/test/CodeGenCXX/sret_cast_with_nonzero_alloca_as.cpp
@@ -10,16 +10,15 @@ struct X { int z[17]; };
// CHECK-NEXT: [[Y_ADDR:%.*]] = alloca i8, align 1, addrspace(5)
// CHECK-NEXT: [[X_ADDR_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[X_ADDR]] to ptr
// CHECK-NEXT: [[Y_ADDR_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[Y_ADDR]] to ptr
+// CHECK-NEXT: [[AGG_RESULT_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[AGG_RESULT]] to ptr
// CHECK-NEXT: store i8 [[X]], ptr [[X_ADDR_ASCAST]], align 1
// CHECK-NEXT: store i8 [[Y]], ptr [[Y_ADDR_ASCAST]], align 1
// CHECK-NEXT: [[TMP0:%.*]] = load i8, ptr [[X_ADDR_ASCAST]], align 1
-// CHECK-NEXT: [[AGG_RESULT_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[AGG_RESULT]] to ptr
// CHECK-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i8, ptr [[AGG_RESULT_ASCAST]], i64 1
// CHECK-NEXT: store i8 [[TMP0]], ptr [[ADD_PTR]], align 1
// CHECK-NEXT: [[TMP1:%.*]] = load i8, ptr [[Y_ADDR_ASCAST]], align 1
-// CHECK-NEXT: [[AGG_RESULT_ASCAST1:%.*]] = addrspacecast ptr addrspace(5) [[AGG_RESULT]] to ptr
-// CHECK-NEXT: [[ADD_PTR2:%.*]] = getelementptr inbounds i8, ptr [[AGG_RESULT_ASCAST1]], i64 2
-// CHECK-NEXT: store i8 [[TMP1]], ptr [[ADD_PTR2]], align 1
+// CHECK-NEXT: [[ADD_PTR1:%.*]] = getelementptr inbounds i8, ptr [[AGG_RESULT_ASCAST]], i64 2
+// CHECK-NEXT: store i8 [[TMP1]], ptr [[ADD_PTR1]], align 2
// CHECK-NEXT: ret void
//
X foo(char x, char y) {
diff --git a/clang/test/CodeGenCXX/standalone-debug-attribute.cpp b/clang/test/CodeGenCXX/standalone-debug-attribute.cpp
deleted file mode 100644
index a814e6f..0000000
--- a/clang/test/CodeGenCXX/standalone-debug-attribute.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-// RUN: %clang_cc1 -DSETATTR=0 -triple x86_64-unknown-linux-gnu -emit-llvm -debug-info-kind=constructor %s -o - | FileCheck %s --check-prefix=DEBUG
-// RUN: %clang_cc1 -DSETATTR=1 -triple x86_64-unknown-linux-gnu -emit-llvm -debug-info-kind=constructor %s -o - | FileCheck %s --check-prefix=WITHATTR
-// Use -debug-info-kind=constructor because it includes all the optimizations.
-
-#if SETATTR
-#define STANDALONEDEBUGATTR __attribute__((standalone_debug))
-#else
-#define STANDALONEDEBUGATTR
-#endif
-
-struct STANDALONEDEBUGATTR StructWithConstructor {
- StructWithConstructor() {}
-};
-void f(StructWithConstructor s) {}
-// DEBUG: !DICompositeType({{.*}}name: "StructWithConstructor"
-// DEBUG-SAME: flags: {{.*}}DIFlagFwdDecl
-// WITHATTR: !DICompositeType({{.*}}name: "StructWithConstructor"
-// WITHATTR-NOT: DIFlagFwdDecl
-
-union STANDALONEDEBUGATTR UnionWithConstructor {
- UnionWithConstructor() {}
-};
-void f(UnionWithConstructor u) {}
-// DEBUG: !DICompositeType({{.*}}name: "UnionWithConstructor"
-// DEBUG-SAME: flags: {{.*}}DIFlagFwdDecl
-// WITHATTR: !DICompositeType({{.*}}name: "UnionWithConstructor"
-// WITHATTR-NOT: DIFlagFwdDecl
-
-template <typename T> struct ExternTemplate {
- ExternTemplate() {}
- T x;
-};
-extern template struct STANDALONEDEBUGATTR ExternTemplate<int>;
-void f(ExternTemplate<int> s) {}
-// DEBUG: !DICompositeType({{.*}}name: "ExternTemplate<int>"
-// DEBUG-SAME: flags: {{.*}}DIFlagFwdDecl
-// WITHATTR: !DICompositeType({{.*}}name: "ExternTemplate<int>"
-// WITHATTR-NOT: DIFlagFwdDecl
-
-struct STANDALONEDEBUGATTR CompleteTypeRequired {};
-void f(CompleteTypeRequired &s) {}
-// DEBUG: !DICompositeType({{.*}}name: "CompleteTypeRequired"
-// DEBUG-SAME: flags: {{.*}}DIFlagFwdDecl
-// WITHATTR: !DICompositeType({{.*}}name: "CompleteTypeRequired"
-// WITHATTR-NOT: DIFlagFwdDecl
-
-struct STANDALONEDEBUGATTR Redecl;
-struct Redecl {};
-void f(Redecl &s) {}
-// DEBUG: !DICompositeType({{.*}}name: "Redecl"
-// DEBUG-SAME: flags: {{.*}}DIFlagFwdDecl
-// WITHATTR: !DICompositeType({{.*}}name: "Redecl"
-// WITHATTR-NOT: DIFlagFwdDecl
-
diff --git a/clang/test/CodeGenCXX/template-alias.cpp b/clang/test/CodeGenCXX/template-alias.cpp
deleted file mode 100644
index 256ed69..0000000
--- a/clang/test/CodeGenCXX/template-alias.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-unk-unk -o - -emit-llvm -debug-info-kind=standalone -gtemplate-alias %s -gsimple-template-names=simple \
-// RUN: | FileCheck %s --check-prefixes=ALIAS-SIMPLE,ALIAS-ALL
-
-// RUN: %clang_cc1 -triple x86_64-unk-unk -o - -emit-llvm -debug-info-kind=standalone -gtemplate-alias %s -gsimple-template-names=mangled \
-// RUN: | FileCheck %s --check-prefixes=ALIAS-MANGLED,ALIAS-ALL
-
-// RUN: %clang_cc1 -triple x86_64-unk-unk -o - -emit-llvm -debug-info-kind=standalone -gtemplate-alias %s \
-// RUN: | FileCheck %s --check-prefixes=ALIAS-FULL,ALIAS-ALL
-
-// RUN: %clang_cc1 -triple x86_64-unk-unk -o - -emit-llvm -debug-info-kind=standalone %s \
-// RUN: | FileCheck %s --check-prefixes=TYPEDEF
-
-
-//// Check that -gtemplate-alias causes DW_TAG_template_alias emission for
-//// template aliases, and that respects gsimple-template-names.
-////
-//// Test type and value template parameters.
-
-template<typename Y, int Z>
-struct X {
- Y m1 = Z;
-};
-
-template<typename B, int C>
-using A = X<B, C>;
-
-A<int, 5> a;
-
-
-// ALIAS-SIMPLE: !DIDerivedType(tag: DW_TAG_template_alias, name: "A", file: ![[#]], line: [[#]], baseType: ![[baseType:[0-9]+]], extraData: ![[extraData:[0-9]+]])
-// ALIAS-SIMPLE: ![[baseType]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "X",
-
-// FIXME: Mangled name is wrong (not a regression).
-// ALIAS-MANGLED: !DIDerivedType(tag: DW_TAG_template_alias, name: "A<int, 5>", file: ![[#]], line: [[#]], baseType: ![[baseType:[0-9]+]], extraData: ![[extraData:[0-9]+]])
-// ALIAS-MANGLED: ![[baseType]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_STN|X|<int, 5>",
-
-// ALIAS-FULL: !DIDerivedType(tag: DW_TAG_template_alias, name: "A<int, 5>", file: ![[#]], line: [[#]], baseType: ![[baseType:[0-9]+]], extraData: ![[extraData:[0-9]+]])
-// ALIAS-FULL: ![[baseType]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "X<int, 5>",
-
-// ALIAS-ALL: ![[int:[0-9]+]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-// ALIAS-ALL: ![[extraData]] = !{![[B:[0-9]+]], ![[C:[0-9]+]]}
-// ALIAS-ALL: ![[B]] = !DITemplateTypeParameter(name: "B", type: ![[int]])
-// ALIAS-ALL: ![[C]] = !DITemplateValueParameter(name: "C", type: ![[int]], value: i32 5)
-
-// TYPEDEF: !DIDerivedType(tag: DW_TAG_typedef, name: "A<int, 5>", file: ![[#]], line: [[#]], baseType: ![[baseType:[0-9]+]])
-// TYPEDEF: ![[baseType]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "X<int, 5>",
-// TYPEDEF: ![[int:[0-9]+]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
diff --git a/clang/test/CodeGenCXX/trivial_abi_debuginfo.cpp b/clang/test/CodeGenCXX/trivial_abi_debuginfo.cpp
deleted file mode 100644
index 3e48614..0000000
--- a/clang/test/CodeGenCXX/trivial_abi_debuginfo.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --functions "makeTrivial" --version 2
-// RUN: %clang_cc1 -debug-info-kind=limited -triple x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
-
-struct __attribute__((trivial_abi)) Trivial {
- ~Trivial() {}
- int ivar = 10;
-};
-
-// The dbg.declare should be on %retval, not on %nrvo.
-
-// CHECK-LABEL: define dso_local i32 @_Z11makeTrivialv
-// CHECK-SAME: () #[[ATTR0:[0-9]+]] !dbg [[DBG5:![0-9]+]] {
-// CHECK-NEXT: entry:
-// CHECK-NEXT: [[RETVAL:%.*]] = alloca [[STRUCT_TRIVIAL:%.*]], align 4
-// CHECK-NEXT: [[NRVO:%.*]] = alloca i1, align 1
-// CHECK-NEXT: store i1 false, ptr [[NRVO]], align 1, !dbg [[DBG18:![0-9]+]]
-// CHECK-NEXT: #dbg_declare(ptr [[RETVAL]], [[META19:![0-9]+]], !DIExpression(), [[META20:![0-9]+]])
-// CHECK-NEXT: call void @_ZN7TrivialC1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[RETVAL]]) #[[ATTR1:[0-9]+]], !dbg [[META20]]
-// CHECK-NEXT: store i1 true, ptr [[NRVO]], align 1, !dbg [[DBG21:![0-9]+]]
-// CHECK-NEXT: [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1, !dbg [[DBG22:![0-9]+]]
-// CHECK-NEXT: br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]], !dbg [[DBG22]]
-// CHECK: nrvo.unused:
-// CHECK-NEXT: call void @_ZN7TrivialD1Ev(ptr noundef nonnull align 4 dereferenceable(4) [[RETVAL]]) #[[ATTR1]], !dbg [[DBG22]]
-// CHECK-NEXT: br label [[NRVO_SKIPDTOR]], !dbg [[DBG22]]
-// CHECK: nrvo.skipdtor:
-// CHECK-NEXT: [[COERCE_DIVE:%.*]] = getelementptr inbounds nuw [[STRUCT_TRIVIAL]], ptr [[RETVAL]], i32 0, i32 0, !dbg [[DBG22]]
-// CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[COERCE_DIVE]], align 4, !dbg [[DBG22]]
-// CHECK-NEXT: ret i32 [[TMP0]], !dbg [[DBG22]]
-//
-Trivial makeTrivial() {
- Trivial ret_val;
- return ret_val;
-}
diff --git a/clang/test/CodeGenCXX/ubsan-check-debuglocs.cpp b/clang/test/CodeGenCXX/ubsan-check-debuglocs.cpp
deleted file mode 100644
index 81db5c4..0000000
--- a/clang/test/CodeGenCXX/ubsan-check-debuglocs.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited \
-// RUN: -fsanitize=null %s -o - | FileCheck %s
-
-// Check that santizer check calls have a !dbg location.
-// CHECK: define {{.*}}acquire{{.*}} !dbg
-// CHECK-NOT: define
-// CHECK: call void {{.*}}@__ubsan_handle_type_mismatch_v1
-// CHECK-SAME: !dbg
-
-struct SourceLocation {
- SourceLocation acquire() { return {}; };
-};
-extern "C" void __ubsan_handle_type_mismatch_v1(SourceLocation *Loc);
-static void handleTypeMismatchImpl(SourceLocation *Loc) { Loc->acquire(); }
-void __ubsan_handle_type_mismatch_v1(SourceLocation *Loc) {
- handleTypeMismatchImpl(Loc);
-}
diff --git a/clang/test/CodeGenCXX/variadic-template-alias.cpp b/clang/test/CodeGenCXX/variadic-template-alias.cpp
deleted file mode 100644
index b4340d6..0000000
--- a/clang/test/CodeGenCXX/variadic-template-alias.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-unk-unk -o - -emit-llvm -debug-info-kind=standalone -gtemplate-alias %s -gsimple-template-names=simple \
-// RUN: | FileCheck %s
-
-//// Check that -gtemplate-alias causes DW_TAG_template_alias emission for
-//// variadic template aliases. See template-alias.cpp for more template alias
-//// tests.
-
-template<typename Y, int Z>
-struct X {
- Y m1 = Z;
-};
-
-template<int I, typename... Ts>
-using A = X<Ts..., I>;
-
-A<5, int> a;
-
-// CHECK: !DIDerivedType(tag: DW_TAG_template_alias, name: "A", file: ![[#]], line: [[#]], baseType: ![[baseType:[0-9]+]], extraData: ![[extraData:[0-9]+]])
-// CHECK: ![[baseType]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "X",
-// CHECK: ![[int:[0-9]+]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-// CHECK: ![[extraData]] = !{![[I:[0-9]+]], ![[Ts:[0-9]+]]}
-// CHECK: ![[I]] = !DITemplateValueParameter(name: "I", type: ![[int]], value: i32 5)
-// CHECK: ![[Ts]] = !DITemplateValueParameter(tag: DW_TAG_GNU_template_parameter_pack, name: "Ts", value: ![[types:[0-9]+]])
-// CHECK: ![[types]] = !{![[int_template_param:[0-9]+]]}
-// CHECK: ![[int_template_param]] = !DITemplateTypeParameter(type: ![[int]])
diff --git a/clang/test/CodeGenCXX/vtable-debug-info-inheritance-diamond.cpp b/clang/test/CodeGenCXX/vtable-debug-info-inheritance-diamond.cpp
deleted file mode 100644
index 5ed1353..0000000
--- a/clang/test/CodeGenCXX/vtable-debug-info-inheritance-diamond.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-// REQUIRES: target={{x86_64.*-linux.*}}
-
-// Diamond inheritance case:
-// For CBase, CLeft, CRight and CDerived we check:
-// - Generation of their vtables (including attributes).
-// - Generation of their '_vtable$' data members:
-// * Correct scope and attributes
-
-namespace NSP {
- struct CBase {
- int B = 0;
- virtual char fooBase() { return 'B'; }
- };
-}
-
-namespace NSP_1 {
- struct CLeft : NSP::CBase {
- int M1 = 1;
- char fooBase() override { return 'O'; };
- virtual int fooLeft() { return 1; }
- };
-}
-
-namespace NSP_2 {
- struct CRight : NSP::CBase {
- int M2 = 2;
- char fooBase() override { return 'T'; };
- virtual int fooRight() { return 2; }
- };
-}
-
-struct CDerived : NSP_1::CLeft, NSP_2::CRight {
- int D = 3;
- char fooBase() override { return 'D'; };
- int fooDerived() { return 3; };
-};
-
-int main() {
- NSP::CBase Base;
- NSP_1::CLeft Left;
- NSP_2::CRight Right;
- CDerived Derived;
-
- return 0;
-}
-
-// RUN: %clang --target=x86_64-linux -Xclang -disable-O0-optnone -Xclang -disable-llvm-passes -emit-llvm -S -g %s -o - | FileCheck %s
-
-// CHECK: $_ZTVN3NSP5CBaseE = comdat any
-// CHECK: $_ZTVN5NSP_15CLeftE = comdat any
-// CHECK: $_ZTVN5NSP_26CRightE = comdat any
-// CHECK: $_ZTV8CDerived = comdat any
-
-// CHECK: @_ZTVN3NSP5CBaseE = linkonce_odr {{dso_local|hidden}} unnamed_addr constant {{.*}}, comdat, align 8, !dbg [[BASE_VTABLE_VAR:![0-9]*]]
-// CHECK: @_ZTVN5NSP_15CLeftE = linkonce_odr {{dso_local|hidden}} unnamed_addr constant {{.*}}, comdat, align 8, !dbg [[LEFT_VTABLE_VAR:![0-9]*]]
-// CHECK: @_ZTVN5NSP_26CRightE = linkonce_odr {{dso_local|hidden}} unnamed_addr constant {{.*}}, comdat, align 8, !dbg [[RIGHT_VTABLE_VAR:![0-9]*]]
-// CHECK: @_ZTV8CDerived = linkonce_odr {{dso_local|hidden}} unnamed_addr constant {{.*}}, comdat, align 8, !dbg [[DERIVED_VTABLE_VAR:![0-9]*]]
-
-// CHECK: [[BASE_VTABLE_VAR]] = !DIGlobalVariableExpression(var: [[BASE_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", linkageName: "_ZTVN3NSP5CBaseE"
-
-// CHECK: [[LEFT_VTABLE_VAR]] = !DIGlobalVariableExpression(var: [[LEFT_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[LEFT_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", linkageName: "_ZTVN5NSP_15CLeftE"
-
-// CHECK: [[TYPE:![0-9]*]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
-
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: [[LEFT:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
-
-// CHECK: [[LEFT]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "CLeft"
-
-// CHECK: [[BASE:![0-9]*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "CBase"
-
-// CHECK: [[RIGHT_VTABLE_VAR]] = !DIGlobalVariableExpression(var: [[RIGHT_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[RIGHT_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", linkageName: "_ZTVN5NSP_26CRightE"
-
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: [[RIGHT:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
-
-// CHECK: [[RIGHT]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "CRight"
-
-// CHECK: [[DERIVED_VTABLE_VAR]] = !DIGlobalVariableExpression(var: [[DERIVED_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", linkageName: "_ZTV8CDerived"
-
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: [[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
-
-// CHECK: [[DERIVED]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "CDerived"
-
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: [[BASE]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
diff --git a/clang/test/CodeGenCXX/vtable-debug-info-inheritance-multiple.cpp b/clang/test/CodeGenCXX/vtable-debug-info-inheritance-multiple.cpp
deleted file mode 100644
index 23973a3..0000000
--- a/clang/test/CodeGenCXX/vtable-debug-info-inheritance-multiple.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-// REQUIRES: target={{x86_64.*-linux.*}}
-
-// Multiple inheritance case:
-// For CBaseOne, CBaseTwo and CDerived we check:
-// - Generation of their vtables (including attributes).
-// - Generation of their '_vtable$' data members:
-// * Correct scope and attributes
-
-namespace NSP_1 {
- struct CBaseOne {
- int B1 = 1;
- virtual int one() { return 1; }
- virtual int two() { return 2; }
- virtual int three() { return 3; }
- };
-}
-
-namespace NSP_2 {
- struct CBaseTwo {
- int B2 = 1;
- virtual int four() { return 4; }
- virtual int five() { return 5; }
- virtual int six() { return 6; }
- };
-}
-
-struct CDerived : NSP_1::CBaseOne, NSP_2::CBaseTwo {
- int D = 1;
- int two() override { return 22; };
- int six() override { return 66; }
-};
-
-int main() {
- NSP_1::CBaseOne BaseOne;
- NSP_2::CBaseTwo BaseTwo;
- CDerived Derived;
-
- return 0;
-}
-
-// RUN: %clang --target=x86_64-linux -Xclang -disable-O0-optnone -Xclang -disable-llvm-passes -emit-llvm -S -g %s -o - | FileCheck %s
-
-// CHECK: $_ZTVN5NSP_18CBaseOneE = comdat any
-// CHECK: $_ZTVN5NSP_28CBaseTwoE = comdat any
-// CHECK: $_ZTV8CDerived = comdat any
-
-// CHECK: @_ZTVN5NSP_18CBaseOneE = linkonce_odr {{dso_local|hidden}} unnamed_addr constant {{.*}}, comdat, align 8, !dbg [[BASE_ONE_VTABLE_VAR:![0-9]*]]
-// CHECK: @_ZTVN5NSP_28CBaseTwoE = linkonce_odr {{dso_local|hidden}} unnamed_addr constant {{.*}}, comdat, align 8, !dbg [[BASE_TWO_VTABLE_VAR:![0-9]*]]
-// CHECK: @_ZTV8CDerived = linkonce_odr {{dso_local|hidden}} unnamed_addr constant {{.*}}, comdat, align 8, !dbg [[DERIVED_VTABLE_VAR:![0-9]*]]
-
-// CHECK: [[BASE_ONE_VTABLE_VAR]] = !DIGlobalVariableExpression(var: [[BASE_ONE_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[BASE_ONE_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", linkageName: "_ZTVN5NSP_18CBaseOneE"
-
-// CHECK: [[BASE_TWO_VTABLE_VAR]] = !DIGlobalVariableExpression(var: [[BASE_TWO_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[BASE_TWO_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", linkageName: "_ZTVN5NSP_28CBaseTwoE"
-
-// CHECK: [[TYPE:![0-9]*]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
-
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: [[BASE_TWO:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
-
-// check: [[BASE_TWO]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "CBaseTwo"
-
-// CHECK: [[DERIVED_VTABLE_VAR]] = !DIGlobalVariableExpression(var: [[DERIVED_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", linkageName: "_ZTV8CDerived"
-
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: [[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
-
-// CHECK: [[DERIVED]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "CDerived"
-
-// CHECK: [[BASE_ONE:![0-9]*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "CBaseOne"
-
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: [[BASE_ONE]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
diff --git a/clang/test/CodeGenCXX/vtable-debug-info-inheritance-simple-main.cpp b/clang/test/CodeGenCXX/vtable-debug-info-inheritance-simple-main.cpp
deleted file mode 100644
index d64e711..0000000
--- a/clang/test/CodeGenCXX/vtable-debug-info-inheritance-simple-main.cpp
+++ /dev/null
@@ -1,152 +0,0 @@
-// REQUIRES: target={{x86_64.*-linux.*}}
-
-// Simple inheritance case:
-// For CBase and CDerived we check:
-// - Generation of their vtables (including attributes).
-// - Generation of their '_vtable$' data members:
-// * Correct scope and attributes
-
-#ifdef BASE_CODE
-#define BASE_DEF
-#endif
-
-#ifdef DERIVED_CODE
-#define BASE_DEF
-#define DERIVED_DEF
-#endif
-
-#ifdef MAIN_CODE
-#define BASE_DEF
-#define DERIVED_DEF
-#endif
-
-#ifdef BASE_DEF
-namespace NSP {
- struct CBase {
- unsigned B = 1;
- virtual void zero();
- virtual int one();
- virtual int two();
- virtual int three();
- };
-}
-extern void fooBase();
-#endif
-
-#ifdef BASE_CODE
-void NSP::CBase::zero() {}
-int NSP::CBase::one() { return 1; }
-int NSP::CBase::two() { return 2; };
-int NSP::CBase::three() { return 3; }
-
-#ifdef SYMBOL_AT_FILE_SCOPE
-static NSP::CBase Base;
-#else
-void fooBase() {
- NSP::CBase Base;
-}
-#endif
-#endif
-
-#ifdef DERIVED_DEF
-struct CDerived : NSP::CBase {
- unsigned D = 2;
- void zero() override;
- int two() override;
- int three() override;
-};
-extern void fooDerived();
-#endif
-
-#ifdef DERIVED_CODE
-void CDerived::zero() {}
-int CDerived::two() { return 22; };
-int CDerived::three() { return 33; }
-
-#ifdef SYMBOL_AT_FILE_SCOPE
-static CDerived Derived;
-#else
-void fooDerived() {
- CDerived Derived;
-}
-#endif
-#endif
-
-#ifdef MAIN_CODE
-int main() {
-#ifdef SYMBOL_AT_FILE_SCOPE
- NSP::CBase Base;
- CDerived Derived;
-#else
- fooBase();
- fooDerived();
-#endif
-
- return 0;
-}
-#endif
-
-// RUN: %clang --target=x86_64-linux -Xclang -disable-O0-optnone -Xclang -disable-llvm-passes -emit-llvm -c -g %s -o %t.simple-base.bc -DBASE_CODE
-// RUN: %clang --target=x86_64-linux -Xclang -disable-O0-optnone -Xclang -disable-llvm-passes -emit-llvm -c -g %s -o %t.simple-derived.bc -DDERIVED_CODE
-// RUN: %clang --target=x86_64-linux -Xclang -disable-O0-optnone -Xclang -disable-llvm-passes -emit-llvm -c -g %s -o %t.simple-main.bc -DMAIN_CODE
-// RUN: llvm-link %t.simple-base.bc %t.simple-derived.bc %t.simple-main.bc -S -o %t.simple-combined.ll
-// RUN: FileCheck --input-file=%t.simple-combined.ll -check-prefix=CHECK-ONE %s
-
-// RUN: %clang --target=x86_64-linux -Xclang -disable-O0-optnone -Xclang -disable-llvm-passes -emit-llvm -c -g -flto %s -o %t.simple-base.bc -DBASE_CODE
-// RUN: %clang --target=x86_64-linux -Xclang -disable-O0-optnone -Xclang -disable-llvm-passes -emit-llvm -c -g -flto %s -o %t.simple-derived.bc -DDERIVED_CODE
-// RUN: %clang --target=x86_64-linux -Xclang -disable-O0-optnone -Xclang -disable-llvm-passes -emit-llvm -c -g -flto %s -o %t.simple-main.bc -DMAIN_CODE
-// RUN: llvm-link %t.simple-base.bc %t.simple-derived.bc %t.simple-main.bc -S -o %t.simple-combined.ll
-// RUN: FileCheck --input-file=%t.simple-combined.ll -check-prefix=CHECK-ONE %s
-
-// RUN: %clang --target=x86_64-linux -Xclang -disable-O0-optnone -Xclang -disable-llvm-passes -emit-llvm -c -g %s -o %t.simple-base.bc -DBASE_CODE -DSYMBOL_AT_FILE_SCOPE
-// RUN: %clang --target=x86_64-linux -Xclang -disable-O0-optnone -Xclang -disable-llvm-passes -emit-llvm -c -g %s -o %t.simple-derived.bc -DDERIVED_CODE -DSYMBOL_AT_FILE_SCOPE
-// RUN: %clang --target=x86_64-linux -Xclang -disable-O0-optnone -Xclang -disable-llvm-passes -emit-llvm -c -g %s -o %t.simple-main.bc -DMAIN_CODE -DSYMBOL_AT_FILE_SCOPE
-// RUN: llvm-link %t.simple-base.bc %t.simple-derived.bc %t.simple-main.bc -S -o %t.simple-combined.ll
-// RUN: FileCheck --input-file=%t.simple-combined.ll -check-prefix=CHECK-TWO %s
-
-// RUN: %clang --target=x86_64-linux -Xclang -disable-O0-optnone -Xclang -disable-llvm-passes -emit-llvm -c -g -flto %s -o %t.simple-base.bc -DBASE_CODE -DSYMBOL_AT_FILE_SCOPE
-// RUN: %clang --target=x86_64-linux -Xclang -disable-O0-optnone -Xclang -disable-llvm-passes -emit-llvm -c -g -flto %s -o %t.simple-derived.bc -DDERIVED_CODE -DSYMBOL_AT_FILE_SCOPE
-// RUN: %clang --target=x86_64-linux -Xclang -disable-O0-optnone -Xclang -disable-llvm-passes -emit-llvm -c -g -flto %s -o %t.simple-main.bc -DMAIN_CODE -DSYMBOL_AT_FILE_SCOPE
-// RUN: llvm-link %t.simple-base.bc %t.simple-derived.bc %t.simple-main.bc -S -o %t.simple-combined.ll
-// RUN: FileCheck --input-file=%t.simple-combined.ll -check-prefix=CHECK-TWO %s
-
-// CHECK-ONE: ${{_ZN3NSP5CBaseC2Ev|_ZN8CDerivedC2Ev}} = comdat any
-// CHECK-ONE: ${{_ZN3NSP5CBaseC2Ev|_ZN8CDerivedC2Ev}} = comdat any
-
-// CHECK-ONE: @_ZTV8CDerived = {{dso_local|hidden}} unnamed_addr constant {{.*}}, align 8, !dbg [[DERIVED_VTABLE_VAR:![0-9]*]]
-// CHECK-ONE: @_ZTVN3NSP5CBaseE = {{dso_local|hidden}} unnamed_addr constant {{.*}}, align 8, !dbg [[BASE_VTABLE_VAR:![0-9]*]]
-
-// CHECK-ONE: [[DERIVED_VTABLE_VAR]] = !DIGlobalVariableExpression(var: [[DERIVED_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-ONE-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", linkageName: "_ZTV8CDerived"
-
-// CHECK-ONE: [[TYPE:![0-9]*]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
-
-// CHECK-ONE: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: [[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
-// CHECK-ONE: [[DERIVED]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "CDerived"
-
-// CHECK-ONE: [[BASE_VTABLE_VAR]] = !DIGlobalVariableExpression(var: [[BASE_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-ONE-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", linkageName: "_ZTVN3NSP5CBaseE"
-
-// CHECK-ONE: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: [[BASE:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
-// CHECK-ONE: [[BASE]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "CBase"
-
-// CHECK-TWO: ${{_ZN3NSP5CBaseC2Ev|_ZN8CDerivedC2Ev}} = comdat any
-// CHECK-TWO: ${{_ZN3NSP5CBaseC2Ev|_ZN8CDerivedC2Ev}} = comdat any
-
-// CHECK-TWO: @_ZTVN3NSP5CBaseE = {{dso_local|hidden}} unnamed_addr constant {{.*}}, align 8, !dbg [[BASE_VTABLE_VAR:![0-9]*]]
-// CHECK-TWO: @_ZTV8CDerived = {{dso_local|hidden}} unnamed_addr constant {{.*}}, align 8, !dbg [[DERIVED_VTABLE_VAR:![0-9]*]]
-
-// CHECK-TWO: [[BASE_VTABLE_VAR]] = !DIGlobalVariableExpression(var: [[BASE_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-TWO-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", linkageName: "_ZTVN3NSP5CBaseE"
-
-// CHECK-TWO: [[TYPE:![0-9]*]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
-
-// CHECK-TWO: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: [[BASE:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
-// CHECK-TWO: [[BASE]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "CBase"
-
-// CHECK-TWO: [[DERIVED_VTABLE_VAR]] = !DIGlobalVariableExpression(var: [[DERIVED_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-TWO-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", linkageName: "_ZTV8CDerived"
-
-// CHECK-TWO: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: [[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
-
-// CHECK-TWO: [[DERIVED]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "CDerived"
diff --git a/clang/test/CodeGenCXX/vtable-debug-info-inheritance-simple.cpp b/clang/test/CodeGenCXX/vtable-debug-info-inheritance-simple.cpp
deleted file mode 100644
index b24ece1..0000000
--- a/clang/test/CodeGenCXX/vtable-debug-info-inheritance-simple.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// Simple inheritance case:
-// For CBase and CDerived we check:
-// - Generation of their vtables (including attributes).
-// - Generation of their '_vtable$' data members:
-// * Correct scope and attributes
-
-namespace NSP {
- struct CBase {
- unsigned B = 1;
- virtual void zero() {}
- virtual int one() { return 1; }
- virtual int two() { return 2; }
- virtual int three() { return 3; }
- };
-}
-
-struct CDerived : NSP::CBase {
- unsigned D = 2;
- void zero() override {}
- int two() override { return 22; };
- int three() override { return 33; }
-};
-
-int main() {
- NSP::CBase Base;
- CDerived Derived;
-
- return 0;
-}
-
-// RUN: %clang_cc1 -triple x86_64-linux -emit-llvm -mrelocation-model pic -pic-is-pie -debug-info-kind=limited -dwarf-version=5 -disable-O0-optnone -disable-llvm-passes %s -o - | FileCheck %s
-// RUN: %clang_cc1 -triple x86_64-windows-gnu -emit-llvm -mrelocation-model pic -pic-is-pie -debug-info-kind=limited -dwarf-version=5 -disable-O0-optnone -disable-llvm-passes %s -o - | FileCheck %s --check-prefix=COFF
-
-// CHECK: $_ZTVN3NSP5CBaseE = comdat any
-// CHECK: $_ZTV8CDerived = comdat any
-
-// CHECK: @_ZTVN3NSP5CBaseE = linkonce_odr {{dso_local|hidden}} unnamed_addr constant {{.*}}, comdat, align 8, !dbg [[BASE_VTABLE_VAR:![0-9]*]]
-// CHECK: @_ZTV8CDerived = linkonce_odr {{dso_local|hidden}} unnamed_addr constant {{.*}}, comdat, align 8, !dbg [[DERIVED_VTABLE_VAR:![0-9]*]]
-// COFF: @_ZTVN3NSP5CBaseE = linkonce_odr {{dso_local|hidden}} unnamed_addr constant {{.*}}, comdat, align 8
-// COFF-NOT: !dbg
-// COFF-SAME: {{$}}
-// COFF: @_ZTV8CDerived = linkonce_odr {{dso_local|hidden}} unnamed_addr constant {{.*}}, comdat, align 8
-// COFF-NOT: !dbg
-// COFF-SAME: {{$}}
-
-// CHECK: [[BASE_VTABLE_VAR]] = !DIGlobalVariableExpression(var: [[BASE_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", linkageName: "_ZTVN3NSP5CBaseE"
-
-// CHECK: [[DERIVED_VTABLE_VAR]] = !DIGlobalVariableExpression(var: [[DERIVED_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", linkageName: "_ZTV8CDerived"
-
-// CHECK: [[TYPE:![0-9]*]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
-
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: [[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
-
-// CHECK: [[DERIVED]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "CDerived"
-
-// CHECK: [[BASE:![0-9]*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "CBase"
-
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: [[BASE]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
diff --git a/clang/test/CodeGenCXX/vtable-debug-info-inheritance-virtual.cpp b/clang/test/CodeGenCXX/vtable-debug-info-inheritance-virtual.cpp
deleted file mode 100644
index b01f156..0000000
--- a/clang/test/CodeGenCXX/vtable-debug-info-inheritance-virtual.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-// REQUIRES: target={{x86_64.*-linux.*}}
-
-// Virtual inheritance case:
-// For CBase, CLeft, CRight and CDerived we check:
-// - Generation of their vtables (including attributes).
-// - Generation of their '_vtable$' data members:
-// * Correct scope and attributes
-
-namespace NSP {
- struct CBase {
- int B = 0;
- virtual char fooBase() { return 'B'; }
- };
-}
-
-namespace NSP_1 {
- struct CLeft : virtual NSP::CBase {
- int M1 = 1;
- char fooBase() override { return 'O'; };
- virtual int fooLeft() { return 1; }
- };
-}
-
-namespace NSP_2 {
- struct CRight : virtual NSP::CBase {
- int M2 = 2;
- char fooBase() override { return 'T'; };
- virtual int fooRight() { return 2; }
- };
-}
-
-struct CDerived : NSP_1::CLeft, NSP_2::CRight {
- int D = 3;
- char fooBase() override { return 'D'; };
- int fooDerived() { return 3; };
-};
-
-int main() {
- NSP::CBase Base;
- NSP_1::CLeft Left;
- NSP_2::CRight Right;
- CDerived Derived;
-
- return 0;
-}
-
-// RUN: %clang --target=x86_64-linux -Xclang -disable-O0-optnone -Xclang -disable-llvm-passes -emit-llvm -S -g %s -o - | FileCheck %s
-
-// CHECK: $_ZTVN3NSP5CBaseE = comdat any
-// CHECK: $_ZTVN5NSP_15CLeftE = comdat any
-// CHECK: $_ZTVN5NSP_26CRightE = comdat any
-// CHECK: $_ZTV8CDerived = comdat any
-
-// CHECK: @_ZTVN3NSP5CBaseE = linkonce_odr {{dso_local|hidden}} unnamed_addr constant {{.*}}, comdat, align 8, !dbg [[BASE_VTABLE_VAR:![0-9]*]]
-// CHECK: @_ZTVN5NSP_15CLeftE = linkonce_odr {{dso_local|hidden}} unnamed_addr constant {{.*}}, comdat, align 8, !dbg [[LEFT_VTABLE_VAR:![0-9]*]]
-// CHECK: @_ZTVN5NSP_26CRightE = linkonce_odr {{dso_local|hidden}} unnamed_addr constant {{.*}}, comdat, align 8, !dbg [[RIGHT_VTABLE_VAR:![0-9]*]]
-// CHECK: @_ZTV8CDerived = linkonce_odr {{dso_local|hidden}} unnamed_addr constant {{.*}}, comdat, align 8, !dbg [[DERIVED_VTABLE_VAR:![0-9]*]]
-
-// CHECK: [[BASE_VTABLE_VAR]] = !DIGlobalVariableExpression(var: [[BASE_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", linkageName: "_ZTVN3NSP5CBaseE"
-
-// CHECK: [[LEFT_VTABLE_VAR]] = !DIGlobalVariableExpression(var: [[LEFT_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[LEFT_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", linkageName: "_ZTVN5NSP_15CLeftE"
-
-// CHECK: [[TYPE:![0-9]*]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
-
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: [[LEFT:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
-
-// CHECK: [[LEFT]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "CLeft"
-
-// CHECK: [[BASE:![0-9]*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "CBase"
-
-// CHECK: [[RIGHT_VTABLE_VAR]] = !DIGlobalVariableExpression(var: [[RIGHT_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[RIGHT_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", linkageName: "_ZTVN5NSP_26CRightE"
-
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: [[RIGHT:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
-
-// CHECK: [[RIGHT]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "CRight"
-
-// CHECK: [[DERIVED_VTABLE_VAR]] = !DIGlobalVariableExpression(var: [[DERIVED_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", linkageName: "_ZTV8CDerived"
-
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: [[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
-
-// CHECK: [[DERIVED]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "CDerived"
-
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: [[BASE]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
diff --git a/clang/test/CodeGenCXX/vtable-debug-info.cpp b/clang/test/CodeGenCXX/vtable-debug-info.cpp
deleted file mode 100644
index 932b440..0000000
--- a/clang/test/CodeGenCXX/vtable-debug-info.cpp
+++ /dev/null
@@ -1,318 +0,0 @@
-// RUN: %clang -emit-llvm -S -g %s -o /dev/null
-// XFAIL: target={{.*-windows-msvc}}
-
-// FIXME: This test crashes on *-pc-win32
-// for lack of debugging support on -integrated-as (MCCOFF).
-#ifdef _MSC_VER
-
-#error this test must xfail
-
-#else
-class foo {
-public:
-#define x(a) virtual void v ## a (void)
-x(1);
-x(2);
-x(3);
-x(4);
-x(5);
-x(6);
-x(7);
-x(8);
-x(9);
-x(10);
-x(11);
-x(12);
-x(13);
-x(14);
-x(15);
-x(16);
-x(17);
-x(18);
-x(19);
-x(20);
-x(21);
-x(22);
-x(23);
-x(24);
-x(25);
-x(26);
-x(27);
-x(28);
-x(29);
-x(30);
-x(31);
-x(32);
-x(33);
-x(34);
-x(35);
-x(36);
-x(37);
-x(38);
-x(39);
-x(40);
-x(41);
-x(42);
-x(43);
-x(44);
-x(45);
-x(46);
-x(47);
-x(48);
-x(49);
-x(50);
-x(51);
-x(52);
-x(53);
-x(54);
-x(55);
-x(56);
-x(57);
-x(58);
-x(59);
-x(60);
-x(61);
-x(62);
-x(63);
-x(64);
-x(65);
-x(66);
-x(67);
-x(68);
-x(69);
-x(70);
-x(71);
-x(72);
-x(73);
-x(74);
-x(75);
-x(76);
-x(77);
-x(78);
-x(79);
-x(80);
-x(81);
-x(82);
-x(83);
-x(84);
-x(85);
-x(86);
-x(87);
-x(88);
-x(89);
-x(90);
-x(91);
-x(92);
-x(93);
-x(94);
-x(95);
-x(96);
-x(97);
-x(98);
-x(99);
-x(100);
-x(101);
-x(102);
-x(103);
-x(104);
-x(105);
-x(106);
-x(107);
-x(108);
-x(109);
-x(110);
-x(111);
-x(112);
-x(113);
-x(114);
-x(115);
-x(116);
-x(117);
-x(118);
-x(119);
-x(120);
-x(121);
-x(122);
-x(123);
-x(124);
-x(125);
-x(126);
-x(127);
-x(128);
-x(129);
-x(130);
-x(131);
-x(132);
-x(133);
-x(134);
-x(135);
-x(136);
-x(137);
-x(138);
-x(139);
-x(140);
-x(141);
-x(142);
-x(143);
-x(144);
-x(145);
-x(146);
-x(147);
-x(148);
-x(149);
-x(150);
-x(151);
-x(152);
-x(153);
-x(154);
-x(155);
-x(156);
-x(157);
-x(158);
-x(159);
-x(160);
-x(161);
-x(162);
-x(163);
-x(164);
-x(165);
-x(166);
-x(167);
-x(168);
-x(169);
-x(170);
-x(171);
-x(172);
-x(173);
-x(174);
-x(175);
-x(176);
-x(177);
-x(178);
-x(179);
-x(180);
-x(181);
-x(182);
-x(183);
-x(184);
-x(185);
-x(186);
-x(187);
-x(188);
-x(189);
-x(190);
-x(191);
-x(192);
-x(193);
-x(194);
-x(195);
-x(196);
-x(197);
-x(198);
-x(199);
-x(200);
-x(201);
-x(202);
-x(203);
-x(204);
-x(205);
-x(206);
-x(207);
-x(208);
-x(209);
-x(210);
-x(211);
-x(212);
-x(213);
-x(214);
-x(215);
-x(216);
-x(217);
-x(218);
-x(219);
-x(220);
-x(221);
-x(222);
-x(223);
-x(224);
-x(225);
-x(226);
-x(227);
-x(228);
-x(229);
-x(230);
-x(231);
-x(232);
-x(233);
-x(234);
-x(235);
-x(236);
-x(237);
-x(238);
-x(239);
-x(240);
-x(241);
-x(242);
-x(243);
-x(244);
-x(245);
-x(246);
-x(247);
-x(248);
-x(249);
-x(250);
-x(251);
-x(252);
-x(253);
-x(254);
-x(255);
-x(256);
-x(257);
-x(258);
-x(259);
-x(260);
-x(261);
-x(262);
-x(263);
-x(264);
-x(265);
-x(266);
-x(267);
-x(268);
-x(269);
-x(270);
-x(271);
-x(272);
-x(273);
-x(274);
-x(275);
-x(276);
-x(277);
-x(278);
-x(279);
-x(280);
-x(281);
-x(282);
-x(283);
-x(284);
-x(285);
-x(286);
-x(287);
-x(288);
-x(289);
-x(290);
-x(291);
-x(292);
-x(293);
-x(294);
-x(295);
-x(296);
-x(297);
-x(298);
-x(299);
-x(300);
-};
-
-foo b;
-
-#endif
diff --git a/clang/test/CodeGenCXX/vtable-holder-self-reference.cpp b/clang/test/CodeGenCXX/vtable-holder-self-reference.cpp
deleted file mode 100644
index 727de7a..0000000
--- a/clang/test/CodeGenCXX/vtable-holder-self-reference.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -dwarf-version=2 -debug-info-kind=limited -x c++ -o - %s | FileCheck %s
-//
-// PR21941: crasher for self-referencing DW_TAG_structure_type node. If we get
-// rid of self-referenceing structure_types (PR21902), then it should be safe
-// to just kill this test.
-//
-// CHECK: ![[SELF:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "B",
-// CHECK-SAME: vtableHolder: ![[SELF]]
-
-void foo() {
- struct V {
- int vi;
- };
- struct B : virtual V {};
- B b;
-}