summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/clang_f_opts.c
Commit message (Collapse)AuthorAgeFilesLines
...
* With this patch -Wwrite-strings is still implemented with the terribleRafael Espindola2013-11-051-2/+2
| | | | | | | | | | | hack of passing -fconst-strings to -cc1, but at least the driver uses the regular warning checking code path. Since we don't support a warning that is DefaultIgnore in one language but not in another, this patch creates a dummy C only warning in the same group as the existing one to get the desired effect. llvm-svn: 194097
* Teach Clang to accept and ignore -f[no-]implicit-templates.Chandler Carruth2013-10-241-0/+1
| | | | | | | | | | | | | | | | This GCC flag is useful when you want to control whether implicit template instantiation occurs at the commandline level. Clang doesn't currently support such controls, but technically *always* implicitly instantiating (what Clang does, and what every other compiler still in use does by default) is valid behavior even under -fno-implicit-templates, it just may be slow and very wasteful. If people really want this, we can try to implement it, but I don't have an actual use. This should help fix the build of libstdc++ with Clang, its build system uses this flag. llvm-svn: 193319
* Teach Clang to recognize and ignore GCC's -fdiagnostics-show-locationChandler Carruth2013-10-241-0/+1
| | | | | | | | | flag. We should probably wire at least some variants of this up to our actual diagnostics engine, but I'm leaving that for someone else. This fixes the builds of packages which hard code something here, at least including libstdc++ itself. llvm-svn: 193318
* Ignore -fstrength-reduce and -fno-strength-reduce.Rafael Espindola2013-10-211-0/+1
| | | | | | GCC does the same. llvm-svn: 193103
* Don't complain about -fuse-ld=gold (cf r191429).Nico Weber2013-10-031-0/+1
| | | | | | (There's a real implementation for this flag in review.) llvm-svn: 191926
* Fix the test in clang_f_opts.c to fail on unknown options.Rafael Espindola2013-10-031-1/+2
| | | | | | Also fix options that were broken in the previous refactorings. llvm-svn: 191925
* Add -fno-unsigned-char and ignore it. We already support -fno-signed-char, addNick Lewycky2013-09-271-0/+2
| | | | | | both flags to the driver test. llvm-svn: 191486
* [driver] Ignore -fno-var-tracking; it's a GCC option we don't support.Jordan Rose2013-09-261-0/+1
| | | | | | | -fvar-tracking (which IIUC is on by default in GCC) will still generate an error. llvm-svn: 191439
* Remove fno_builtin_strcat and fno_builtin_strcpy.Rafael Espindola2013-09-261-1/+2
| | | | | | | They are already handled by the generic fno_bultin_, which also avoids unused warnings. llvm-svn: 191437
* Ignore unknown -fno-builtin-*.Rafael Espindola2013-09-261-0/+1
| | | | | | This matches gcc's behavior. llvm-svn: 191434
* Ignore some -f options that are supported by gcc.Rafael Espindola2013-09-261-0/+23
| | | | | | | It is possible that we should say some of these are unsupported, but this is not any worse than the old behavior of ignoring all unknown -f options. llvm-svn: 191429
* Tweak implementation of -Wwrite-strings to better match the behavior of ↵Richard Smith2013-09-041-1/+1
| | | | | | | | | | | | | | | | current GCCs: * In C, as before, if the "warning flag" is enabled, warnings are produced by forcing string literals to have const-qualified types (the produced warnings are *not* -Wwrite-strings warnings). However, more recent GCCs (at least 4.4 onwards) now take -w into account here, so we now do the same. * In C++, this flag is entirely sane: it behaves just like any other warning flag. Stop triggering -fconst-strings here. This is a bit cleaner, but there's no real functionality change except in the case where -Xclang -fno-const-strings is also specified. llvm-svn: 190006
* Revert r189440 - Disable loop vectorizer unrolling when no unrolling requestedHal Finkel2013-08-281-3/+0
| | | | | | | | | | | | | | | | | | | | | As Chandler pointed out, we should not be using -backend-option because this will cause crashes for users of the tooling interface, etc. A better way to fix this will be to provide the unrolling pass-manager flag to the loop vectorizer directly. Original commit message: Disable loop vectorizer unrolling when no unrolling requested In addition to the regular loop unrolling transformation, the loop vectorizer can also unroll loops. If no unrolling has specifically been requested (by -fno-unroll-loops), and the loop vectorizer will be used, then add the backend option to (also) prevent the loop vectorizer from unrolling loops. I confirmed with Nadav (off list) that disabling vectorizer loop unrolling when -fno-unroll-loops is provided is the desired behavior. llvm-svn: 189441
* Disable loop vectorizer unrolling when no unrolling requestedHal Finkel2013-08-281-0/+3
| | | | | | | | | | | | In addition to the regular loop unrolling transformation, the loop vectorizer can also unroll loops. If no unrolling has specifically been requested (by -fno-unroll-loops), and the loop vectorizer will be used, then add the backend option to (also) prevent the loop vectorizer from unrolling loops. I confirmed with Nadav (off list) that disabling vectorizer loop unrolling when -fno-unroll-loops is provided is the desired behavior. llvm-svn: 189440
* Warn that -O4 is the same as -O3.Rafael Espindola2013-08-271-0/+1
| | | | | | | We error on -O5 and higher. While it is tempting to do the same for -O4, I agree with Jordan Rose: we should warn for a release at least first. llvm-svn: 189369
* Don't imply -flto with -O4.Rafael Espindola2013-08-231-1/+3
| | | | | | We now saturate at -O3. llvm-svn: 189149
* Move logic to enable the vectorizer to clangArnold Schwaighofer2013-08-131-0/+12
| | | | | | | | | | | | | | | | | We used to decide whether to really vectorize depending on the optimization level in PassManagerBuilder. This patch moves this decision to the clang driver. We look at the optimization level and whether the f(no-)vectorize is set and decide whether to vectorize. This allows us to simplify the logic in PassManagerBuilder to just a check for whether the vectorizer should run or not. We now do the right thing for: $ clang -O1 -fvectorize $ clang -fno-vectorize -O3 llvm-svn: 188280
* The only useful loop unrolling flag to give realistically isChandler Carruth2013-08-081-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | '-fno-unroll-loops'. The option to the backend is even called 'DisableUnrollLoops'. This is precisely the form that Clang *didn't* support. We didn't recognize the flag, we didn't pass it to the CC1 layer, and even if we did we wouldn't use it. Clang only inspected the positive form of the flag, and only did so to enable loop unrolling when the optimization level wasn't high enough. This only occurs for an optimization level that even has a chance of running the loop unroller when optimizing for size. This commit wires up the 'no' variant, and switches the code to actually follow the standard flag pattern of using the last flag and allowing a flag in either direction to override the default. I think this is still wrong. I don't know why we disable the loop unroller entirely *from Clang* when optimizing for size, as the loop unrolling pass *already has special logic* for the case where the function is attributed as optimized for size! We should really be trusting that. Maybe in a follow-up patch, I don't really want to change behavior here. llvm-svn: 187969
* Make -m[no-]pascal-strings an alias of -f[no]pascal-strings in the .td fileHans Wennborg2013-07-311-0/+6
| | | | | | | | This way we don't have to translate it manually in Clang::ConstructJob. Differential Revision: http://llvm-reviews.chandlerc.com/D1249 llvm-svn: 187547
* Add a new flag -vectorize-slp-aggressive to enable Hals BB vectorizer.Nadav Rotem2013-04-151-0/+7
| | | | llvm-svn: 179507
* Rename the slp-vectorizer clang/llvm flags. No functionality change.Nadav Rotem2013-04-151-2/+2
| | | | llvm-svn: 179506
* Plumb through the -fsplit-stack option using the existing backendEric Christopher2013-04-041-1/+2
| | | | | | | | | support. Caveat: Other than the existing segmented stacks support, no claims are made of this working. llvm-svn: 178744
* Accept and ignore the -fextended-identifiers option.Jordan Rose2013-02-061-0/+6
| | | | | | | | | | | | This was GCC's option to turn on UCN support, which we always have on now in C99 and C++ modes. Additionally, mark the -fno-extended-identifiers option as unsupported, since we don't support disabling UCNs in C99 and C++ modes. PR11538 llvm-svn: 174530
* [ms-inline asm] Remove the -fenable-experimental-ms-inline-asm flag. MS-styleChad Rosier2013-01-221-3/+0
| | | | | | inline assembly can be enable with -fasm-blocks or -fms-extensions alone. llvm-svn: 173186
* Fix the fvectorize testcaseNadav Rotem2012-12-181-8/+4
| | | | llvm-svn: 170469
* Add -fslp-vectorize to enable bb-vectorizeHal Finkel2012-12-111-0/+13
| | | | | | | | | | | Add -fslp-vectorize (with -ftree-slp-vectorize as an alias for gcc compatibility) to provide a way to enable the basic-block vectorization pass. This uses the same acronym as gcc, superword-level parallelism (SLP), also common in the literature, to refer to basic-block vectorization. Nadav suggested this as a follow-up to the adding of -fvectorize. llvm-svn: 169909
* [driver] Add the -ftree-vectorize flag as a alias of -fvectorize to maintainChad Rosier2012-12-111-0/+4
| | | | | | | compatibility with gcc. rdar://12839978 llvm-svn: 169888
* [driver] Add the -fvectorize flag to enable the loop vectorization passes.Chad Rosier2012-12-111-0/+9
| | | | | | rdar://12839978 llvm-svn: 169885
* Rename -fms-inline-asm to -fenable-experimental-ms-inline-asm.Chad Rosier2012-07-201-2/+2
| | | | llvm-svn: 160590
* Add a new flag, -fms-inline-asm, that enables the output of MS-style inlineChad Rosier2012-07-201-0/+3
| | | | | | | | | | | assembly. By default, we don't emit IR for MS-style inline assembly (see r158833 as to why). This is strictly for testing purposes and should not be enabled with the expectation that things will work. This is a temporary flag and will be removed once MS-style inline assembly is fully supported. llvm-svn: 160573
* Add -ffp-contract = { fast | on | off } command line option support.Lang Hames2012-07-061-0/+6
| | | | | | | | | | | | | | | | | This flag sets the 'fp-contract' mode, which controls the formation of fused floating point operations. Available modes are: - Fast: Form fused operations anywhere. - On: Form fused operations where allowed by FP_CONTRACT. This is the default mode. - Off: Don't form fused operations (in future this may be relaxed to forming fused operations where it can be proved that the result won't be affected). Currently clang doesn't support the FP_CONTRACT pragma, so the 'On' and 'Off' modes are equivalent. llvm-svn: 159794
* Move all of the logic for __DEPRECATED to the driver based on commentsChandler Carruth2011-04-231-7/+9
| | | | | | from dgregor. llvm-svn: 130066
* Fix Clang's __DEPRECATED define to be controled by -Wdeprecated. ThisChandler Carruth2011-04-231-0/+8
| | | | | | | | | | | | | | | | | | matches GCC behavior which libstdc++ uses to limit #warning-based messages about deprecation. The machinery involves threading this through a new '-fdeprecated-macro' flag for CC1. The flag defaults to "on", similarly to -Wdeprecated. We turn the flag off in the driver when the warning is turned off (modulo matching some GCC bugs). We record this as a language option, and key the preprocessor on the option when introducing the define. A separate flag rather than a '-D' flag allows us to properly represent the difference between C and C++ builds (only C++ receives the define), and it allows the specific behavior of following -Wdeprecated without potentially impacting the set of user-provided macro flags. llvm-svn: 130055
* There were some frustrating problems with the implementation ofChandler Carruth2011-04-231-0/+7
| | | | | | | | | | | | | | | | | | | | -Wwrite-strings. First and foremost, once the positive form of the flag was passed, it could never be disabled by passing -Wno-write-strings. Also, the diagnostic engine couldn't in turn use -Wwrite-strings to control diagnostics (as GCC does) because it was essentially hijacked to drive the language semantics. Fix this by giving CC1 a clean '-fconst-strings' flag to enable const-qualified strings in C and ObjC compilations. Corresponding '-fno-const-strings' is also added. Then the driver is taught to introduce '-fconst-strings' in the CC1 command when '-Wwrite-strings' dominates. This entire flag is basically GCC-bug-compatibility driven, so we also match GCC's bug where '-w' doesn't actually disable -Wwrite-strings. I'm open to changing this though as it seems insane. llvm-svn: 130051
* Implement -fshort-enums (rdar://8490496).Argyrios Kyrtzidis2010-10-081-4/+2
| | | | llvm-svn: 116020
* Daniel re-educated me about what Alias does and does not do. Turn that off forChandler Carruth2010-05-221-2/+4
| | | | | | | | '-fasm' and explicitly map from that flag to -fgnu-keywords in the driver. Turn off the driver in the lexer test for this madness and add a test to the driver that the translation actually works. llvm-svn: 104428
* Use -fno-math-errno by default, and remove the IsMathErrnoDefaultDan Gohman2010-01-081-3/+3
| | | | | | targethook, which is no longer being used. This fixes PR5971. llvm-svn: 92987
* Update tests to use %clang instead of 'clang', and forcibly disable use of 'Daniel Dunbar2009-12-151-3/+3
| | | | | | | clang ' or ' clang -cc1 ' or ' clang-cc ' in test lines (by substituting them to garbage). llvm-svn: 91460
* Tests: Fix some bugs in clang_f_opts, options were out of order but it workedDaniel Dunbar2009-12-131-5/+5
| | | | | | because it had two inputs, except on Win32 where /dev/null doesn't exist. llvm-svn: 91235
* Convert the remainder of this test case over to using FileCheck.Ted Kremenek2009-12-121-9/+11
| | | | llvm-svn: 91194
* Make using '-fshort-enums' an error until it is actually implemented ↵Ted Kremenek2009-12-121-0/+3
| | | | | | (changes the ABI, so it is dangerous to not error out if we don't support it). Fixes <rdar://problem/7461006>. llvm-svn: 91191
* Switch -f{builtin,math-errno,rtti} and -analyzer-purge-dead to -...no... ↵Daniel Dunbar2009-11-191-3/+2
| | | | | | variants instead of using llvm::cl::init(true) arguments. llvm-svn: 89315
* Add -fblocks, -stack-protector, and -fobjc-nonfragile-abi defaulting to driver,Daniel Dunbar2009-11-171-1/+0
| | | | | | | instead of using getDefaultLangOptions. - Remove unused -fobjc-tight-layout while at it. llvm-svn: 89065
* Remove RUN: true lines.Daniel Dunbar2009-11-081-1/+0
| | | | llvm-svn: 86432
* Eliminate &&s in tests.Daniel Dunbar2009-11-081-11/+11
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. llvm-svn: 86430
* Adding -fshort-wchar option.John Thompson2009-11-051-1/+2
| | | | llvm-svn: 86167
* PR4016: Forward -fno-show-source-location to clang.Daniel Dunbar2009-06-081-1/+2
| | | | llvm-svn: 73082
* Driver: Fix forwarding of -fpascal-strings.Daniel Dunbar2009-04-071-0/+10
llvm-svn: 68570
OpenPOWER on IntegriCloud