summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* Frontend: Create a virtual file for named pipe inputs.Daniel Dunbar2012-11-271-1/+5
| | | | | | - This ensures we see the right buffer size for the file. llvm-svn: 168636
* PR14306: Move -fbounds-checking to -fsanitize=bounds.Joey Gouly2012-11-231-2/+0
| | | | llvm-svn: 168510
* Use color for -ast-dump-filter only when it is supportedDmitri Gribenko2012-11-211-3/+6
| | | | | | Patch by Philip Craig. llvm-svn: 168420
* Since CreateTargetInfo is taking ownership of the target options, passDouglas Gregor2012-11-163-8/+8
| | | | | | it as a pointer. llvm-svn: 168136
* [libclang] When caching code-completion results, pass the ↵Argyrios Kyrtzidis2012-11-161-4/+5
| | | | | | | | | | | | | | CachedCompletionAllocator to the CodeCompletionTUInfo that is going to be used to get the results. Previously we would use ASTUnit's CodeCompletionTUInfo which has its own allocator that will go away when we reparse. That could result in a use-after-free bug when getting the parent context name from a CodeCompletionString. Addresses rdar://12568377. llvm-svn: 168133
* CPP Output: Do not emit an enter file marker for the main file.Daniel Dunbar2012-11-161-0/+11
| | | | | | | | - This diverges from gcc, and confuses tools (like dtrace) which track # line markers as a way to determine which content is in the context of the main file. llvm-svn: 168128
* block extended signatur option. Change previous optionFariborz Jahanian2012-11-151-2/+2
| | | | | | | | to a cc1 -fencode-extended-block-signature and pass it to cc1 and recognize this option to produce extended block type signature. // rdar://12109031 llvm-svn: 168063
* [modules] Use a memory buffer directly as input for the module includes,Argyrios Kyrtzidis2012-11-151-13/+5
| | | | | | instead of messing with virtual files. llvm-svn: 168062
* [modules] Setup the import location of a module file and use itArgyrios Kyrtzidis2012-11-153-4/+5
| | | | | | as the include location of the main file of an imported module. llvm-svn: 168061
* Use empty parens for empty function parameter list instead of '(void)'.Dmitri Gribenko2012-11-151-2/+2
| | | | llvm-svn: 168041
* Make -ffp-contract a codegen option, rather than a laguage option. This makesLang Hames2012-11-151-12/+12
| | | | | | | more sense anyway - it determines how expressions are codegen'd. It also ensures that -ffp-contract=fast has the intended effect when compiling LLVM IR. llvm-svn: 168027
* Add -cc1 option -fno-diagnostics-use-presumed-location, a handy mode forRichard Smith2012-11-142-2/+3
| | | | | | | | | working with preprocessed testcases. This causes source locations in diagnostics to point at the spelling location instead of the presumed location, while still keeping the semantic effects of the line directives (entering and leaving system-header mode, primarily). llvm-svn: 168004
* objective-C blocks: under cc1 flag -encode-extended-block-signature,Fariborz Jahanian2012-11-141-0/+2
| | | | | | | | generate expanded signature encoding to include types as we already do this for protocol method lists. // rdar://12109031 llvm-svn: 167997
* s/BCPLComment/LineComment/Nico Weber2012-11-111-1/+1
| | | | llvm-svn: 167690
* Make __LDBL_MAX__ etc. have the correct type on targets where long ↵Eli Friedman2012-11-101-24/+24
| | | | | | | | double/double/etc. have the same format. PR14285. Based on patch by Jeroen Dobbelaere. llvm-svn: 167649
* Add a FileCharacteristic parameter to SourceManager::createFileIDForMemBufferArgyrios Kyrtzidis2012-11-091-1/+9
| | | | | | | for completeness and use it in CompilerInstance::InitializeSourceManager if the input is a memory buffer. llvm-svn: 167628
* Turn FrontendInputFile into an immutable class and have it also acceptArgyrios Kyrtzidis2012-11-094-32/+33
| | | | | | a memory buffer instead of only a filename. llvm-svn: 167627
* Make CompilerInstance::InitializeSourceManager accept a FrontendInputFile,Argyrios Kyrtzidis2012-11-093-12/+11
| | | | | | no functionality change. llvm-svn: 167626
* Implement -mstrict-align using '-backend-option -arm-strict-align' as this savesChad Rosier2012-11-091-1/+0
| | | | | | us from having to make any backend changes. llvm-svn: 167623
* [driver] Add a -mstrict-align compiler option for ARM targets.Chad Rosier2012-11-091-0/+1
| | | | | | rdar://12340498 llvm-svn: 167619
* Remove code to fall back to llvm-gcc for i386 kexts.Bob Wilson2012-11-081-5/+0
| | | | | | More cleanups to follow in separate commits.... llvm-svn: 167566
* When loading a module fails because it is out of date, rebuild thatDouglas Gregor2012-11-071-3/+26
| | | | | | module in place. <rdar://problem/10138913> llvm-svn: 167539
* Split the instrinsic header wmmintrin.h into AES and PCLMUL parts, soDouglas Gregor2012-11-051-1/+1
| | | | | | that we can model them as separate submodules. llvm-svn: 167420
* Frontend: Add support for reading named pipes as the main file.Daniel Dunbar2012-11-051-0/+13
| | | | | | | | - The whole {File,Source}Manager is built around wanting to pre-determine the size of files, so we can't fit this in naturally. Instead, we handle it like we do STDIN, where we just replace the main file contents upfront. llvm-svn: 167419
* Use the individual -fsanitize=<...> arguments to control which of the UBSanRichard Smith2012-11-051-3/+0
| | | | | | | checks to enable. Remove frontend support for -fcatch-undefined-behavior, -faddress-sanitizer and -fthread-sanitizer now that they don't do anything. llvm-svn: 167413
* Add -fsanitize=<sanitizers> argument to driver and frontend, and addRichard Smith2012-11-051-0/+31
| | | | | | | | | | | | -fno-sanitize=<sanitizers> argument to driver. These allow ASan, TSan, and the various UBSan checks to be enabled and disabled separately. Right now, the different modes can't be combined, but the intention is that combining UBSan and the other sanitizers will be permitted in the near future. Currently, the UBSan checks will all be enabled if any of them is; that will be fixed by the next patch. llvm-svn: 167411
* Rename LangOptions members for address sanitizer and thread sanitizer fromRichard Smith2012-11-051-2/+2
| | | | | | *Sanitizer to Sanitize* in preparation for later patches. llvm-svn: 167405
* Hash the various compiler version, target, preprocessor, andDouglas Gregor2012-11-051-34/+31
| | | | | | | | | header-search options into the module hash. We're just using ADT/Hashing.hpp for this, which isn't as cryptographically strong as I'd like, but it'll do. If someone contributes (say) and MD4 implementation, we'd happily switch to that. llvm-svn: 167397
* only truncate source lines in text diagnostics whenSeth Cantrell2012-11-031-2/+2
| | | | | | the ellipsis is shorter than the text it replaces llvm-svn: 167364
* don't step into the middle of multibyte sequencesSeth Cantrell2012-11-031-2/+2
| | | | llvm-svn: 167361
* fix bug in SourceColumnMap::startOfPreviousColumnSeth Cantrell2012-11-031-1/+1
| | | | llvm-svn: 167360
* Add a proper algorithm to compute accurate source ranges for diagnostics withEli Friedman2012-11-032-26/+62
| | | | | | | | | caret locations and source ranges in macros. Makes ranges more accurate in some cases, and fixes an assertion failure. Fixes <rdar://problem/12472249>. llvm-svn: 167353
* When code-completing don't disable the preprocessing record if modules are ↵Argyrios Kyrtzidis2012-11-021-2/+3
| | | | | | enabled. llvm-svn: 167325
* Remove first argument from Arg::getValue; it's been unused since r105760.Richard Smith2012-11-011-55/+55
| | | | llvm-svn: 167211
* Remove CompilerInvocation::toArgs and clang -cc1test mode. These were untestedRichard Smith2012-11-011-908/+1
| | | | | | | and apparently unused (and since they are untested, they're presumably also broken). llvm-svn: 167210
* [PCH] Remove the stat cache from the PCH file.Argyrios Kyrtzidis2012-10-313-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The stat cache became essentially useless ever since we started validating all file entries in the PCH. But the motivating reason for removing it now is that it also affected correctness in this situation: -You have a header without include guards (using "#pragma once" or #import) -When creating the PCH: -The same header is referenced in an #include with different filename cases. -In the PCH, of course, we record only one file entry for the header file -But we cache in the PCH file the stat info for both filename cases -Then the source files are updated and the header file is updated in a way that its size and modification time are the same but its inode changes -When using the PCH: -We validate the headers, we check that header file and we create a file entry with its current inode -There's another #include with a filename with different case than the previously created file entry -In order to get its stat info we go through the cached stat info of the PCH and we receive the old inode -because of the different inodes, we think they are different files so we go ahead and include its contents. Removing the stat cache will potentially break clients that are attempting to use the stat cache as a way of avoiding having the actual input files available. If that use case is important, patches are welcome to bring it back in a way that will actually work correctly (i.e., emit a PCH that is self-contained, coping with literal strings, line/column computations, etc.). This fixes rdar://5502805 llvm-svn: 167172
* Fix for -ast-dump-filterAlexander Kornienko2012-10-311-3/+1
| | | | | | | | | | | | | | | | | Summary: -ast-dump-filter implementation used to stop AST traversal after traversing a NULL Decl node. Added test and fixed. Reviewers: djasper, klimek, rsmith Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D93 llvm-svn: 167155
* Decouple code-completion for the SkipFunctionBodies frontend option andArgyrios Kyrtzidis2012-10-312-3/+0
| | | | | | add a test to make sure code-completion skips bodies. llvm-svn: 167141
* remove duplicate data arraySeth Cantrell2012-10-301-14/+1
| | | | llvm-svn: 167007
* fix calculation of end pointerSeth Cantrell2012-10-301-1/+1
| | | | llvm-svn: 167006
* Move getOriginalSourceFileName inline. Patch by Laszlo Nagy.Rafael Espindola2012-10-291-4/+0
| | | | llvm-svn: 166981
* Remove spurious mode marker from .cpp file.Nick Lewycky2012-10-291-1/+1
| | | | llvm-svn: 166915
* 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
OpenPOWER on IntegriCloud