aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/DependencyFile.cpp
AgeCommit message (Collapse)AuthorFilesLines
2015-10-20Roll-back r250822.Angel Garcia Gomez1-1/+1
Summary: It breaks the build for the ASTMatchers Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D13893 llvm-svn: 250827
2015-10-20Apply modernize-use-default to clang.Angel Garcia Gomez1-1/+1
Summary: Replace empty bodies of default constructors and destructors with '= default'. Reviewers: bkramer, klimek Subscribers: klimek, alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D13890 llvm-svn: 250822
2015-09-02Use new utility function to clean leading junk from pathnames. NFCDouglas Katzman1-18/+3
llvm-svn: 246714
2015-08-13[modules] For explicit module file dependencies, only list direct dependency ↵Richard Smith1-1/+1
module files. llvm-svn: 244931
2015-08-13Try to fix the build after r244923Reid Kleckner1-1/+1
llvm-svn: 244926
2015-08-13[modules] Change the way we deal with .d output for explicitly-specified moduleRichard Smith1-9/+13
files: include the .pcm file itself in the .d output, rather than including its own input files. Other forms of module file continue to be transparent for .d output. Arguably, the input files for the .pcm file are still inputs to the compilation, but that's unnecessary for make-like build systems (where the mtime of the .pcm file is sufficient) and harmful for smarter build systems that know about module files and want to track only the local dependencies. llvm-svn: 244923
2015-08-13Add sanitizer blacklists to the rules generated with -M/-MM/-MD/-MMD.Ivan Krasin1-1/+5
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
2015-08-09[modules] When building a dependency file, include module maps parsed in theRichard Smith1-0/+30
current compilation, not just those from imported modules. llvm-svn: 244413
2015-06-22Revert r240270 ("Fixed/added namespace ending comments using clang-tidy").Alexander Kornienko1-1/+1
llvm-svn: 240353
2015-06-22Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko1-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
2015-05-13Break \# in a depfile the same way as gcc.Paul Robinson1-22/+18
Backslash followed by # in a filename should have both characters escaped, if you do it the way GNU Make wants. GCC doesn't, so we do it the way GCC does rather than the way GNU Make wants. llvm-svn: 237304
2015-05-13Fix dependency file escaping.Paul Robinson1-5/+57
When writing a dependency (.d) file, if space or # is immediately preceded by one or more backslashes, escape the backslashes as well as the space or # character. Otherwise leave backslash alone. This straddles the fence between BSD Make (which does no escaping at all, and does not support space or # in filespecs) and GNU Make (which does support escaping, but will fall back to the filespec as-written if the escaping doesn't match an existing file). Differential Revision: http://reviews.llvm.org/D9208 llvm-svn: 237296
2015-04-27Support generating NMake/Jom-style depfiles.Paul Robinson1-5/+23
NMake is a Make-like builder that comes with Microsoft Visual Studio. Jom (https://wiki.qt.io/Jom) is an NMake-compatible build tool. Dependency files for NMake/Jom need to use double-quotes to wrap filespecs containing special characters, instead of the backslash escapes that GNU Make wants. Adds the -MV option, which specifies to use double-quotes as needed instead of backslash escapes when writing the dependency file. Differential Revision: http://reviews.llvm.org/D9260 llvm-svn: 235903
2014-11-19Update for LLVM API changeDavid Blaikie1-2/+2
llvm-svn: 222303
2014-10-27Frontend: Don't include stdin in the dependency list for an object fileDavid Majnemer1-2/+11
GCC doesn't do this and it semes weird to include a file that we can't open. This fixes PR21362. llvm-svn: 220726
2014-09-10Unique_ptrify PPCallbacks ownership.Craig Topper1-2/+3
Unique_ptr creation stil needs to be moved earlier at some of the call sites. llvm-svn: 217474
2014-08-25Update for llvm api change.Rafael Espindola1-5/+5
llvm-svn: 216397
2014-08-10unique_ptr-ify ASTReaderListener in the ASTReaderDavid Blaikie1-2/+2
llvm-svn: 215317
2014-06-30Consider module depedencies when checking a preamble in libclangBen Langmuir1-0/+99
Add module dependencies (header files, module map files) to the list of files to check when deciding whether to rebuild a preamble. That fixes using preambles with module imports so long as they are in non-overridden files. My intent is to use to unify the existing dependency collectors to the new “DependencyCollectory” interface from this commit, starting with the DependencyFileGenerator. llvm-svn: 212060
2014-05-22[C++11] Use 'nullptr'. Frontend edition.Craig Topper1-2/+2
llvm-svn: 209389
2014-03-14[Modules] Emit the module file paths as dependencies of the PCH when we are ↵Argyrios Kyrtzidis1-1/+9
building one. This is because the PCH is tied to the module files, if one of the module files changes or gets removed the build system should re-build the PCH file. rdar://16321245 llvm-svn: 203885
2014-03-14[Modules] Make sure that the synthesized file "__inferred_module.map" ↵Argyrios Kyrtzidis1-2/+6
doesn't show up as dependency of a module file. Follow-up for rdar://15459210 llvm-svn: 203882
2014-03-13[C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper1-17/+13
class. llvm-svn: 203758
2014-03-07Add dependencies from imported modules with -MDBen Langmuir1-25/+59
Add module dependencies to the dependency files created by -MD/-MMD/etc. by attaching an ASTReaderListener that will call into the dependency file generator when a module input file is seen in the serialized AST. llvm-svn: 203208
2014-02-24Update for llvm api change.Rafael Espindola1-1/+1
llvm-svn: 202053
2014-02-24Don't assume that F_None is the default. It is about to change.Rafael Espindola1-1/+1
llvm-svn: 202040
2014-01-10Use the simpler version of llvm::sys::fs::remove when possible.Rafael Espindola1-2/+1
llvm-svn: 198957
2013-06-13Modernize some low-hanging PathV1 uses.Benjamin Kramer1-2/+3
llvm-svn: 183903
2013-06-11Include PathV1.h in files that use it.Rafael Espindola1-0/+1
This is preparation for replacing Path.h with PathV2.h. llvm-svn: 183781
2013-04-02Escape # and $ in dependency files.Benjamin Kramer1-3/+5
Fixes PR15642. llvm-svn: 178540
2012-09-29For PPCallbacks::InclusionDirective() add a parameter for the module, wheneverArgyrios Kyrtzidis1-2/+4
an inclusion directive was automatically turned into a module import, and PPCallbacks::moduleImport() for an explicit module import. llvm-svn: 164874
2012-09-27Per discussion in ↵Argyrios Kyrtzidis1-2/+2
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
2011-11-21Delete the depfile if we could not open a header file. We cannotPeter Collingbourne1-28/+36
generate any reasonable depfile if a header is missing. llvm-svn: 145019
2011-10-11For the FileChanged Preprocessor callback, when exiting a file, pass its FileID.Argyrios Kyrtzidis1-2/+4
llvm-svn: 141681
2011-08-30Change err_pp_file_not_found back to an Error; when it's a Warning, we ↵Eli Friedman1-8/+2
suppress it in system headers. And it is not a good idea to suppress it in system headers. (This was originally changed in r134996 to implement -MG.) Fixes <rdar://10041960>. And also brings down the number of warnings without a flag by one :) llvm-svn: 138842
2011-07-25Mechanically rename SourceManager::getInstantiationLoc andChandler Carruth1-1/+1
FullSourceLoc::getInstantiationLoc to ...::getExpansionLoc. This is part of the API and documentation update from 'instantiation' as the term for macros to 'expansion'. llvm-svn: 135914
2011-07-23remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner1-13/+13
LLVM.h imports them into the clang namespace. llvm-svn: 135852
2011-07-12Implement -MG. Fixes PR9613Peter Collingbourne1-1/+38
llvm-svn: 134996
2011-07-08Fix up dependency file name printing to more closely match that of gcc, ↵Eli Friedman1-5/+11
including fixing a nasty recent regression that could make us print "/foo.h" with a command-line including "-I ./". rdar://problem/9734352 llvm-svn: 134728
2011-04-15Fixes a crash when generating dependency file stuffFariborz Jahanian1-1/+1
and output file is not writable. // rdar://9286457. llvm-svn: 129587
2011-02-17fix clang -MM output to escape spaces in filenames. This seems to beChris Lattner1-7/+18
the only character that GCC escapes. PR9224. llvm-svn: 125707
2010-07-26It's not necessary to call flush() on a raw_ostream immediately priorDan Gohman1-1/+0
to deleting it. llvm-svn: 109441
2010-03-23PPCallbacks: Add hook for reaching the end of the main file, and fix ↵Daniel Dunbar1-4/+5
DependencyFile to not do work in its destructor. llvm-svn: 99257
2010-03-07Rename to addPPCallbacks since we're effectively adding a callback and maybe ↵Kovarththanan Rajaratnam1-1/+1
chaining it to an existing one llvm-svn: 97913
2010-03-07Don't assert if PP already contains a valid PP callback. The PP can handle ↵Kovarththanan Rajaratnam1-1/+0
multiple callbacks (using PPChainedCallbacks) llvm-svn: 97910
2009-11-28Remove VISIBILITY_HIDDEN from anonymous namespaces in libFrontend.Benjamin Kramer1-2/+1
llvm-svn: 90033
2009-11-11Sink AttachDependencyFileGen into CreatePreprocessor.Daniel Dunbar1-5/+5
llvm-svn: 86881
2009-11-11Add DependencyOutputOptions to wrap -M... options, and propogate toDaniel Dunbar1-19/+25
CompilerInvocation and clang-cc. llvm-svn: 86880
2009-09-09Remove tabs, and whitespace cleanups.Mike Stump1-8/+8
llvm-svn: 81346
2009-05-19Clean up some unnecessary includes.Eli Friedman1-2/+0
llvm-svn: 72101