This revision was automatically updated to reflect the committed changes. Closed by commit rL313169: Driver: Make -fwhole-program-vtables a core option so it can be used from clang… (authored by pcc).
Changed prior to commit: https://reviews.llvm.org/D37787?vs=114960&id=115082#toc Repository: rL LLVM https://reviews.llvm.org/D37787 Files: cfe/trunk/include/clang/Driver/Options.td cfe/trunk/test/Driver/whole-program-vtables.c Index: cfe/trunk/include/clang/Driver/Options.td =================================================================== --- cfe/trunk/include/clang/Driver/Options.td +++ cfe/trunk/include/clang/Driver/Options.td @@ -1502,9 +1502,10 @@ HelpText<"Give global types 'default' visibility and global functions and " "variables 'hidden' visibility by default">; def fwhole_program_vtables : Flag<["-"], "fwhole-program-vtables">, Group<f_Group>, - Flags<[CC1Option]>, + Flags<[CoreOption, CC1Option]>, HelpText<"Enables whole-program vtable optimization. Requires -flto">; -def fno_whole_program_vtables : Flag<["-"], "fno-whole-program-vtables">, Group<f_Group>; +def fno_whole_program_vtables : Flag<["-"], "fno-whole-program-vtables">, Group<f_Group>, + Flags<[CoreOption]>; def fwrapv : Flag<["-"], "fwrapv">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Treat signed integer overflow as two's complement">; def fwritable_strings : Flag<["-"], "fwritable-strings">, Group<f_Group>, Flags<[CC1Option]>, Index: cfe/trunk/test/Driver/whole-program-vtables.c =================================================================== --- cfe/trunk/test/Driver/whole-program-vtables.c +++ cfe/trunk/test/Driver/whole-program-vtables.c @@ -1,2 +1,11 @@ // RUN: %clang -target x86_64-unknown-linux -fwhole-program-vtables -### %s 2>&1 | FileCheck --check-prefix=NO-LTO %s +// RUN: %clang_cl --target=x86_64-pc-win32 -fwhole-program-vtables -### %s 2>&1 | FileCheck --check-prefix=NO-LTO %s // NO-LTO: invalid argument '-fwhole-program-vtables' only allowed with '-flto' + +// RUN: %clang -target x86_64-unknown-linux -fwhole-program-vtables -flto -### %s 2>&1 | FileCheck --check-prefix=LTO %s +// RUN: %clang_cl --target=x86_64-pc-win32 -fwhole-program-vtables -flto -### %s 2>&1 | FileCheck --check-prefix=LTO %s +// LTO: "-fwhole-program-vtables" + +// RUN: %clang -target x86_64-unknown-linux -fwhole-program-vtables -fno-whole-program-vtables -flto -### %s 2>&1 | FileCheck --check-prefix=LTO-DISABLE %s +// RUN: %clang_cl --target=x86_64-pc-win32 -fwhole-program-vtables -fno-whole-program-vtables -flto -### %s 2>&1 | FileCheck --check-prefix=LTO-DISABLE %s +// LTO-DISABLE-NOT: "-fwhole-program-vtables"
Index: cfe/trunk/include/clang/Driver/Options.td =================================================================== --- cfe/trunk/include/clang/Driver/Options.td +++ cfe/trunk/include/clang/Driver/Options.td @@ -1502,9 +1502,10 @@ HelpText<"Give global types 'default' visibility and global functions and " "variables 'hidden' visibility by default">; def fwhole_program_vtables : Flag<["-"], "fwhole-program-vtables">, Group<f_Group>, - Flags<[CC1Option]>, + Flags<[CoreOption, CC1Option]>, HelpText<"Enables whole-program vtable optimization. Requires -flto">; -def fno_whole_program_vtables : Flag<["-"], "fno-whole-program-vtables">, Group<f_Group>; +def fno_whole_program_vtables : Flag<["-"], "fno-whole-program-vtables">, Group<f_Group>, + Flags<[CoreOption]>; def fwrapv : Flag<["-"], "fwrapv">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Treat signed integer overflow as two's complement">; def fwritable_strings : Flag<["-"], "fwritable-strings">, Group<f_Group>, Flags<[CC1Option]>, Index: cfe/trunk/test/Driver/whole-program-vtables.c =================================================================== --- cfe/trunk/test/Driver/whole-program-vtables.c +++ cfe/trunk/test/Driver/whole-program-vtables.c @@ -1,2 +1,11 @@ // RUN: %clang -target x86_64-unknown-linux -fwhole-program-vtables -### %s 2>&1 | FileCheck --check-prefix=NO-LTO %s +// RUN: %clang_cl --target=x86_64-pc-win32 -fwhole-program-vtables -### %s 2>&1 | FileCheck --check-prefix=NO-LTO %s // NO-LTO: invalid argument '-fwhole-program-vtables' only allowed with '-flto' + +// RUN: %clang -target x86_64-unknown-linux -fwhole-program-vtables -flto -### %s 2>&1 | FileCheck --check-prefix=LTO %s +// RUN: %clang_cl --target=x86_64-pc-win32 -fwhole-program-vtables -flto -### %s 2>&1 | FileCheck --check-prefix=LTO %s +// LTO: "-fwhole-program-vtables" + +// RUN: %clang -target x86_64-unknown-linux -fwhole-program-vtables -fno-whole-program-vtables -flto -### %s 2>&1 | FileCheck --check-prefix=LTO-DISABLE %s +// RUN: %clang_cl --target=x86_64-pc-win32 -fwhole-program-vtables -fno-whole-program-vtables -flto -### %s 2>&1 | FileCheck --check-prefix=LTO-DISABLE %s +// LTO-DISABLE-NOT: "-fwhole-program-vtables"
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits