Constructor homing reduces the amount of class type info that is emitted by emitting conmplete type info for a class only when a constructor for that class is emitted. This will mainly reduce the amount of duplicate debug info in object files. In Chrome enabling ctor homing decreased total build directory sizes by about 30%. It's also expected that some class types (such as unused classes) will no longer be emitted in the debug info. This is fine, since we wouldn't expect to need these types when debugging. In some cases (e.g. libc++, https://reviews.llvm.org/D98750), classes are used without calling the constructor. Since this is technically undefined behavior, enabling constructor homing should be fine. However Clang now has an attribute `__attribute__((standalone_debug))` that can be used on classes to ignore ctor homing. Bug: https://bugs.llvm.org/show_bug.cgi?id=46537 Differential Revision: https://reviews.llvm.org/D106084
61 lines
3.3 KiB
ArmAsm
61 lines
3.3 KiB
ArmAsm
// RUN: %clang -### -target x86_64--- -c -integrated-as %s 2>&1 | FileCheck %s
|
|
// CHECK: cc1as
|
|
// CHECK-NOT: -relax-all
|
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as -Wa,-L %s 2>&1 | FileCheck --check-prefix=OPT_L %s
|
|
// OPT_L: msave-temp-labels
|
|
|
|
// Test that -I params in -Wa, and -Xassembler args are passed to integrated assembler
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-I,foo_dir 2>&1 | FileCheck --check-prefix=WA_INCLUDE1 %s
|
|
// WA_INCLUDE1: cc1as
|
|
// WA_INCLUDE1: "-I" "foo_dir"
|
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-Ifoo_dir 2>&1 | FileCheck --check-prefix=WA_INCLUDE2 %s
|
|
// WA_INCLUDE2: cc1as
|
|
// WA_INCLUDE2: "-Ifoo_dir"
|
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-I -Wa,foo_dir 2>&1 | FileCheck --check-prefix=WA_INCLUDE3 %s
|
|
// WA_INCLUDE3: cc1as
|
|
// WA_INCLUDE3: "-I" "foo_dir"
|
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Xassembler -I -Xassembler foo_dir 2>&1 | FileCheck --check-prefix=XA_INCLUDE1 %s
|
|
// XA_INCLUDE1: cc1as
|
|
// XA_INCLUDE1: "-I" "foo_dir"
|
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Xassembler -Ifoo_dir 2>&1 | FileCheck --check-prefix=XA_INCLUDE2 %s
|
|
// XA_INCLUDE2: cc1as
|
|
// XA_INCLUDE2: "-Ifoo_dir"
|
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -gdwarf-4 -gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2 %s
|
|
// DWARF2: "-debug-info-kind=constructor" "-dwarf-version=2"
|
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -gdwarf-3 2>&1 | FileCheck --check-prefix=DWARF3 %s
|
|
// DWARF3: "-debug-info-kind=constructor" "-dwarf-version=3"
|
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -gdwarf-4 2>&1 | FileCheck --check-prefix=DWARF4 %s
|
|
// DWARF4: "-debug-info-kind=constructor" "-dwarf-version=4"
|
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Xassembler -gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2XASSEMBLER %s
|
|
// DWARF2XASSEMBLER: "-debug-info-kind=constructor" "-dwarf-version=2"
|
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2WA %s
|
|
// DWARF2WA: "-debug-info-kind=constructor" "-dwarf-version=2"
|
|
|
|
// A dwarf version number that driver can't parse is just stuffed in.
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-gdwarf-huh 2>&1 | FileCheck --check-prefix=BOGODWARF %s
|
|
// BOGODWARF: "-gdwarf-huh"
|
|
|
|
// RUN: %clang -### -target x86_64--- -x assembler -c -integrated-as %s -I myincludedir 2>&1 | FileCheck --check-prefix=INCLUDEPATH %s
|
|
// INCLUDEPATH: "-I" "myincludedir"
|
|
|
|
// RUN: %clang -### -target x86_64--- -x assembler -c -fPIC -integrated-as %s 2>&1 | FileCheck --check-prefix=PIC %s
|
|
// PIC: "-mrelocation-model" "pic"
|
|
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-fdebug-compilation-dir,. 2>&1 | FileCheck --check-prefix=WA_DEBUGDIR %s
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-fdebug-compilation-dir=. 2>&1 | FileCheck --check-prefix=WA_DEBUGDIR %s
|
|
// 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
|
|
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Xassembler -fdebug-compilation-dir=. 2>&1 | FileCheck --check-prefix=XA_DEBUGDIR %s
|
|
// XA_DEBUGDIR: "-fdebug-compilation-dir" "."
|