summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* Reverted back the changes made in 166868 and in 166869Mahesha S2012-10-271-3/+0
| | | | llvm-svn: 166871
* -------------------------------------------------Mahesha S2012-10-271-0/+3
| | | | | | | | | | | | | | | | | | | | Feature: OpenMP support in CLANG: Sub-Feature: Support for option -fopenmp Files Changed/Added: * include/clang/Driver/Options.td (C) * include/clang/Basic/LangOptions.def (C) * lib/Driver/Tools.cpp (C) * lib/Frontend/CompilerInvocation.cpp (C) Test Cases Changed/Added: * test/Driver/clang_fopenmp_opt.c (A) ------------------------------------------------- llvm-svn: 166868
* ASTUnit doesn't actually care about the predefines; don't record them.Douglas Gregor2012-10-251-18/+2
| | | | llvm-svn: 166650
* Teach the PCH validator to check the preprocessor options, especiallyDouglas Gregor2012-10-241-1/+2
| | | | | | | | | | | | | | | the macros that are #define'd or #undef'd on the command line. This checking happens much earlier than the current macro-definition checking and is far cleaner, because it does a direct comparison rather than a diff of the predefines buffers. Moreover, it allows us to use the result of this check to skip over PCH files within a directory that have non-matching -D's or -U's on the command line. Finally, it improves the diagnostics a bit for mismatches, fixing <rdar://problem/8612222>. The old predefines-buffer diff'ing will go away in a subsequent commit. llvm-svn: 166641
* Teach the preprocessor to hold onto the preprocessor options.Douglas Gregor2012-10-242-2/+5
| | | | llvm-svn: 166599
* Move PreprocessorOptions into the Lex library, and make it intrusivelyDouglas Gregor2012-10-242-3/+5
| | | | | | reference-counted. llvm-svn: 166587
* Move HeaderSearchOptions into the Lex library, make it intrusivelyDouglas Gregor2012-10-244-5/+11
| | | | | | reference-counted, and hold a reference to it in HeaderSearch. llvm-svn: 166583
* [analyzer] Replace -analyzer-no-eagerly-trim-egraph with graph-trim-interval.Jordan Rose2012-10-231-1/+0
| | | | | | | | | | | | | After every 1000 CFGElements processed, the ExplodedGraph trims out nodes that satisfy a number of criteria for being "boring" (single predecessor, single successor, and more). Rather than controlling this with a cc1 option, which can only disable this behavior, we now have an analyzer-config option, 'graph-trim-interval', which can change this interval from 1000 to something else. Setting the value to 0 disables reclamation. The next commit relies on this behavior to actually test anything. llvm-svn: 166528
* Use a .def file for most of the diagnostic options.Douglas Gregor2012-10-233-11/+10
| | | | llvm-svn: 166520
* Make DiagnosticOptions intrusively reference-counted, and make sureDouglas Gregor2012-10-2312-83/+88
| | | | | | | the various stakeholders bump up the reference count. In particular, the diagnostics engine now keeps the DiagnosticOptions object alive. llvm-svn: 166508
* Switch CodeGenOptions over to a .def file, like we do with LangOptions.Douglas Gregor2012-10-231-12/+16
| | | | llvm-svn: 166497
* If the precompiled header named by "-include" is actually a directory,Douglas Gregor2012-10-232-11/+45
| | | | | | | | | check each of the files within that directory to determine if any of them is an AST file that matches the language and target options. If so, the first matching AST file is loaded. This fixes a longstanding discrepency with GCC's precompiled header implementation. llvm-svn: 166469
* Handle implicitly-included PCH files the same way asDouglas Gregor2012-10-222-10/+17
| | | | | | | | implicitly-included PTH files during initialization, delaying the mapping down to the "original source file" until after later in the initialization process. llvm-svn: 166452
* Allow clients of the AST reader to specify what kinds of AST loadDouglas Gregor2012-10-223-7/+14
| | | | | | | | | | failures they know how to tolerate, e.g., out-of-date input files or configuration/version mismatches. Suppress the corresponding diagnostics if the client can handle it. No clients actually use this functionality, yet. llvm-svn: 166449
* Distinguish the various kinds of AST file loading failures:Douglas Gregor2012-10-223-4/+16
| | | | | | | | file corruption, compiler version mismatch, target/language configuration mismatch, out-of-date AST file. No functionality change yet. llvm-svn: 166446
* [Options] Add prefixes to options.Michael J. Spencer2012-10-221-2/+2
| | | | | | | | | | | | | | Each option has a set of prefixes. When matching an argument such as -funroll-loops. First the leading - is removed as it is a prefix. Then a lower_bound search for "funroll-loops" is done against the option table by option name. From there each option prefix + option name combination is tested against the argument. This allows us to support Microsoft style options where both / and - are valid prefixes. It also simplifies the cases we already have where options come in both - and -- forms. Almost every option for gnu-ld happens to have this form. llvm-svn: 166444
* [Options] Make Option non clang specific.Michael J. Spencer2012-10-191-1/+1
| | | | llvm-svn: 166348
* Change VerifyDiagnosticConsumer so that it *must* contain at least one ↵Andy Gibbs2012-10-191-6/+31
| | | | | | | | | | "expected-*" directive. As a result, for test-cases that are not expected to generate any diagnostics, an additional directive "expected-no-diagnostics" has been implemented which can then be included in such test-cases. This new directive may not be used in conjunction with any other "expected-*" directive. This change was initially proposed as a solution to the problem highlighted by check-in r164677, i.e. that -verify will not cause a test-case failure where the compile command does not actually reference the file. Patch reviewed by David Blaikie. llvm-svn: 166281
* Fix directive parsing in VerifyDiagnosticConsumer so that it ensures that ↵Andy Gibbs2012-10-191-5/+17
| | | | | | | | "expected" is at the start of the word and will no longer accept typos such as "junkexpected-*" as a valid "expected-*" directive. A very few test-cases had to be amended to adhere to the new rule. Patch reviewed by David Blaikie. llvm-svn: 166279
* Revert r166223 and the subsequent commits that depend on it, r166230 & r166235.Argyrios Kyrtzidis2012-10-181-1/+1
| | | | | | This seems to have introduced assertion hit when building compiler-rt. llvm-svn: 166245
* Add a new option for and disable column number information as thereEric Christopher2012-10-181-0/+3
| | | | | | | | | | are no known current users of column info. Robustify and fix up a few tests in the process. Reduces the size of debug information by a small amount. Part of PR14106 llvm-svn: 166236
* [Options] Make Option non clang specific.Michael J. Spencer2012-10-181-1/+1
| | | | llvm-svn: 166230
* Emit diagnostics in chunks even when we're trying to print colored template ↵Benjamin Kramer2012-10-181-12/+15
| | | | | | | | diffs. char-by-char is really slow on an unbuffered stream. llvm-svn: 166218
* Add -std=c++1y argument, for *highly* experimental C++14 support.Richard Smith2012-10-172-0/+3
| | | | llvm-svn: 166139
* Serialize TargetOptions into an AST file, and make sure that we keepDouglas Gregor2012-10-162-28/+18
| | | | | | | target options around so they can be accessed at any point (rather than keeping them transient). llvm-svn: 166072
* Teach TargetInfo to hold on to the TargetOptions with which it wasDouglas Gregor2012-10-151-4/+6
| | | | | | created. llvm-svn: 165943
* Make sure temporary files are deleted when recovering from a crash when ↵Benjamin Kramer2012-10-141-0/+1
| | | | | | compiling modules. llvm-svn: 165911
* Delete temporary output files when an error occurs during PCH reading.Benjamin Kramer2012-10-142-0/+2
| | | | | | | | This reduces the spam make test leaves behind in /tmp. The assert isn't particularly useful because it's not run with -disable-free (the default when using the clang driver) but should cover all -cc1 tests. llvm-svn: 165910
* [libclang] Improve AST serialization done by ASTUnit::Save().Argyrios Kyrtzidis2012-10-111-28/+64
| | | | | | | | | The ASTUnit needs to initialize an ASTWriter at the beginning of parsing to fully handle serialization of a translation unit that imports modules. Do this by introducing an option to enable it, which corresponds to CXTranslationUnit_ForSerialization on the C API side. llvm-svn: 165717
* When indexing a module file, for the ppIncludedFile callback giveArgyrios Kyrtzidis2012-10-101-5/+11
| | | | | | | an invalid location if the location points to the synthetic buffer for the module input. llvm-svn: 165592
* [modules] Consistently construct a buffer as input to build the module.Argyrios Kyrtzidis2012-10-101-82/+42
| | | | | | This means the main file for modules will always be a virtual one. llvm-svn: 165591
* Rework the (de-)serialization of macros, as stored inDouglas Gregor2012-10-093-1/+7
| | | | | | | | | | | | | | | | MacroInfo*. Instead of simply dumping an offset into the current file, give each macro definition a proper ID with all of the standard modules-remapping facilities. Additionally, when a macro is modified in a subsequent AST file (e.g., #undef'ing a macro loaded from another module or from a precompiled header), provide a macro update record rather than rewriting the entire macro definition. This gives us greater consistency with the way we handle declarations, and ties together macro definitions much more cleanly. Note that we're still not actually deserializing macro history (we never were), but it's far easy to do properly now. llvm-svn: 165560
* Don't emit double parentheses in __clang_version__.Benjamin Kramer2012-10-081-2/+2
| | | | | | PR14040. llvm-svn: 165415
* [Modules] Introduce Module::TopHeaders which is a set of top-level headersArgyrios Kyrtzidis2012-10-051-3/+8
| | | | | | that are associated with a (sub)module. llvm-svn: 165279
* [libclang] When indexing, invoke the importedASTFile for PCH files as well.Argyrios Kyrtzidis2012-10-031-0/+36
| | | | llvm-svn: 165161
* Introduce ASTConsumer::HandleImplicitImportDecl() callback that is invokedArgyrios Kyrtzidis2012-10-031-3/+6
| | | | | | when an ImportDecl that was implicitly created due to an inclusion directive. llvm-svn: 165084
* Some renames to use the 'visitor' nomenclature, no functionality change.Argyrios Kyrtzidis2012-10-031-1/+1
| | | | llvm-svn: 165083
* [libclang] When indexing an AST file, only deserialize the file levelArgyrios Kyrtzidis2012-10-021-0/+24
| | | | | | declarations of the current primary module. llvm-svn: 165046
* [libclang] When indexing an AST file, only deserialize the preprocessing recordArgyrios Kyrtzidis2012-10-021-0/+15
| | | | | | entities of the current primary module. llvm-svn: 165023
* For PPCallbacks::InclusionDirective() add a parameter for the module, wheneverArgyrios Kyrtzidis2012-09-292-4/+8
| | | | | | | an inclusion directive was automatically turned into a module import, and PPCallbacks::moduleImport() for an explicit module import. llvm-svn: 164874
* In the Module class, add a reference to the corresponding AST file.Argyrios Kyrtzidis2012-09-291-0/+3
| | | | llvm-svn: 164873
* Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. ↵Sylvestre Ledru2012-09-271-1/+1
| | | | | | See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164766 llvm-svn: 164769
* Fix a typo 'iff' => 'if'Sylvestre Ledru2012-09-271-1/+1
| | | | llvm-svn: 164766
* Per discussion in ↵Argyrios Kyrtzidis2012-09-272-4/+4
| | | | | | | | | | http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120917/064551.html have PPCallbacks::InclusionDirective pass the character range for the filename quotes or brackets. rdar://11113134 & http://llvm.org/PR13880 llvm-svn: 164743
* [libclang] Always report a CXCursor_MacroDefinition for code-completionArgyrios Kyrtzidis2012-09-271-3/+1
| | | | | | results for a macro name, not CXCursor_NotImplemented. llvm-svn: 164740
* Have ASTUnit::Save() return a bool to indicate save error.Argyrios Kyrtzidis2012-09-261-5/+5
| | | | | | Removes a dependency of ASTUnit to clang-c/Index.h. llvm-svn: 164704
* Allow disabling PCH validation when loading an AST file by checkingArgyrios Kyrtzidis2012-09-151-1/+4
| | | | | | an environment variable for debugging purposes. llvm-svn: 163958
* [libclang] When loading an AST file, make sure to apply the language optionsArgyrios Kyrtzidis2012-09-141-0/+15
| | | | | | | | to the target info. Related to rdar://12069503. llvm-svn: 163931
* Make TextDiagnostic more robust against SourceLocations which point into theRichard Smith2012-09-131-25/+54
| | | | | | | middle of UTF-8 characters, and avoid walking to such positions when adjusting column ranges for display. Fixes a couple of hangs when rendering diagnostics. llvm-svn: 163820
* Conditionally parse documentation comments in system headers byTed Kremenek2012-09-131-0/+3
| | | | | | | | | | passing -fretain-comments-from-system-headers. By default, the compiler no longer parses such documentation comments, as they can result in a noticeable compile time/PCH slowdown. Fixes <rdar://problem/11860820>. llvm-svn: 163778
OpenPOWER on IntegriCloud