hanchenye-llvm-project/clang/test/Driver
Chandler Carruth 306bd2c6aa Fix PR11685 by implementing -ffast-math and its various friends in the
Clang driver. This involves a bunch of silly option parsing code to try
to carefully emulate GCC's options. Currently, this takes a conservative
approach, and unless all of the unsafe optimizations are enabled, none
of them are. The fine grained control doesn't seem particularly useful.
If it ever becomes useful, we can add that to LLVM first, and then
expose it here.

This also fixes a few tiny bugs in the flag management around
-fhonor-infinities and -fhonor-nans; the flags now form proper sets both
for enabling and disabling, with the last flag winning.

I've also implemented a moderately terrifying GCC feature where
a language change is also provided by the '-ffast-math' flag by defining
the __FAST_MATH__ preprocessor macro. This feature is tracked and
serialized in the frontend but it isn't used yet. A subsequent patch
will add the preprocessor macro and tests for it.

I've manually tested that codegen appears to respect this, but I've not
dug in enough to see if there is an easy way to test codegen options w/o
relying on the particulars of LLVM's optimizations.

llvm-svn: 147434
2012-01-02 14:19:45 +00:00
..
Inputs add tree test for suse on ppc64 (r146142) 2011-12-08 20:36:19 +00:00
Wp-args.c
Xarch.c
Xlinker-args.c
analyze.c
apple-kext-i386.cpp Switch to the C++11 warning flags in tests. 2011-10-18 05:54:07 +00:00
apple-kext-mkernel.c
arc-exceptions.m
arc.c
arch.c
arm-darwin-builtin.c
ast.c
at_file.c
at_file.c.args
bindings.c
cc-log-diagnostics.c Print a typo correction hint for unknown warning flags. 2011-11-14 23:30:34 +00:00
cc-print-options.c
ccc-add-args.c
ccc-host-triple-no-integrated-as.c
cfi.c Stop disabling integrated assembler with -static. <rdar://problem/10175391> 2011-10-30 00:20:28 +00:00
clang-c-as-cxx.c
clang-exception-flags.cpp
clang-g-opts.c
clang-translation.c
clang_cpp.c
clang_f_opts.c
clang_wrapv_opts.c
cpath.c [driver] Fix test case for Windows due to fallout from r141202+r141205. 2011-10-06 22:05:26 +00:00
darwin-as.c Stop disabling integrated assembler with -static. <rdar://problem/10175391> 2011-10-30 00:20:28 +00:00
darwin-cc.c
darwin-debug-flags.c Add missing triple to darwin clang driver test. 2011-12-22 21:32:51 +00:00
darwin-dsymutil.c
darwin-iphone-defaults.m Enable stack protectors by default for iOS. <rdar://problem/8836680> 2011-12-14 06:08:25 +00:00
darwin-ld.c tests/Driver/darwin-ld.c: Get rid of the "splatter" test case. We have enough 2011-11-17 00:36:53 +00:00
darwin-objc-defaults.m Make -fobjc-nonfragile-abi the -cc1 default, since it's the 2011-10-02 01:16:38 +00:00
darwin-objc-gc.m
darwin-objc-options.m Make -fobjc-nonfragile-abi the -cc1 default, since it's the 2011-10-02 01:16:38 +00:00
darwin-verify-debug.c Right now this requires asserts. 2011-08-23 21:47:58 +00:00
darwin-version.c
darwin-xarch.c
debug-options-as.c Split out clang/test/Driver/debug-options-as.c from debug-options.c, and mark it as XFAIL: mingw32. 2011-12-31 02:36:23 +00:00
debug-options.c Split out clang/test/Driver/debug-options-as.c from debug-options.c, and mark it as XFAIL: mingw32. 2011-12-31 02:36:23 +00:00
debug.c test/Driver/debug.c: Mark this as "REQUIRES: shell". 2011-10-22 11:28:32 +00:00
default-toolchain.c
dragonfly.c
emit-llvm.c
exceptions.m
fast-math.c Fix PR11685 by implementing -ffast-math and its various friends in the 2012-01-02 14:19:45 +00:00
flags.c
frame-pointer.c Don't use the frame pointer on linux x86 and x86_64 if optimizing. This 2011-12-14 21:02:23 +00:00
freebsd.c
gcc_forward.c
gnu-runtime.m
hello.c
immediate-options.c
index-header-map.c
ios-simulator-arcruntime.c Revert r142311, -mios-simulator-version-min does not work correctly. 2011-10-18 00:22:49 +00:00
le32-unknown-nacl.cpp Specify -ccc-clang-archs for le32 targets which may not be supported by default. 2011-10-04 05:18:19 +00:00
linux-header-search.cpp Try to fix an issue on some hosts where the 'lib' in the builtin include 2011-11-09 08:26:57 +00:00
linux-ld.c Teach the link-step test to verify that we don't pass bad --hash-style 2011-12-17 21:57:25 +00:00
lto.c
m_and_mm.c
mg.c
mno-global-merge.c [driver] Add -mglobal-merge/-mno-global-merge machine options to enable/disable merging of 2011-08-26 00:26:29 +00:00
no-objc-arr.m
noexecstack.c
nostdincxx.cpp
nostdlib.c
nostdlibinc.c Driver: Add support for a new -nostdlibinc option. 2011-10-11 18:20:16 +00:00
objc++-cpp-output.mm
objc-cpp-output.m
openbsd.c
option-aliases.c
output-file-cleanup.c Un-XFAIL this test on Darwin, it reportedly passes now. 2011-11-21 21:56:51 +00:00
parsing.c
phases.c
preprocessor.c
pth.c
qa_override.c
redzone.c
rewrite-objc.m Fix test for unrelated changes. 2011-12-06 03:46:28 +00:00
stackrealign.c Stack realignment is a tristate. Add -mno-stackrealign to turn off all stack 2011-12-06 03:33:03 +00:00
std.c
std.cpp Add support for -std=gnu90 and -std=c++03, for compatibility with modern gcc. 2011-10-14 00:34:28 +00:00
sysroot-flags.c
sysroot.c
unknown-gcc-arch.c
x86_features.c