summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* If we can't write the temporary module map file when compiling aDouglas Gregor2011-12-071-1/+2
| | | | | | module, at least have the decency to complain about it. llvm-svn: 146002
* Add a FIXME to provide a sensible error message hereDouglas Gregor2011-12-061-2/+3
| | | | llvm-svn: 145983
* Use absolute paths for temporary module map filesDouglas Gregor2011-12-061-1/+1
| | | | llvm-svn: 145973
* When building the main file to parse given a module map, don't skipDouglas Gregor2011-12-061-19/+24
| | | | | | | | explicit submodules or umbrella headers from submodules. Instead, build the entire module at once, and let the name-hiding mechanisms hide the contents of explicit submodules at load time. llvm-svn: 145940
* Stack realignment is a tristate. Add -mno-stackrealign to turn off all stackNick Lewycky2011-12-061-1/+1
| | | | | | realignment, even with locals with alignment exceeding the ABI guarantee. llvm-svn: 145909
* Add -mstack-alignment=X and fix -mstackrealign handling now that theJoerg Sonnenberger2011-12-051-0/+5
| | | | | | backend options are gone. llvm-svn: 145868
* When we treat an #include or #import as a module import, create anDouglas Gregor2011-12-021-3/+13
| | | | | | | implicit ImportDecl in the translation unit to record the presence of the import. llvm-svn: 145727
* Introduce the notion of name visibility into modules. For a givenDouglas Gregor2011-12-011-3/+10
| | | | | | | | | | | | | | (sub)module, all of the names may be hidden, just the macro names may be exposed (for example, after the preprocessor has seen the import of the module but the parser has not), or all of the names may be exposed. Importing a module makes its names, and the names in any of its non-explicit submodules, visible to name lookup (transitively). This commit only introduces the notion of name visible and marks modules and submodules as visible when they are imported. The actual name-hiding logic in the AST reader will follow (along with test cases). llvm-svn: 145586
* Promote ModuleMap::Module to a namespace-scope class in the BasicDouglas Gregor2011-11-303-10/+10
| | | | | | | | | library, since modules cut across all of the libraries. Rename serialization::Module to serialization::ModuleFile to side-step the annoying naming conflict. Prune a bunch of ModuleMap.h includes that are no longer needed (most files only needed the Module type). llvm-svn: 145538
* Don't collide loop variable names (to appease GCC)Matt Beaumont-Gay2011-11-301-7/+6
| | | | llvm-svn: 145515
* Implement (de-)serialization of the description of a module and itsDouglas Gregor2011-11-301-26/+34
| | | | | | | | | submodules. This information will eventually be used for name hiding when dealing with submodules. For now, we only use it to ensure that the module "key" returned when loading a module will always be a module (rather than occasionally being a FileEntry). llvm-svn: 145497
* When writing a module file, pass the module through to the ASTDouglas Gregor2011-11-302-7/+5
| | | | | | writer. No functionality change. llvm-svn: 145479
* Teach the preprocessor how to handle module import declarations thatDouglas Gregor2011-11-301-0/+8
| | | | | | | involve submodules (e.g., importing std.vector), rather than always importing the top-level module. llvm-svn: 145478
* When loading a module that involves submodules (e.g., std.vector),Douglas Gregor2011-11-301-82/+150
| | | | | | | | | check whether the named submodules themselves are actually valid, and drill down to the named submodule (although we don't do anything with it yet). Perform typo correction on the submodule names when possible. llvm-svn: 145477
* Switch the module-loading interfaces and parser from a simpleDouglas Gregor2011-11-301-10/+14
| | | | | | | top-level module name to a module path (e.g., std.vector). We're still missing a number of pieces for this actually to do something. llvm-svn: 145462
* Eliminate the -emit-module option, which emitted a module by parsing aDouglas Gregor2011-11-292-4/+1
| | | | | | | source file (e.g., a header). Immediately steal this useful option name for building modules from a module map file. llvm-svn: 145444
* Switch on-demand module building over to use module maps, always. WhenDouglas Gregor2011-11-291-72/+46
| | | | | | | we infer the module map, we'll just print the module map to a temporary file and generate the module using that. llvm-svn: 145436
OpenPOWER on IntegriCloud