aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
AgeCommit message (Collapse)AuthorFilesLines
2013-02-07Rename -fmodule-cache-path <blah> to -fmodules-cache-path=<blah> for ↵Douglas Gregor1-1/+1
consistency. llvm-svn: 174645
2013-02-07Be a little more permissive with -fmodules-ignore-macro= by removing ↵Douglas Gregor1-9/+4
everything after the second '=' if it is there. llvm-svn: 174567
2013-02-07Introduce -fmodules-ignore-macro=NNN to ignore a macro when building/loading ↵Douglas Gregor1-2/+22
modules. The use of this flag enables a modules optimization where a given set of macros can be labeled as "ignored" by the modules system. Definitions of those macros will be completely ignored when building the module hash and will be stripped when actually building modules. The overall effect is that this flag can be used to drastically reduce the number of Eventually, we'll want modules to tell us what set of macros they respond to (the "configuration macros"), and anything not in that set will be excluded. However, that requires a lot of per-module information that must be accurate, whereas this option can be used more readily. Fixes the rest of <rdar://problem/13165109>. llvm-svn: 174560
2013-02-05[frontend] Don't put a PCH/PTH filename into the set of includes in the ↵Argyrios Kyrtzidis1-2/+1
preprocessor options; since only one of them is allowed in command-line, process them separately. Otherwise, if more than one is specified in the command-line, one is processed normally and the others are going to be treated and included as header files. Related to radar://13140508 llvm-svn: 174385
2013-01-30[analyzer] Make shallow mode more shallow.Anna Zaks1-1/+0
Redefine the shallow mode to inline all functions for which we have a definite definition (ipa=inlining). However, only inline functions that are up to 4 basic blocks large and cut the max exploded nodes generated per top level function in half. This makes shallow faster and allows us to keep inlining small functions. For example, we would keep inlining wrapper functions and constructors/destructors. With the new shallow, it takes 104s to analyze sqlite3, whereas the deep mode is 658s and previous shallow is 209s. llvm-svn: 173958
2013-01-30[analyzer] Use analyzer config for max-inlinable-size option.Anna Zaks1-3/+0
llvm-svn: 173957
2013-01-30Don't warn about Unicode characters in -E mode.Jordan Rose1-3/+43
People use the C preprocessor for things other than C files. Some of them have Unicode characters. We shouldn't warn about Unicode characters appearing outside of identifiers in this case. There's not currently a way for the preprocessor to tell if it's in -E mode, so I added a new flag, derived from the PreprocessorOutputOptions. This is only used by the Unicode warnings for now, but could conceivably be used by other warnings or even behavioral differences later. <rdar://problem/13107323> llvm-svn: 173881
2013-01-30[Frontend] Remove HeaderSearchOptions::Entry::IsInternal, which is unused.Daniel Dunbar1-2/+1
llvm-svn: 173866
2013-01-30[Frontend] Add an ExternCSystem include entry group.Daniel Dunbar1-4/+7
- The only group where it makes sense for the "ExternC" bit is System, so this simplifies having to have the extra isCXXAware (or ImplicitExternC, depending on what code you talk to) bit caried around. llvm-svn: 173859
2013-01-29[Frontend] Make the include dir group independent from the "use sysroot" bit.Daniel Dunbar1-5/+5
- This slightly decouples the path handling, since before the group sometimes dominated the "use sysroot" bit, but it was still passed in via the API. - No functionality change. llvm-svn: 173855
2013-01-29[ubsan] Implement the -fcatch-undefined-behavior flag using a trappingChad Rosier1-0/+2
implementation; this is much more inline with the original implementation (i.e., pre-ubsan) and does not require run-time library support. The trapping implementation can be invoked using either '-fcatch-undefined-behavior' or '-fsanitize=undefined-trap -fsanitize-undefined-trap-on-error', with the latter being preferred. Eventually, the -fcatch-undefined-behavior' flag will be removed. llvm-svn: 173848
2013-01-28Enable the global module index by default. Introduce theDouglas Gregor1-1/+1
-fno-modules-global-index -cc1 option to allow one to disable the index for performance testing purposes, but with a 10% win in -fsyntax-only time, there is no reason a user would do this. llvm-svn: 173707
2013-01-25[Frontend] Remove another IsUserSpecified member variable that is now unused.Daniel Dunbar1-14/+12
llvm-svn: 173412
2013-01-25[Frontend] The -iwithprefix option belongs in the After category, according toDaniel Dunbar1-2/+2
GCC docs. - Found by inspection. llvm-svn: 173410
2013-01-25Rename the -cc1 option "-generate-module-index" toDouglas Gregor1-1/+2
"-fmodules-global-index" and expand its behavior to include both the use and generation of the global module index. llvm-svn: 173404
2013-01-24[analyzer] Replace "-analyzer-ipa" with "-analyzer-config ipa".Anna Zaks1-16/+0
The idea is to eventually place all analyzer options under "analyzer-config". In addition, this lays the ground for introduction of a high-level analyzer mode option, which will influence the default setting for IPAMode. llvm-svn: 173385
2013-01-23Implement the writer side of the global module index. Douglas Gregor1-1/+2
The global module index is a "global" index for all of the module files within a particular subdirectory in the module cache, which keeps track of all of the "interesting" identifiers and selectors known in each of the module files. One can perform a fast lookup in the index to determine which module files will have more information about entities with a particular name/selector. This information can help eliminate redundant lookups into module files (a serious performance problem) and help with creating auto-import/auto-include Fix-Its. The global module index is created or updated at the end of a translation unit that has triggered a (re)build of a module by scraping all of the .pcm files out of the module cache subdirectory, so it catches everything. As with module rebuilds, we use the file system's atomicity to synchronize. llvm-svn: 173301
2013-01-23Add a new LangOpt NativeHalfType. This option allows for native half/fp16Joey Gouly1-0/+1
operations (as opposed to storage only half/fp16). Also add some semantic checks for OpenCL half types. llvm-svn: 173254
2013-01-22[ms-inline asm] Remove the -fenable-experimental-ms-inline-asm flag. MS-styleChad Rosier1-2/+0
inline assembly can be enable with -fasm-blocks or -fms-extensions alone. llvm-svn: 173186
2013-01-20Add top-level Clang flag -f(no-)sanitize-address-zero-base-shadow that makes ↵Alexey Samsonov1-1/+3
AddressSanitizer use bottom of the address space for the shadow memory. On Linux it can be used with -fPIE/-pie to improve performance. llvm-svn: 172974
2013-01-20Nuke SetUpBuildDumpLog.Sean Silva1-1/+0
Also, it was the only reason that `argc` and `argv` were being passed into createDiagnostics, so remove those parameters and clean up callers. llvm-svn: 172945
2013-01-18[ubsan] Add support for -fsanitize-blacklistWill Dietz1-1/+1
llvm-svn: 172808
2013-01-16Add -fmodules-autolink/-fno-modules-autolink (defaults to on) so thatDouglas Gregor1-0/+1
users can explicitly enable/disable modules autolinking. llvm-svn: 172592
2013-01-15Add -fopenmp -cc1 option and wire it up to define _OPENMP, from Alexey Bataev!Douglas Gregor1-0/+3
llvm-svn: 172509
2013-01-12Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko1-2/+2
brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
2013-01-02s/CPlusPlus0x/CPlusPlus11/gRichard Smith1-1/+1
llvm-svn: 171367
2012-12-30[ubsan] Recover by default, use -fno-sanitize-recover to disable.Will Dietz1-1/+1
llvm-svn: 171264
2012-12-24Support -fsanitize-memory-track-origins.Evgeniy Stepanov1-0/+2
llvm-svn: 171020
2012-12-21Sort the includes according to the coding standard.Roman Divacky1-1/+1
llvm-svn: 170905
2012-12-21Remove duplicate includes.Roman Divacky1-1/+0
llvm-svn: 170903
2012-12-05[driver, ms-inline asm] -fms-compatibility enables -fms-extensions, so this ↵Chad Rosier1-1/+1
should enable the AsmBlocks language extension as well. rdar://12808010 llvm-svn: 169448
2012-12-05[driver, ms-inline asm] Have -fms-extensions enable the AsmBlocks languageChad Rosier1-1/+1
option. MS-style inline asm can now be enabled by either -fasm-blocks or -fms-extensions. rdar://12808010 llvm-svn: 169445
2012-12-05[driver, ms-inline asm] MS-Style inline assembly is controlled by theChad Rosier1-0/+1
-fasm-blocks flag, not the -fms-extensions flag. rdar://12808010 llvm-svn: 169422
2012-12-04Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth1-3/+3
uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
2012-12-03Add Clang flags -fsanitize-blacklist and -fno-sanitize-blacklist. Make this ↵Alexey Samsonov1-0/+1
flag usable for ASan. Blacklisting can be used to disable sanitizer checks for particular file/function/object. llvm-svn: 169144
2012-12-02[ubsan] Add flag to enable recovery from checks when possible.Will Dietz1-0/+1
llvm-svn: 169114
2012-11-23PR14306: Move -fbounds-checking to -fsanitize=bounds.Joey Gouly1-2/+0
llvm-svn: 168510
2012-11-15block extended signatur option. Change previous optionFariborz Jahanian1-2/+2
to a cc1 -fencode-extended-block-signature and pass it to cc1 and recognize this option to produce extended block type signature. // rdar://12109031 llvm-svn: 168063
2012-11-15Make -ffp-contract a codegen option, rather than a laguage option. This makesLang Hames1-12/+12
more sense anyway - it determines how expressions are codegen'd. It also ensures that -ffp-contract=fast has the intended effect when compiling LLVM IR. llvm-svn: 168027
2012-11-14Add -cc1 option -fno-diagnostics-use-presumed-location, a handy mode forRichard Smith1-0/+1
working with preprocessed testcases. This causes source locations in diagnostics to point at the spelling location instead of the presumed location, while still keeping the semantic effects of the line directives (entering and leaving system-header mode, primarily). llvm-svn: 168004
2012-11-14objective-C blocks: under cc1 flag -encode-extended-block-signature,Fariborz Jahanian1-0/+2
generate expanded signature encoding to include types as we already do this for protocol method lists. // rdar://12109031 llvm-svn: 167997
2012-11-11s/BCPLComment/LineComment/Nico Weber1-1/+1
llvm-svn: 167690
2012-11-09Implement -mstrict-align using '-backend-option -arm-strict-align' as this savesChad Rosier1-1/+0
us from having to make any backend changes. llvm-svn: 167623
2012-11-09[driver] Add a -mstrict-align compiler option for ARM targets.Chad Rosier1-0/+1
rdar://12340498 llvm-svn: 167619
2012-11-05Split the instrinsic header wmmintrin.h into AES and PCLMUL parts, soDouglas Gregor1-1/+1
that we can model them as separate submodules. llvm-svn: 167420
2012-11-05Use the individual -fsanitize=<...> arguments to control which of the UBSanRichard Smith1-3/+0
checks to enable. Remove frontend support for -fcatch-undefined-behavior, -faddress-sanitizer and -fthread-sanitizer now that they don't do anything. llvm-svn: 167413
2012-11-05Add -fsanitize=<sanitizers> argument to driver and frontend, and addRichard Smith1-0/+31
-fno-sanitize=<sanitizers> argument to driver. These allow ASan, TSan, and the various UBSan checks to be enabled and disabled separately. Right now, the different modes can't be combined, but the intention is that combining UBSan and the other sanitizers will be permitted in the near future. Currently, the UBSan checks will all be enabled if any of them is; that will be fixed by the next patch. llvm-svn: 167411
2012-11-05Rename LangOptions members for address sanitizer and thread sanitizer fromRichard Smith1-2/+2
*Sanitizer to Sanitize* in preparation for later patches. llvm-svn: 167405
2012-11-05Hash the various compiler version, target, preprocessor, andDouglas Gregor1-34/+31
header-search options into the module hash. We're just using ADT/Hashing.hpp for this, which isn't as cryptographically strong as I'd like, but it'll do. If someone contributes (say) and MD4 implementation, we'd happily switch to that. llvm-svn: 167397
2012-11-01Remove first argument from Arg::getValue; it's been unused since r105760.Richard Smith1-55/+55
llvm-svn: 167211