https://github.com/JohnyTheCarrot created https://github.com/llvm/llvm-project/pull/69114
New to this sort of thing, still learning how to work with the project. Contructive feedback very welcome. See [the corresponding issue](https://github.com/llvm/llvm-project/issues/68355) for information on the bug. Fixes: #68355 >From 15741d7f12d9549518eb157506429f7ff5453f66 Mon Sep 17 00:00:00 2001 From: Tuur Martens <tuurmarte...@gmail.com> Date: Sun, 15 Oct 2023 18:08:35 +0200 Subject: [PATCH] [clang] Fix --entry command line option --- clang/include/clang/Driver/Options.td | 3 ++- clang/test/Driver/entry.c | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 clang/test/Driver/entry.c diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 3f2058a5d4650ca..6737af0a8b68728 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -5474,7 +5474,8 @@ def _dyld_prefix_EQ : Joined<["--"], "dyld-prefix=">; def _dyld_prefix : Separate<["--"], "dyld-prefix">, Alias<_dyld_prefix_EQ>; def _encoding_EQ : Joined<["--"], "encoding=">, Alias<fencoding_EQ>; def _encoding : Separate<["--"], "encoding">, Alias<fencoding_EQ>; -def _entry : Flag<["--"], "entry">, Alias<e>; +def _entry_EQ : Joined<["--"], "entry=">, Flags<[LinkerInput]>, Group<Link_Group>, Alias<e>; +def _entry : Separate<["--"], "entry">, Flags<[LinkerInput]>, Group<Link_Group>, Alias<e>; def _extdirs_EQ : Joined<["--"], "extdirs=">, Alias<fextdirs_EQ>; def _extdirs : Separate<["--"], "extdirs">, Alias<fextdirs_EQ>; def _extra_warnings : Flag<["--"], "extra-warnings">, Alias<W_Joined>; diff --git a/clang/test/Driver/entry.c b/clang/test/Driver/entry.c new file mode 100644 index 000000000000000..9b264c1620b06ad --- /dev/null +++ b/clang/test/Driver/entry.c @@ -0,0 +1,5 @@ +// RUN: %clang -### --entry test %s 2>&1 | FileCheck -check-prefix=TEST1 %s +// RUN: %clang -### --entry=test %s 2>&1 | FileCheck -check-prefix=TEST1 %s +// RUN: %clang -### --etest %s 2>&1 | FileCheck -check-prefix=TEST1 %s + +// CHECK: "-e" "test" _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits