summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* The only useful loop unrolling flag to give realistically isChandler Carruth2013-08-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | '-fno-unroll-loops'. The option to the backend is even called 'DisableUnrollLoops'. This is precisely the form that Clang *didn't* support. We didn't recognize the flag, we didn't pass it to the CC1 layer, and even if we did we wouldn't use it. Clang only inspected the positive form of the flag, and only did so to enable loop unrolling when the optimization level wasn't high enough. This only occurs for an optimization level that even has a chance of running the loop unroller when optimizing for size. This commit wires up the 'no' variant, and switches the code to actually follow the standard flag pattern of using the last flag and allowing a flag in either direction to override the default. I think this is still wrong. I don't know why we disable the loop unroller entirely *from Clang* when optimizing for size, as the loop unrolling pass *already has special logic* for the case where the function is attributed as optimized for size! We should really be trusting that. Maybe in a follow-up patch, I don't really want to change behavior here. llvm-svn: 187969
* clang-cl: Support the run-time selection options (/MD, /MT et al.)Hans Wennborg2013-08-081-0/+2
| | | | | | | | | | | | These flags set some preprocessor macros and injects a dependency on the runtime library into the object file, which later is picked up by the linker. This also adds a new CC1 flag for adding a dependent library. Differential Revision: http://llvm-reviews.chandlerc.com/D1315 llvm-svn: 187945
* [PCH] Fix a PCH serialization crash, with invalid code related to forward ↵Argyrios Kyrtzidis2013-08-071-3/+7
| | | | | | | | | | | | | | | | enum references. The problem was that an enum without closing semicolon could be associated as a forward enum in an erroneous declaration, leading to the identifier being associated with the enum decl but without a declaration actually referencing it. This resulted in not having it serialized before serializing the identifier that is associated with. Also prevent the ASTUnit from querying the serialized DeclID for an invalid top-level decl; it may not have been serialized. rdar://14539667 llvm-svn: 187914
* Started implementing variable templates. Top level declarations should be ↵Larisse Voufo2013-08-061-0/+8
| | | | | | fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention... llvm-svn: 187762
* Add option to disable module loading.Daniel Jasper2013-08-051-0/+2
| | | | | | | This patch was created by Lawrence Crowl and reviewed in: http://llvm-reviews.chandlerc.com/D963 llvm-svn: 187738
* CC1: Only parse command-line options that have the CC1Option flag.Hans Wennborg2013-08-021-12/+3
| | | | | | | | | | | | | We already reject flags that don't have the CC1Option flag, but we would previously do so after parsing the command-line arguments. Since the option parser now has a parameter for excluding options, we should just use that instead. Differential Revision: http://llvm-reviews.chandlerc.com/D1270 llvm-svn: 187668
* Use llvm::sys::fs::UniqueID for windows and unix.Rafael Espindola2013-08-012-27/+23
| | | | | | | | | | | | | | | | | | | This unifies the unix and windows versions of FileManager::UniqueDirContainer and FileManager::UniqueFileContainer by using UniqueID. We cannot just replace "struct stat" with llvm::sys::fs::file_status, since we want to be able to construct fake ones, and file_status has different members on unix and windows. What the patch does is: * Record only the information that clang is actually using. * Use llvm::sys::fs::status instead of stat and fstat. * Use llvm::sys::fs::UniqueID * Delete the old windows versions of UniqueDirContainer and UniqueFileContainer since the "unix" one now works on windows too. llvm-svn: 187619
* Update for llvm api change.Rafael Espindola2013-07-291-5/+5
| | | | llvm-svn: 187379
* Convert a use of stat with sys::fs::status.Rafael Espindola2013-07-291-9/+10
| | | | llvm-svn: 187364
* Avoid crashing if a directory has no pch files.Rafael Espindola2013-07-281-0/+2
| | | | | | Should fix some of the bots that have assertions disabled. llvm-svn: 187329
* Add a -fno-math-builtin option to the Clang -cc1Eli Bendersky2013-07-231-0/+1
| | | | llvm-svn: 186899
* Fix crash in libclang if code completion is used with unknown flags.Manuel Klimek2013-07-181-1/+1
| | | | | | | Use CaptureDroppedDiagnostics to make sure that there is a diagnostic client installed when warning flags are parsed. llvm-svn: 186582
* Use the simpler is_directory.Rafael Espindola2013-07-171-2/+1
| | | | llvm-svn: 186487
* Update for llvm API change.Rafael Espindola2013-07-162-9/+9
| | | | llvm-svn: 186448
* ObjC migrator: Add -objcmt-migrate-property to do propertyFariborz Jahanian2013-07-091-0/+2
| | | | | | | migration. Also, fixes an old bug where older migration flags were not being checked for properly. llvm-svn: 185948
* Use llvm::sys::fs::createUniqueFile.Rafael Espindola2013-07-052-6/+4
| | | | | | | Include a test that clang now produces output files with permissions matching the umask. llvm-svn: 185727
* Use llvm::sys::fs::createTemporaryFile.Rafael Espindola2013-07-052-7/+3
| | | | llvm-svn: 185717
* Use SmallVectorImpl& for function arguments instead of SmallVector.Craig Topper2013-07-051-3/+3
| | | | llvm-svn: 185715
* We don't need to check for windows' error codes in here.Rafael Espindola2013-07-051-3/+1
| | | | | | | The operator== calls equivalent which calls default_error_condition which handles windows to posix conversion. llvm-svn: 185702
* Use the multiple argument form of path::append.Benjamin Kramer2013-06-281-3/+1
| | | | llvm-svn: 185164
* Update for llvm::sys::fs::unique_file not creating directories.Rafael Espindola2013-06-281-13/+21
| | | | llvm-svn: 185127
* Small improvements to createOutputFile.Rafael Espindola2013-06-271-25/+41
| | | | | | | | * Use a single stat to find out if the file exists and if it is a regular file. * Use early returns when possible. * Add comments explaining why we have each check. llvm-svn: 185091
* Remove PathV1.h from CompilerInvocation.cpp.Rafael Espindola2013-06-261-8/+7
| | | | llvm-svn: 184918
* Use llvm::sys::fs::getMainExecutable.Rafael Espindola2013-06-261-1/+2
| | | | llvm-svn: 184915
* Remove PathV1.h from CompilerInstance.cpp.Rafael Espindola2013-06-261-8/+6
| | | | llvm-svn: 184913
* Don't use PathV1.h in ASTUnit.cpp.Rafael Espindola2013-06-261-5/+3
| | | | llvm-svn: 184912
* Remove the last use of PathWithStatus.Rafael Espindola2013-06-261-4/+4
| | | | llvm-svn: 184909
* Use llvm::sys::fs::unique_file.Rafael Espindola2013-06-261-26/+7
| | | | llvm-svn: 184908
* Remove some uses of llvm::sys::Path.Rafael Espindola2013-06-261-6/+6
| | | | llvm-svn: 184907
* Make -vectorize-... proper cc1 flags instead of abusing -backend-option. FixesNick Lewycky2013-06-251-0/+4
| | | | | | usage of clang as a library. llvm-svn: 184812
* [libclang/codecompletion] Make sure the top-level decl hash takes into ↵Argyrios Kyrtzidis2013-06-241-1/+9
| | | | | | | | | | | account ImportDecls. The top-level hash is used to determine if we need to update the global code-completion results. ImportDecls did not affect the hash so a newly introduced ImportDecl would not trigger an update of the global results. rdar://14202797 llvm-svn: 184782
* Add -ast-dump-lookups switch to -cc1 to dump DeclContext lookup maps. Test toRichard Smith2013-06-243-16/+22
| | | | | | follow. llvm-svn: 184678
* Remove duplicated case.Benjamin Kramer2013-06-221-1/+0
| | | | llvm-svn: 184640
* Fix a leak of TargetMachine in clang. We'll continue to leak it on purpose ifNick Lewycky2013-06-211-0/+1
| | | | | | given -disable-free. (Reviewed by John McCall over IRC.) llvm-svn: 184595
* [Modules] If a module map resides in a system header directory, treat it as ↵Douglas Gregor2013-06-212-2/+2
| | | | | | | | | a system module. This prevents -pedantic from causing warnings in the system headers used to create modules. Fixes <rdar://problem/14201171>. llvm-svn: 184560
* This patch adds new private headers to the module map. PrivateLawrence Crowl2013-06-202-3/+4
| | | | | | | headers may be included from within the module, but not from outside the module. llvm-svn: 184471
* Use the new name of getUniqueID.Rafael Espindola2013-06-201-5/+5
| | | | llvm-svn: 184432
* Debug Info: support for gdwarf-2 gdwarf-3 gdwarf-4Manman Ren2013-06-191-1/+11
| | | | | | | | These options will add a module flag with name "Dwarf Version". The behavior flag is currently set to Warning, so when two values disagree, a warning will be emitted. llvm-svn: 184276
* Use llvm::sys::fs::can_write.Rafael Espindola2013-06-181-1/+2
| | | | llvm-svn: 184234
* Use llvm::sys::fs::GetUniqueID.Rafael Espindola2013-06-181-15/+22
| | | | llvm-svn: 184218
* Add support for -fpcc-struct-return. Patch by Arthur O'Dwyer!John McCall2013-06-181-0/+9
| | | | llvm-svn: 184166
* [Driver] Refactor clang driver to use LLVM's Option libraryReid Kleckner2013-06-142-44/+67
| | | | | | | | | | | | | | | | | | The big changes are: - Deleting Driver/(Arg|Opt)* - Rewriting includes to llvm/Option/ and re-sorting - 'using namespace llvm::opt' in clang::driver - Fixing the autoconf build by adding option everywhere As discussed in the review, this change includes using directives in header files. I'll make follow up changes to remove those in favor of name specifiers. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D975 llvm-svn: 183989
* Don't depend on the transitive inclusion of PathV1.h.Rafael Espindola2013-06-131-0/+1
| | | | llvm-svn: 183945
* Use the sys::RemoveFileOnSignal that takes a StringRef.Rafael Espindola2013-06-131-1/+1
| | | | llvm-svn: 183944
* Modernize some low-hanging PathV1 uses.Benjamin Kramer2013-06-132-19/+24
| | | | llvm-svn: 183903
* Use the global functions instead of the Program methods.Rafael Espindola2013-06-121-1/+1
| | | | llvm-svn: 183861
* Include PathV1.h in files that use it.Rafael Espindola2013-06-114-0/+4
| | | | | | This is preparation for replacing Path.h with PathV2.h. llvm-svn: 183781
* Modify a comment to reflect changes of r183717.Argyrios Kyrtzidis2013-06-111-2/+2
| | | | llvm-svn: 183751
* ASTUnit: Invert the dependency of PrecompilePreambleAction on ↵Benjamin Kramer2013-06-111-40/+43
| | | | | | | | PrecompilePreambleConsumer. Actions outlive consumers. PR16295. Found by AddressSanitizer. llvm-svn: 183741
* [libclang] Allow building a precompiled preamble with compiler errorsArgyrios Kyrtzidis2013-06-112-10/+22
| | | | | | | | | | | A while ago we allowed libclang to build a PCH that had compiler errors; this was to retain the performance afforded by a PCH even if the user's code is in an intermediate state. Extend this for the precompiled preamble as well. rdar://14109828 llvm-svn: 183717
OpenPOWER on IntegriCloud