diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-07-23 17:50:15 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-07-23 17:50:15 +0000 |
commit | 488bd0159bf18c4cd0ed260465aa40246236a694 (patch) | |
tree | fb047895aa1d66c19ce039c3cb9c56280cd7c9f0 /clang/test/Driver/debug-options.c | |
parent | ad2524f9fcdf29a1b721ecda1d696db53c69a678 (diff) | |
download | bcm5719-llvm-488bd0159bf18c4cd0ed260465aa40246236a694.tar.gz bcm5719-llvm-488bd0159bf18c4cd0ed260465aa40246236a694.zip |
[DebugInfo] Error out when enabling -fdebug-types-section on non-ELF target.
Currently, support for debug_types is only present for ELF and trying to
pass -fdebug-types-section for other targets results in a crash in the
backend. Until this is fixed, we should emit a diagnostic in the front
end when the option is passed for non-linux targets.
Differential revision: https://reviews.llvm.org/D49594
llvm-svn: 337717
Diffstat (limited to 'clang/test/Driver/debug-options.c')
-rw-r--r-- | clang/test/Driver/debug-options.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/clang/test/Driver/debug-options.c b/clang/test/Driver/debug-options.c index 6d28a7169d9..0dd32e983ad 100644 --- a/clang/test/Driver/debug-options.c +++ b/clang/test/Driver/debug-options.c @@ -139,12 +139,18 @@ // // RUN: %clang -### -c -gdwarf-aranges %s 2>&1 | FileCheck -check-prefix=GARANGE %s // -// RUN: %clang -### -fdebug-types-section %s 2>&1 \ +// RUN: %clang -### -fdebug-types-section -target x86_64-unknown-linux %s 2>&1 \ // RUN: | FileCheck -check-prefix=FDTS %s // -// RUN: %clang -### -fdebug-types-section -fno-debug-types-section %s 2>&1 \ +// RUN: %clang -### -fdebug-types-section -fno-debug-types-section -target x86_64-unknown-linux %s 2>&1 \ // RUN: | FileCheck -check-prefix=NOFDTS %s // +// RUN: %clang -### -fdebug-types-section -target x86_64-apple-darwin %s 2>&1 \ +// RUN: | FileCheck -check-prefix=FDTSE %s +// +// RUN: %clang -### -fdebug-types-section -fno-debug-types-section -target x86_64-apple-darwin %s 2>&1 \ +// RUN: | FileCheck -check-prefix=NOFDTSE %s +// // RUN: %clang -### -g -gno-column-info %s 2>&1 \ // RUN: | FileCheck -check-prefix=NOCI %s // @@ -229,8 +235,10 @@ // GARANGE: -generate-arange-section // // FDTS: "-mllvm" "-generate-type-units" +// FDTSE: error: unsupported option '-fdebug-types-section' for target 'x86_64-apple-darwin' // // NOFDTS-NOT: "-mllvm" "-generate-type-units" +// NOFDTSE-NOT: error: unsupported option '-fdebug-types-section' for target 'x86_64-apple-darwin' // // CI: "-dwarf-column-info" // |