2017-12-20 00:19:11 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes -### -target sparc-myriad-rtems %s \
|
2016-10-26 07:02:30 +08:00
|
|
|
// RUN: -ccc-install-dir %S/Inputs/basic_myriad_tree/bin \
|
2015-12-22 04:30:49 +08:00
|
|
|
// RUN: --gcc-toolchain=%S/Inputs/basic_myriad_tree 2>&1 | FileCheck %s -check-prefix=LINK_WITH_RTEMS
|
2015-11-19 01:19:47 +08:00
|
|
|
// LINK_WITH_RTEMS: Inputs{{.*}}crti.o
|
|
|
|
// LINK_WITH_RTEMS: Inputs{{.*}}crtbegin.o
|
2017-12-20 00:19:11 +08:00
|
|
|
// LINK_WITH_RTEMS: "-L{{.*}}Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-rtems/6.3.0"
|
|
|
|
// LINK_WITH_RTEMS: "-L{{.*}}Inputs/basic_myriad_tree/bin/../sparc-myriad-rtems/lib"
|
2016-10-26 07:02:30 +08:00
|
|
|
// LINK_WITH_RTEMS: "--start-group" "-lc" "-lgcc" "-lrtemscpu" "-lrtemsbsp" "--end-group"
|
2015-11-19 01:19:47 +08:00
|
|
|
// LINK_WITH_RTEMS: Inputs{{.*}}crtend.o
|
|
|
|
// LINK_WITH_RTEMS: Inputs{{.*}}crtn.o
|
2015-09-18 03:56:40 +08:00
|
|
|
|
2017-12-20 00:19:11 +08:00
|
|
|
// RUN: %clang -c -no-canonical-prefixes -### -target sparc-myriad-rtems -x c++ %s \
|
2016-10-24 16:04:17 +08:00
|
|
|
// RUN: -stdlib=libstdc++ --gcc-toolchain=%S/Inputs/basic_myriad_tree 2>&1 | FileCheck %s -check-prefix=COMPILE_CXX
|
2017-12-20 00:19:11 +08:00
|
|
|
// COMPILE_CXX: "-internal-isystem" "{{.*}}/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-rtems/6.3.0/../../../../sparc-myriad-rtems/include/c++/6.3.0"
|
|
|
|
// COMPILE_CXX: "-internal-isystem" "{{.*}}/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-rtems/6.3.0/../../../../sparc-myriad-rtems/include/c++/6.3.0/sparc-myriad-rtems"
|
|
|
|
// COMPILE_CXX: "-internal-isystem" "{{.*}}/Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-rtems/6.3.0/../../../../sparc-myriad-rtems/include/c++/6.3.0/backward"
|
2015-10-17 02:46:26 +08:00
|
|
|
|
2015-09-18 05:20:16 +08:00
|
|
|
// RUN: %clang -### -E -target sparc-myriad --sysroot=/yow %s 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=SLASH_INCLUDE
|
|
|
|
// SLASH_INCLUDE: "-isysroot" "/yow" "-internal-isystem" "/yow/include"
|
|
|
|
|
|
|
|
// RUN: %clang -### -E -target sparc-myriad --sysroot=/yow %s -nostdinc 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=NO_SLASH_INCLUDE
|
|
|
|
// NO_SLASH_INCLUDE: "-isysroot" "/yow"
|
|
|
|
// NO_SLASH_INCLUDE-NOT: "-internal-isystem" "/yow/include"
|
|
|
|
|
2015-09-18 03:56:40 +08:00
|
|
|
// RUN: %clang -### -target what-myriad %s 2>&1 | FileCheck %s -check-prefix=BAD_ARCH
|
|
|
|
// BAD_ARCH: the target architecture 'what' is not supported by the target 'myriad'
|
|
|
|
|
2015-06-19 22:55:19 +08:00
|
|
|
// Ensure that '-target shave' picks a different compiler.
|
|
|
|
// Also check that '-I' is turned into '-i:' for the assembler.
|
|
|
|
|
|
|
|
// Note that since we don't know where movi tools are installed,
|
|
|
|
// the driver may or may not find a full path to them.
|
|
|
|
// That is, the 0th argument will be "/path/to/my/moviCompile"
|
|
|
|
// or just "moviCompile" depending on whether moviCompile is found.
|
|
|
|
// As such, we test only for a trailing quote in its rendering.
|
|
|
|
// The same goes for "moviAsm".
|
|
|
|
|
2016-03-16 06:34:02 +08:00
|
|
|
// RUN: %clang -target shave-myriad -mcpu=myriad2.2 -c -### %s -isystem somewhere -Icommon -Wa,-yippee 2>&1 \
|
2015-08-05 23:08:54 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=MOVICOMPILE
|
2016-03-16 06:34:02 +08:00
|
|
|
// MOVICOMPILE: moviCompile{{(.exe)?}}" "-S" "-fno-exceptions" "-DMYRIAD2" "-mcpu=myriad2.2" "-isystem" "somewhere" "-I" "common"
|
|
|
|
// MOVICOMPILE: moviAsm{{(.exe)?}}" "-no6thSlotCompression" "-cv:myriad2.2" "-noSPrefixing" "-a"
|
2018-01-09 04:36:08 +08:00
|
|
|
// MOVICOMPILE: "-yippee" "-i:somewhere" "-i:common"
|
2015-06-19 22:55:19 +08:00
|
|
|
|
2015-09-18 03:56:40 +08:00
|
|
|
// RUN: %clang -target shave-myriad -c -### %s -DEFINE_ME -UNDEFINE_ME 2>&1 \
|
2015-08-05 23:08:54 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=DEFINES
|
|
|
|
// DEFINES: "-D" "EFINE_ME" "-U" "NDEFINE_ME"
|
2015-06-19 22:55:19 +08:00
|
|
|
|
2015-09-18 03:56:40 +08:00
|
|
|
// RUN: %clang -target shave-myriad -c -### %s -Icommon -iquote quotepath -isystem syspath 2>&1 \
|
2015-08-05 23:08:54 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=INCLUDES
|
|
|
|
// INCLUDES: "-iquote" "quotepath" "-isystem" "syspath"
|
2015-08-03 22:34:22 +08:00
|
|
|
|
2016-09-30 03:59:12 +08:00
|
|
|
// -fno-split-dwarf-inlining is consumed but not passed to moviCompile.
|
2015-09-18 03:56:40 +08:00
|
|
|
// RUN: %clang -target shave-myriad -c -### %s -g -fno-inline-functions \
|
2016-09-30 03:59:12 +08:00
|
|
|
// RUN: -fno-inline-functions-called-once -Os -Wall -MF dep.d -fno-split-dwarf-inlining \
|
2017-05-11 05:48:13 +08:00
|
|
|
// RUN: -ffunction-sections -Xclang -xclangflag -mllvm -llvm-flag 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=PASSTHRU_OPTIONS
|
2015-09-02 21:42:43 +08:00
|
|
|
// PASSTHRU_OPTIONS: "-g" "-fno-inline-functions" "-fno-inline-functions-called-once"
|
|
|
|
// PASSTHRU_OPTIONS: "-Os" "-Wall" "-MF" "dep.d" "-ffunction-sections"
|
2017-05-11 05:48:13 +08:00
|
|
|
// PASSTHRU_OPTIONS: "-Xclang" "-xclangflag" "-mllvm" "-llvm-flag"
|
2015-09-09 03:29:55 +08:00
|
|
|
|
2015-09-18 03:56:40 +08:00
|
|
|
// RUN: %clang -target shave-myriad -c %s -o foo.o -### -MD -MF dep.d 2>&1 \
|
2015-09-09 03:29:55 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=MDMF
|
2016-03-16 00:41:31 +08:00
|
|
|
// MDMF: "-S" "-fno-exceptions" "-DMYRIAD2" "-MD" "-MF" "dep.d" "-MT" "foo.o"
|
2015-10-03 02:39:08 +08:00
|
|
|
|
2016-03-16 00:41:31 +08:00
|
|
|
// RUN: %clang -target shave-myriad -std=gnu++11 -mcpu=anothercpu -S %s -o foo.o -### 2>&1 \
|
2015-11-16 23:38:40 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=STDEQ
|
2016-03-16 00:41:31 +08:00
|
|
|
// STDEQ: "-S" "-fno-exceptions" "-DMYRIAD2" "-std=gnu++11" "-mcpu=anothercpu"
|
2015-11-20 12:58:12 +08:00
|
|
|
|
|
|
|
// RUN: %clang -target shave-myriad -E -Ifoo %s -o foo.i -### 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=PREPROCESS
|
2016-03-16 00:41:31 +08:00
|
|
|
// PREPROCESS: "-E" "-DMYRIAD2" "-I" "foo"
|
2015-11-16 23:38:40 +08:00
|
|
|
|
2016-10-24 16:04:17 +08:00
|
|
|
// RUN: %clang -stdlib=platform -target sparc-myriad -### --driver-mode=g++ %s 2>&1 | FileCheck %s --check-prefix=LIBSTDCXX
|
2016-10-20 01:30:40 +08:00
|
|
|
// LIBSTDCXX: "-lstdc++" "-lc" "-lgcc"
|
|
|
|
|
|
|
|
// RUN: %clang -stdlib=libc++ -### -target sparcel-myriad -S -x c++ %s 2>&1 | FileCheck %s -check-prefix=LIBCXX
|
|
|
|
// LIBCXX: "-internal-isystem" "{{.*}}/../include/c++/v1"
|
2015-10-10 04:26:20 +08:00
|
|
|
|
2015-10-03 02:39:08 +08:00
|
|
|
// RUN: %clang -target sparc-myriad -### -nostdlib %s 2>&1 | FileCheck %s --check-prefix=NOSTDLIB
|
2015-11-18 06:33:34 +08:00
|
|
|
// NOSTDLIB-NOT: crtbegin.o
|
2015-10-03 02:39:08 +08:00
|
|
|
// NOSTDLIB-NOT: "-lc"
|
2015-10-08 22:18:02 +08:00
|
|
|
|
|
|
|
// RUN: %clang -### -c -g %s -target sparc-myriad 2>&1 | FileCheck -check-prefix=G_SPARC %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
|
|
|
// G_SPARC: "-debug-info-kind=constructor" "-dwarf-version=2"
|
2016-05-10 03:09:59 +08:00
|
|
|
|
2017-12-20 00:19:11 +08:00
|
|
|
// RUN: %clang -### -c %s -target sparc-myriad-rtems -fuse-init-array 2>&1 \
|
2016-05-10 03:09:59 +08:00
|
|
|
// RUN: | FileCheck -check-prefix=USE-INIT-ARRAY %s
|
|
|
|
// USE-INIT-ARRAY-NOT: argument unused
|