summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* [Cygwin] Abandon Cygwin-1.5 and g++-3. Use g++-4.3 and higher on Cygwin-1.7.NAKAMURA Takumi2012-01-211-2/+0
| | | | llvm-svn: 148636
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-2/+0
| | | | llvm-svn: 148577
* Extract the (InputKind, std::string) pair used to describe inputs toDouglas Gregor2012-01-208-69/+61
| | | | | | | the front end into its own class, FrontendInputFile, to make it easier to introduce new per-input data. No functionality change. llvm-svn: 148546
* Refactor: Pull getImmediateMacroName() out of DiagnosticRenderer andAnna Zaks2012-01-181-30/+1
| | | | | | into Lexer and Preprocessor; making it widely available. llvm-svn: 148410
* [libclang] Make sure Preprocessor is set in ASTUnit during indexing.Argyrios Kyrtzidis2012-01-171-0/+2
| | | | llvm-svn: 148319
* Treat -Wformat=0 as an alias for -Wformat.Hans Wennborg2012-01-171-0/+4
| | | | | | Fixes PR9195. llvm-svn: 148300
* Remove unnecessary default cases in switches over enums.David Blaikie2012-01-173-5/+3
| | | | | | This allows -Wswitch-enum to find switches that need updating when these enums are modified. llvm-svn: 148281
* Some improvements to the handling of C11 atomic types:David Chisnall2012-01-161-0/+8
| | | | | | | | | | | | | | | | | | - Add atomic-to/from-nonatomic cast types - Emit atomic operations for arithmetic on atomic types - Emit non-atomic stores for initialisation of atomic types, but atomic stores and loads for every other store / load - Add a __atomic_init() intrinsic which does a non-atomic store to an _Atomic() type. This is needed for the corresponding C11 stdatomic.h function. - Enables the relevant __has_feature() checks. The feature isn't 100% complete yet, but it's done enough that we want people testing it. Still to do: - Make the arithmetic operations on atomic types (e.g. Atomic(int) foo = 1; foo++;) use the correct LLVM intrinsic if one exists, not a loop with a cmpxchg. - Add a signal fence builtin - Properly set the fenv state in atomic operations on floating point values - Correctly handle things like _Atomic(_Complex double) which are too large for an atomic cmpxchg on some platforms (this requires working out what 'correctly' means in this context) - Fix the many remaining corner cases llvm-svn: 148242
* When loading an AST file, set SourceManager::MainFileID to the main file of ↵Argyrios Kyrtzidis2012-01-051-10/+1
| | | | | | | | the AST file, as suggested by Tom Honermann. llvm-svn: 147612
* When generating includes for all of the headers we found in anDouglas Gregor2012-01-051-3/+13
| | | | | | | umbrella directory, skip includes for any headers that are part of an unavailable module. llvm-svn: 147572
* Store the submodules of a module in source order, as they are storedDouglas Gregor2012-01-042-16/+17
| | | | | | | | in the module map. This provides a bit more predictability for the user, as well as eliminating the need to sort the submodules when serializing them. llvm-svn: 147564
* Add a "Modules" language option, which subsumes the previousDouglas Gregor2012-01-032-5/+3
| | | | | | "AutoModuleImport" preprocessor option and is tied to -fmodules. llvm-svn: 147448
* Rename the command-line option for mapping #include/#import over toDouglas Gregor2012-01-031-1/+1
| | | | | | | | module imports from -fauto-module-import to -fmodules. The new name will eventually be used to enable modules, and the #include/#import mapping is a crucial part of the feature. llvm-svn: 147447
* Teach the frontend to provide the builtin preprocessor defines forChandler Carruth2012-01-031-0/+3
| | | | | | -ffast-math. llvm-svn: 147440
* Fix PR11685 by implementing -ffast-math and its various friends in theChandler Carruth2012-01-021-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Eliminate ObjCForwardProtocolDecl, which is redundant now thatDouglas Gregor2012-01-011-11/+1
| | | | | | ObjCProtocolDecl modules forward declarations properly. llvm-svn: 147415
* Implement support for module requirements, which indicate the languageDouglas Gregor2011-12-313-3/+32
| | | | | | | | | features needed for a particular module to be available. This allows mixed-language modules, where certain headers only work under some language variants (e.g., in C++, std.tuple might only be available in C++11 mode). llvm-svn: 147387
* Add a target hook for FLT_EVAL_METHOD and use it to set the value on x86 ↵Benjamin Kramer2011-12-281-1/+1
| | | | | | | | | with sse disabled. x87 math evaluates everything with 80 bits precision, so we have to set FLT_EVAL_METHOD to "2". llvm-svn: 147311
* Eliminate ObjCClassDecl, which is redundant now that ObjCInterfaceDeclDouglas Gregor2011-12-271-5/+0
| | | | | | | covers both declarations (@class) and definitions (@interface) of an Objective-C class. llvm-svn: 147299
* Remove unused variables.Rafael Espindola2011-12-251-1/+1
| | | | llvm-svn: 147260
* Give C11's __STDC_VERSION__ the final value.Benjamin Kramer2011-12-231-4/+1
| | | | llvm-svn: 147222
* Mass rename C1x references to C11. The name hasn't proliferated like "C++0x" ↵Benjamin Kramer2011-12-232-2/+2
| | | | | | | | so this patch is surprisingly small. Also drop -Wc1x-extensions in favor of -Wc11-extensions. I don't think we need to keep this around for compatibility. llvm-svn: 147221
* Let CompilerInvocation initialization indicate failureDylan Noblesmith2011-12-232-33/+66
| | | | | | | | | This fixes the FIXMEs in ParseAnalyzeArgs. (Also a precursor to moving the analyzer into an AST plugin.) For consistency, do the same with AssemblerInvocation. llvm-svn: 147218
* remove unneeded config.h includesDylan Noblesmith2011-12-221-1/+0
| | | | llvm-svn: 147195
* Update the CMake build for r146959's new files.Chandler Carruth2011-12-201-0/+1
| | | | llvm-svn: 146967
* Unweaken vtables as per ↵David Blaikie2011-12-202-0/+16
| | | | | | http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146959
* Detect when mapping a #include/#import over to a submodule ends upDouglas Gregor2011-12-201-2/+16
| | | | | | | | | | | | | hitting a submodule that was never actually created, e.g., because that header wasn't parsed. In such cases, complain (because the module's umbrella headers don't cover everything) and fall back to including the header. Later, we'll add a warning at module-build time to catch all such cases. However, this fallback is important to eliminate assertions in the ASTWriter when this happens. llvm-svn: 146933
* Frontend/VerifyDiagnosticConsumer.cpp: Fix an expression that had side-effect.NAKAMURA Takumi2011-12-171-4/+4
| | | | | | | | | It had been causing test "Misc/diag-verify.cpp" failure on ms cl.exe. The emission was ordered unexpectedly as below; First) error: 'error' diagnostics seen but not expected: Second) error: 'error' diagnostics expected but not seen: llvm-svn: 146830
* Refactor SerializeDiagnosticsPrinter to using DiagnosticRenderer. This ↵Ted Kremenek2011-12-172-72/+187
| | | | | | | | | | gives us comparative diagnostics to TextDiagnosticPrinter. This certainly can be cleaned up a bit. llvm-svn: 146820
* Refactor 'TextDiagnostic' to have a parent class 'DiagnosticRenderer' which ↵Ted Kremenek2011-12-173-260/+322
| | | | | | | | | | | | handles the policy of how diagnostics are lowered/rendered, while TextDiagnostic handles the actual pretty-printing. This is a first part of reworking SerializedDiagnosticPrinter to use the same inclusion-stack/macro-expansion logic as TextDiagnostic. llvm-svn: 146819
* C++11 constexpr: Add note stacks containing backtraces if constant evaluationRichard Smith2011-12-162-0/+11
| | | | | | | | | | fails within a call to a constexpr function. Add -fconstexpr-backtrace-limit argument to driver and frontend, to control the maximum number of notes so produced (default 10). Fix APValue printing to be able to pretty-print all APValue types, and move the testing for this functionality from a unittest to a -verify test now that it's visible in clang's output. llvm-svn: 146749
* Fixup to the relaxed diagnostic verification option r146633.Anna Zaks2011-12-161-2/+4
| | | | | | | We should exit when matching the '+' even if nothing was found to prevent searching for all UNIT_MAX items. llvm-svn: 146747
* Revert r146646 that was a mistake, and make the intended change in the right ↵Argyrios Kyrtzidis2011-12-151-3/+0
| | | | | | | | | file. Log: [libclang] Try to unbreak mingw build. llvm-svn: 146647
* [libclang] Try to unbreak mingw build.Argyrios Kyrtzidis2011-12-151-0/+3
| | | | llvm-svn: 146646
* <climits> has UINT_MAX, not <limits>.Eli Friedman2011-12-151-1/+1
| | | | llvm-svn: 146638
* Another fixit for r146633 (to make debian-fnt bot happy), try including ↵Anna Zaks2011-12-151-1/+1
| | | | | | limits instead. llvm-svn: 146637
* Fixit for r146633. Make sure UINT_MAX is defined on all platforms.Anna Zaks2011-12-151-0/+2
| | | | | | (Attempt to turn debian-fnt buildbot back to green.) llvm-svn: 146635
* Add support for matching one or more (aka regex +) diagnostic messages with ↵Anna Zaks2011-12-151-1/+14
| | | | | | | | | -verify. Ex: // expected-warning + {{tainted} llvm-svn: 146633
* Modify how the -verify flag works. Currently, the verification string andRichard Trieu2011-12-151-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | diagnostic message are compared. If either is a substring of the other, then no error is given. This gives rise to an unexpected case: // expect-error{{candidate function has different number of parameters}} will match the following error messages from Clang: candidate function has different number of parameters (expected 1 but has 2) candidate function has different number of parameters It will also match these other error messages: candidate function function has different number of parameters number of parameters This patch will change so that the verification string must be a substring of the diagnostic message before accepting. Also, all the failing tests from this change have been corrected. Some stats from this cleanup: 87 - removed extra spaces around verification strings 70 - wording updates to diagnostics 40 - extra leading or trailing characters (typos, unmatched parens or quotes) 35 - diagnostic level was included (error:, warning:, or note:) 18 - flag name put in the warning (-Wprotocol) llvm-svn: 146619
* Per discussion on the list, remove BitcodeVerify pass to reimplement as a ↵Chad Rosier2011-12-141-3/+0
| | | | | | free function. llvm-svn: 146530
* Add frontend flags to enable bitcode verifier pass.Chad Rosier2011-12-121-0/+3
| | | | llvm-svn: 146441
* Hexagon backend supportTony Linthicum2011-12-121-0/+1
| | | | llvm-svn: 146413
* When we have an umbrella directory in a module map, recursively walkDouglas Gregor2011-12-121-1/+2
| | | | | | the subdirectories to find headers in submodules. llvm-svn: 146398
* Driver: Handle -f{no-}honor-infinities, -f{no-}honor-nans, andDaniel Dunbar2011-12-091-2/+10
| | | | | | | | -ffinite-math-only. - No test case yet, I don't know how to construct a situation where this matters. llvm-svn: 146297
* Move ChainedIncludesSource into the Frontend library. This never reallyChandler Carruth2011-12-093-1/+242
| | | | | | | | | | belonged in the Serialization library, it's setting up a compilation, not just deserializing. This should fix PR11512, making Serialization actually be layered below Frontend, a long standing layering violation in Clang. llvm-svn: 146233
* Move a free function from the Frontend library into the Lex library asChandler Carruth2011-12-091-24/+5
| | | | | | | | part of HeaderSearch. This function just normalizes filenames for use inside of a synthetic include directive, but it is used in both the Frontend and Serialization libraries so it needs a common home. llvm-svn: 146227
* Implement umbrella directories for modules, which are similar toDouglas Gregor2011-12-081-0/+23
| | | | | | | | | | | | | | | umbrella headers in the sense that all of the headers within that directory (and eventually its subdirectories) are considered to be part of the module with that umbrella directory. However, unlike umbrella headers, which are expected to include all of the headers within their subdirectories, Clang will automatically include all of the headers it finds in the named subdirectory. The intent here is to allow a module map to trivially turn a subdirectory into a module, where the module's structure can mimic the directory structure. llvm-svn: 146165
* Within the module representation, generalize the notion of an umbrellaDouglas Gregor2011-12-081-15/+20
| | | | | | | | | | header to also support umbrella directories. The umbrella directory for an umbrella header is the directory in which the umbrella header resides. No functionality change yet, but it's coming. llvm-svn: 146158
* Keep track of import dependencies between submodules within the moduleDouglas Gregor2011-12-081-8/+13
| | | | | | | that's currently being built. This is important for supporting transitive dependencies ("export *" in the module map) completely. llvm-svn: 146156
* Make changes to SDiagsWriter to make it work in combination with the ARC ↵Argyrios Kyrtzidis2011-12-072-30/+33
| | | | | | | | | | | | | migrator: -Allow it to be used with multiple BeginSourceFile/EndSourceFile calls; for this introduce a "finish" callback method in the DiagnosticConsumer. SDiagsWriter finishes up the serialization file inside this method. -Make it independent of any particular DiagnosticsEngine; make it use the SourceManager of the Diagnostic object. -Ignore null source ranges. llvm-svn: 146020
OpenPOWER on IntegriCloud