summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/HeaderIncludeGen.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clang-cl] Print /showIncludes to stderr, if used in combination with /E, ↵Erich Keane2018-05-041-1/+15
| | | | | | | | | | | | | | | | | /EP or /P This replicates 'cl.exe' behavior and allows for both preprocessor output and dependency information to be extraced with a single compiler invocation. This is especially useful for compiler caching with tools like Mozilla's sccache. See: https://github.com/mozilla/sccache/issues/246 Patch By: fxb Differential Revision: https://reviews.llvm.org/D46394 llvm-svn: 331533
* [Frontend] StringRefize and fix bad indentation.Benjamin Kramer2016-05-271-22/+22
| | | | | | NFC intended. llvm-svn: 270991
* clang-cl: Fix remaining bugs in interaction of /Yc and /FI /showIncludes.Nico Weber2016-03-231-26/+27
| | | | | | | | | | Instead of putting the /Yc header into ExtraDeps, give DependencyOutputOptions a dedicated field for /Yc mode, and let HeaderIncludesCallback hang on to the full DependencyOutputOptions object, not just ExtraDeps. Reverts parts of r263352 that are now no longer needed. llvm-svn: 264182
* clang-cl: Include /FI headers in /showIncludes output.Nico Weber2016-03-231-4/+11
| | | | | | | | | | | | | | | | | -H in gcc mode doesn't print -include headers, but they are included in depfiles written by MMD and friends. Since /showIncludes is what's used instead of depfiles, printing /FI there seems important (and matches cl.exe). Instead of giving HeaderIncludeGen more options, just switch on ShowAllHeaders in clang-cl mode and let clang::InitializePreprocessor() not put -include flags in the <command line> block. This changes the behavior of -E slightly, and it removes the <command line> flag from the output triggered by setting the obscure CC_PRINT_HEADERS=1 env var to true while running clang. Both of these seem ok to change. http://reviews.llvm.org/D18401 llvm-svn: 264174
* clang-cl: Add /Yc argument to /showIncludes output.Nico Weber2016-03-131-20/+24
| | | | | | | | | | To make this work, delay printing of ExtraDeps in HeaderIncludesCallback a bit, so that it happens after CompilerInstance::InitializeSourceManager() has run. General /FI arguments are still missing from /showIncludes output, this still needs to be fixed. llvm-svn: 263352
* Update for llvm API change.Rafael Espindola2015-12-161-1/+0
| | | | llvm-svn: 255838
* Add sanitizer blacklists to the rules generated with -M/-MM/-MD/-MMD.Ivan Krasin2015-08-131-23/+40
| | | | | | | | | | | | | | | | | | | Summary: Clang sanitizers, such as AddressSanitizer, ThreadSanitizer, MemorySanitizer, Control Flow Integrity and others, use blacklists to specify which types / functions should not be instrumented to avoid false positives or suppress known failures. This change adds the blacklist filenames to the list of dependencies of the rules, generated with -M/-MM/-MD/-MMD. This lets CMake/Ninja recognize that certain C/C++/ObjC files need to be recompiled (if a blacklist is updated). Reviewers: pcc Subscribers: rsmith, honggyu.kim, pcc, cfe-commits Differential Revision: http://reviews.llvm.org/D11968 llvm-svn: 244867
* Revert r240270 ("Fixed/added namespace ending comments using clang-tidy").Alexander Kornienko2015-06-221-1/+1
| | | | llvm-svn: 240353
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-221-1/+1
| | | | | | | | | | | | The patch is generated using this command: $ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ work/llvm/tools/clang To reduce churn, not touching namespaces spanning less than 10 lines. llvm-svn: 240270
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix Reviewers: dblaikie Reviewed By: dblaikie Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D8926 llvm-svn: 234678
* Unique_ptrify PPCallbacks ownership.Craig Topper2014-09-101-3/+6
| | | | | | Unique_ptr creation stil needs to be moved earlier at some of the call sites. llvm-svn: 217474
* Update for llvm api change.Rafael Espindola2014-08-251-6/+5
| | | | llvm-svn: 216397
* clang-cl: Flush stdout after writing the /showIncludes outputEhsan Akhgari2014-07-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: Before this patch, you could get lines in the output such as: Note: including file: ../../dist/include/js/Tc:/path/to/foo.cpp(1,1) : error(clang): static_assert failed... This patch ensures that the stdout output from showIncludes won't be garbled in the terminal like this, and it also helps applications that use the output to generate dependency information if they happen to capture both stdout and stderr. Test Plan: Tested locally, it's hard to write an automated test for this as the behavior depends on the buffering of the ostreams. Reviewers: nico Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4559 llvm-svn: 213297
* clang-cl: /showIncludes output should go to stdout, not stderr. Fixes PR20217.Nico Weber2014-07-061-1/+1
| | | | llvm-svn: 212383
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-131-3/+3
| | | | | | class. llvm-svn: 203758
* Update for llvm api change.Rafael Espindola2014-02-241-1/+2
| | | | llvm-svn: 202053
* clang-cl: Support /showIncludesHans Wennborg2013-08-091-7/+15
| | | | | | | | | | This option prints information about #included files to stderr. Clang could already do it, this patch just teaches the existing code about the /showIncludes style and adds the flag. Differential Revision: http://llvm-reviews.chandlerc.com/D1333 llvm-svn: 188037
* Update for llvm API change.Rafael Espindola2013-07-161-1/+1
| | | | llvm-svn: 186448
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-051-2/+2
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
* Move a method from IdentifierTable.h out of line and remove the SmallString ↵Benjamin Kramer2012-02-041-0/+1
| | | | | | | | include. Fix all the transitive include users. llvm-svn: 149783
* For the FileChanged Preprocessor callback, when exiting a file, pass its FileID.Argyrios Kyrtzidis2011-10-111-2/+4
| | | | llvm-svn: 141681
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-4/+4
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Fix -H. It was pretty broken.Sebastian Redl2011-04-141-5/+9
| | | | llvm-svn: 129514
* Frontend: Change CC_PRINT_HEADERS to not print header depth markers, these don'tDaniel Dunbar2011-03-211-7/+13
| | | | | | really make any sense in this environment. llvm-svn: 128014
* Frontend: Switch -header-include-file output to use unbuffered raw_ostreams withDaniel Dunbar2011-02-031-14/+22
| | | | | | | | the atomic writes option, since the intent is that this option be set for an entire build, which may have any number of compiler instances writing to the same output file. llvm-svn: 124772
* Frontend: Add -header-include-file option, for allowing saving header includeDaniel Dunbar2011-02-021-7/+30
| | | | | | information to a file. llvm-svn: 124750
* Frontend: Add support (unused) for showing all "interesting" headers, not justDaniel Dunbar2011-02-021-21/+16
| | | | | | ones outside the predefines buffer (which is what -H does). llvm-svn: 124749
* Frontend: Factor out header include dumping (-H) into its own preprocessorDaniel Dunbar2011-02-021-0/+87
callbacks class. - Aside from being generally cleaner, this also allows -H to work correctly in modes other than standard preprocessing (e.g., -c, -MM, etc.) llvm-svn: 124723
OpenPOWER on IntegriCloud