2016-12-26 12:00:54 +08:00
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s 2>&1 | FileCheck %s
|
2012-12-11 13:52:24 +08:00
|
|
|
// CHECK: cc1as
|
|
|
|
// CHECK-NOT: -relax-all
|
2013-07-26 05:19:01 +08:00
|
|
|
|
2016-12-26 12:00:54 +08:00
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as -Wa,-L %s 2>&1 | FileCheck --check-prefix=OPT_L %s
|
2013-09-27 05:00:51 +08:00
|
|
|
// OPT_L: msave-temp-labels
|
|
|
|
|
2013-11-15 06:52:58 +08:00
|
|
|
// Test that -I params in -Wa, and -Xassembler args are passed to integrated assembler
|
2016-12-26 12:00:54 +08:00
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-I,foo_dir 2>&1 | FileCheck --check-prefix=WA_INCLUDE1 %s
|
2013-11-15 06:52:58 +08:00
|
|
|
// WA_INCLUDE1: cc1as
|
|
|
|
// WA_INCLUDE1: "-I" "foo_dir"
|
|
|
|
|
2016-12-26 12:00:54 +08:00
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-Ifoo_dir 2>&1 | FileCheck --check-prefix=WA_INCLUDE2 %s
|
2013-11-15 06:52:58 +08:00
|
|
|
// WA_INCLUDE2: cc1as
|
|
|
|
// WA_INCLUDE2: "-Ifoo_dir"
|
|
|
|
|
2016-12-26 12:00:54 +08:00
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-I -Wa,foo_dir 2>&1 | FileCheck --check-prefix=WA_INCLUDE3 %s
|
2013-11-15 06:52:58 +08:00
|
|
|
// WA_INCLUDE3: cc1as
|
|
|
|
// WA_INCLUDE3: "-I" "foo_dir"
|
|
|
|
|
2016-12-26 12:00:54 +08:00
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Xassembler -I -Xassembler foo_dir 2>&1 | FileCheck --check-prefix=XA_INCLUDE1 %s
|
2013-11-15 06:52:58 +08:00
|
|
|
// XA_INCLUDE1: cc1as
|
|
|
|
// XA_INCLUDE1: "-I" "foo_dir"
|
|
|
|
|
2016-12-26 12:00:54 +08:00
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Xassembler -Ifoo_dir 2>&1 | FileCheck --check-prefix=XA_INCLUDE2 %s
|
2013-11-15 06:52:58 +08:00
|
|
|
// XA_INCLUDE2: cc1as
|
|
|
|
// XA_INCLUDE2: "-Ifoo_dir"
|
2014-01-17 11:17:40 +08:00
|
|
|
|
2016-12-26 12:00:54 +08:00
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -gdwarf-4 -gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2 %s
|
Switch to using -debug-info-kind=constructor as default (from =limited)
Summary:
-debug-info-kind=constructor reduces the amount of class debug info that
is emitted; this patch switches to using this as the default.
Constructor homing emits the complete type info for a class only when the
constructor is emitted, so it is expected that there will be some classes that
are not defined in the debug info anymore because they are never constructed,
and we shouldn't need debug info for these classes.
I compared the PDB files for clang, and there are 273 class types that are defined with `=limited`
but not with `=constructor` (out of ~60,000 total class types).
We've looked at a number of the types that are no longer defined with =constructor. The vast
majority of cases are something like class A is used as a parameter in a member function of
some other class B, which is emitted. But the function that uses class A is never called, and class A
is never constructed, and therefore isn't emitted in the debug info.
Bug: https://bugs.llvm.org/show_bug.cgi?id=46537
Subscribers: aprantl, cfe-commits, lldb-commits
Tags: #clang, #lldb
Differential Revision: https://reviews.llvm.org/D79147
2020-04-30 07:21:05 +08:00
|
|
|
// DWARF2: "-debug-info-kind=constructor" "-dwarf-version=2"
|
2014-05-19 21:39:13 +08:00
|
|
|
|
2016-12-26 12:00:54 +08:00
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -gdwarf-3 2>&1 | FileCheck --check-prefix=DWARF3 %s
|
Switch to using -debug-info-kind=constructor as default (from =limited)
Summary:
-debug-info-kind=constructor reduces the amount of class debug info that
is emitted; this patch switches to using this as the default.
Constructor homing emits the complete type info for a class only when the
constructor is emitted, so it is expected that there will be some classes that
are not defined in the debug info anymore because they are never constructed,
and we shouldn't need debug info for these classes.
I compared the PDB files for clang, and there are 273 class types that are defined with `=limited`
but not with `=constructor` (out of ~60,000 total class types).
We've looked at a number of the types that are no longer defined with =constructor. The vast
majority of cases are something like class A is used as a parameter in a member function of
some other class B, which is emitted. But the function that uses class A is never called, and class A
is never constructed, and therefore isn't emitted in the debug info.
Bug: https://bugs.llvm.org/show_bug.cgi?id=46537
Subscribers: aprantl, cfe-commits, lldb-commits
Tags: #clang, #lldb
Differential Revision: https://reviews.llvm.org/D79147
2020-04-30 07:21:05 +08:00
|
|
|
// DWARF3: "-debug-info-kind=constructor" "-dwarf-version=3"
|
2014-05-19 21:39:13 +08:00
|
|
|
|
2016-12-26 12:00:54 +08:00
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -gdwarf-4 2>&1 | FileCheck --check-prefix=DWARF4 %s
|
Switch to using -debug-info-kind=constructor as default (from =limited)
Summary:
-debug-info-kind=constructor reduces the amount of class debug info that
is emitted; this patch switches to using this as the default.
Constructor homing emits the complete type info for a class only when the
constructor is emitted, so it is expected that there will be some classes that
are not defined in the debug info anymore because they are never constructed,
and we shouldn't need debug info for these classes.
I compared the PDB files for clang, and there are 273 class types that are defined with `=limited`
but not with `=constructor` (out of ~60,000 total class types).
We've looked at a number of the types that are no longer defined with =constructor. The vast
majority of cases are something like class A is used as a parameter in a member function of
some other class B, which is emitted. But the function that uses class A is never called, and class A
is never constructed, and therefore isn't emitted in the debug info.
Bug: https://bugs.llvm.org/show_bug.cgi?id=46537
Subscribers: aprantl, cfe-commits, lldb-commits
Tags: #clang, #lldb
Differential Revision: https://reviews.llvm.org/D79147
2020-04-30 07:21:05 +08:00
|
|
|
// DWARF4: "-debug-info-kind=constructor" "-dwarf-version=4"
|
2014-05-19 21:39:13 +08:00
|
|
|
|
2016-12-26 12:00:54 +08:00
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Xassembler -gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2XASSEMBLER %s
|
Switch to using -debug-info-kind=constructor as default (from =limited)
Summary:
-debug-info-kind=constructor reduces the amount of class debug info that
is emitted; this patch switches to using this as the default.
Constructor homing emits the complete type info for a class only when the
constructor is emitted, so it is expected that there will be some classes that
are not defined in the debug info anymore because they are never constructed,
and we shouldn't need debug info for these classes.
I compared the PDB files for clang, and there are 273 class types that are defined with `=limited`
but not with `=constructor` (out of ~60,000 total class types).
We've looked at a number of the types that are no longer defined with =constructor. The vast
majority of cases are something like class A is used as a parameter in a member function of
some other class B, which is emitted. But the function that uses class A is never called, and class A
is never constructed, and therefore isn't emitted in the debug info.
Bug: https://bugs.llvm.org/show_bug.cgi?id=46537
Subscribers: aprantl, cfe-commits, lldb-commits
Tags: #clang, #lldb
Differential Revision: https://reviews.llvm.org/D79147
2020-04-30 07:21:05 +08:00
|
|
|
// DWARF2XASSEMBLER: "-debug-info-kind=constructor" "-dwarf-version=2"
|
2014-05-19 21:39:13 +08:00
|
|
|
|
2016-12-26 12:00:54 +08:00
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2WA %s
|
Switch to using -debug-info-kind=constructor as default (from =limited)
Summary:
-debug-info-kind=constructor reduces the amount of class debug info that
is emitted; this patch switches to using this as the default.
Constructor homing emits the complete type info for a class only when the
constructor is emitted, so it is expected that there will be some classes that
are not defined in the debug info anymore because they are never constructed,
and we shouldn't need debug info for these classes.
I compared the PDB files for clang, and there are 273 class types that are defined with `=limited`
but not with `=constructor` (out of ~60,000 total class types).
We've looked at a number of the types that are no longer defined with =constructor. The vast
majority of cases are something like class A is used as a parameter in a member function of
some other class B, which is emitted. But the function that uses class A is never called, and class A
is never constructed, and therefore isn't emitted in the debug info.
Bug: https://bugs.llvm.org/show_bug.cgi?id=46537
Subscribers: aprantl, cfe-commits, lldb-commits
Tags: #clang, #lldb
Differential Revision: https://reviews.llvm.org/D79147
2020-04-30 07:21:05 +08:00
|
|
|
// DWARF2WA: "-debug-info-kind=constructor" "-dwarf-version=2"
|
2015-10-08 12:24:12 +08:00
|
|
|
|
|
|
|
// A dwarf version number that driver can't parse is just stuffed in.
|
2016-12-26 12:00:54 +08:00
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-gdwarf-huh 2>&1 | FileCheck --check-prefix=BOGODWARF %s
|
2015-10-08 12:24:12 +08:00
|
|
|
// BOGODWARF: "-gdwarf-huh"
|
2015-06-24 02:20:13 +08:00
|
|
|
|
2016-12-26 12:00:54 +08:00
|
|
|
// RUN: %clang -### -target x86_64--- -x assembler -c -integrated-as %s -I myincludedir 2>&1 | FileCheck --check-prefix=INCLUDEPATH %s
|
2015-06-24 02:20:13 +08:00
|
|
|
// INCLUDEPATH: "-I" "myincludedir"
|
2015-08-19 23:12:02 +08:00
|
|
|
|
2016-12-26 12:00:54 +08:00
|
|
|
// RUN: %clang -### -target x86_64--- -x assembler -c -fPIC -integrated-as %s 2>&1 | FileCheck --check-prefix=PIC %s
|
2015-08-19 23:12:02 +08:00
|
|
|
// PIC: "-mrelocation-model" "pic"
|
2018-12-07 02:50:39 +08:00
|
|
|
|
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-fdebug-compilation-dir,. 2>&1 | FileCheck --check-prefix=WA_DEBUGDIR %s
|
2020-01-11 08:18:11 +08:00
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-fdebug-compilation-dir=. 2>&1 | FileCheck --check-prefix=WA_DEBUGDIR %s
|
2018-12-07 02:50:39 +08:00
|
|
|
// WA_DEBUGDIR: "-fdebug-compilation-dir" "."
|
|
|
|
|
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Xassembler -fdebug-compilation-dir -Xassembler . 2>&1 | FileCheck --check-prefix=XA_DEBUGDIR %s
|
2020-01-11 08:18:11 +08:00
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Xassembler -fdebug-compilation-dir=. 2>&1 | FileCheck --check-prefix=XA_DEBUGDIR %s
|
2018-12-07 02:50:39 +08:00
|
|
|
// XA_DEBUGDIR: "-fdebug-compilation-dir" "."
|