summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* Ensure that we still parse preprocessed CUDA files as CUDA when we useArtem Belevich2015-03-193-1/+7
| | | | | | | | | -save-temps option. Summary: Fixes PR22926. Review: http://reviews.llvm.org/D8383 llvm-svn: 232737
* Remove many superfluous SmallString::str() calls.Yaron Keren2015-03-188-21/+20
| | | | | | | | | | | | | | | Now that SmallString is a first-class citizen, most SmallString::str() calls are not required. This patch removes a whole bunch of them, yet there are lots more. There are two use cases where str() is really needed: 1) To use one of StringRef member functions which is not available in SmallString. 2) To convert to std::string, as StringRef implicitly converts while SmallString do not. We may wish to change this, but it may introduce ambiguity. llvm-svn: 232622
* Make module files passed to a module build via -fmodule-file= available toRichard Smith2015-03-181-0/+13
| | | | | | | | | consumers of that module. Previously, such a file would only be available if the module happened to actually import something from that module. llvm-svn: 232583
* Add fveclib option.Michael Zolotukhin2015-03-171-0/+10
| | | | | Review: http://reviews.llvm.org/D8097 llvm-svn: 232533
* GCOV: Expose the -coverage-exit-block-before-body flag in clang -cc1Justin Bogner2015-03-161-0/+2
| | | | | | | | | This exposes the optional exit block placement logic from r232438 as a clang -cc1 option. There is a test on the llvm side, but there isn't really a way to inspect the gcov options from clang to test it here as well. llvm-svn: 232439
* [modules] Teach the AST reader to handle the case of importing a moduleChandler Carruth2015-03-142-4/+4
| | | | | | | | | | | | | | | | | | | with a subset of the existing target CPU features or mismatched CPU names. While we can't check that the CPU name used to build the module will end up being able to codegen correctly for the translation unit, we actually check that the imported features are a subset of the existing features. While here, rewrite the code to use std::set_difference and have it diagnose all of the differences found. Test case added which walks the set relationships and ensures we diagnose all the right cases and accept the others. No functional change for implicit modules here, just better diagnostics. llvm-svn: 232248
* Fix up default header paths for CloudABI.Ed Schouten2015-03-111-1/+16
| | | | | | | | | | | CloudABI is a pure cross compilation target. This means that we should not add /usr/include and /usr/local/include. Instead, headers are stored in $sysroot/$triple/include. The method of going back to the sysroot (by using "../../..") is also used in this function for some of the other environments (e.g., MinGW). llvm-svn: 231913
* [modules] Don't clobber a destructor's operator delete when adding another one;Richard Smith2015-03-101-0/+7
| | | | | | | move the operator delete updating into a separate update record so we can cope with updating another module's destructor's operator delete. llvm-svn: 231735
* [ASTUnit] Fix crash when trying to load a module file via ↵Argyrios Kyrtzidis2015-03-031-5/+7
| | | | | | | | ASTUnit::LoadFromASTFile. rdar://19997358 llvm-svn: 231060
* Add clang support for Objective-C application extensions.Bob Wilson2015-03-021-0/+1
| | | | | | | | This adds the -fapplication-extension option, along with the ios_app_extension and macosx_app_extension availability attributes. Patch by Ted Kremenek llvm-svn: 230989
* Add missing include.Benjamin Kramer2015-03-011-0/+1
| | | | llvm-svn: 230910
* Give better diagnostics when -fmodule-file= finds a bad file: if the file isRichard Smith2015-02-281-3/+13
| | | | | | | found indirectly, explain how we got there, and distinguish between 'file not found' and 'file found but invalid'. llvm-svn: 230839
* Fix a [-Werror,-Wreorder] initialization ordering error.Eric Christopher2015-02-261-2/+2
| | | | llvm-svn: 230589
* Add -fuse-line-directive flag to control usage of #line with -EReid Kleckner2015-02-263-23/+20
| | | | | | | | | | | | | | | | | | Currently -fms-extensions controls this behavior, which doesn't make much sense. It means we can't identify what is and isn't a system header when compiling our own preprocessed output, because #line doesn't represent this information. If someone is feeding Clang's preprocessed output to another compiler, they can use this flag. Fixes PR20553. Reviewers: rsmith Differential Revision: http://reviews.llvm.org/D5217 llvm-svn: 230587
* Remove some unused includes of llvm/IR headers from parts of Clang that reallyRichard Smith2015-02-261-1/+0
| | | | | | shouldn't depend on LLVM IR. llvm-svn: 230586
* [modules] Even if we already have a definition of a class, loading in anotherRichard Smith2015-02-251-1/+4
| | | | | | | | one can give us more lookup results (due to implicit special members). Be sure to complete the redecl chain for every kind of DeclContext before performing a lookup into it, rather than only doing so for NamespaceDecls. llvm-svn: 230558
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-255-90/+12
| | | | llvm-svn: 230454
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-255-12/+90
| | | | | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. This reapplies r230044 with a fixed configure+make build and updated dependencies and testcase requirements. Over the last iteration this version adds - missing target requirements for testcases that specify an x86 triple, - a missing clangCodeGen.a dependency to libClang.a in the make build. rdar://problem/19104245 llvm-svn: 230423
* [modules] Fix a bug that would result in a build with P paths through a moduleRichard Smith2015-02-251-0/+3
| | | | | | | graph with M modules to take O(P) time, not just O(M) time, when using explicit module builds. llvm-svn: 230412
* CUDA: Add option to allow host device functions to call host functionsJacques Pienaar2015-02-241-1/+4
| | | | | | Commiting code from review http://reviews.llvm.org/D7841 llvm-svn: 230385
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-245-90/+12
| | | | | | | This reverts commit r230305. Off to fix another round of missing dependencies on various platforms. llvm-svn: 230309
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-245-12/+90
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. Take 3. llvm-svn: 230305
* Add C11 *_DECIMAL_DIG.Ed Schouten2015-02-231-2/+3
| | | | | | | | | | | | | | | Before C11 there was only the DECIMAL_DIG definition. As of C11, we now have one definition per floating point type (e.g. DBL_DECIMAL_DIG). Change the existing code to define the new versions. To remain backward compatible, define __DECIMAL_DIG__ as __LDBL_DECIMAL_DIG__. Also update the tests. It seems that some of the existing test vectors were incorrect. Change all tests for __DECIMAL_DIG__ to expect __LDBL_DECIMAL_DIG__. Add tests for *_DECIMAL_DIG for FreeBSD/amd64, as I happen to have such a system laying around. I've validated that the values are in sync with <float.h>. llvm-svn: 230207
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-215-90/+12
| | | | | | | | This reverts commit 230099. The Linux configure+make build variant still needs some work. llvm-svn: 230103
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-205-12/+90
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. Take 2. llvm-svn: 230089
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-205-90/+12
| | | | | | | | This reverts commit r230067. Investigating another batch of problems found by the bots. llvm-svn: 230073
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-205-12/+90
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. llvm-svn: 230067
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-205-90/+12
| | | | | | | | | This reverts commit r230044 while dealing with buildbot breakage. Conflicts: test/Modules/module_container.m llvm-svn: 230052
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-205-12/+90
| | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 llvm-svn: 230044
* Add -funique-section-names and -fno-unique-section-names options.Rafael Espindola2015-02-201-0/+3
| | | | | | | | | For now -funique-section-names is the default, so no change in default behavior. The total .o size in a build of llvm and clang goes from 241687775 to 230649031 bytes if -fno-unique-section-names is used. llvm-svn: 230031
* Add -fno-implicit-modules.Manuel Klimek2015-02-202-0/+7
| | | | | | | If this flag is set, we error out when a module build is required. This is useful in environments where all required modules are passed via -fmodule-file. llvm-svn: 230006
* Add -fno-sized-deallocation option for completeness of fix in r229241 in ↵Larisse Voufo2015-02-201-0/+1
| | | | | | documentation in r229818. llvm-svn: 229950
* Revert "Mangle the IsSystem bit into the .pcm file name"Ben Langmuir2015-02-191-1/+1
| | | | | | | | While I investigate some possible problems with this patch. This reverts commit r228966 llvm-svn: 229910
* [PCH/Modules] Check that the specific module cache path the PCH was built ↵Argyrios Kyrtzidis2015-02-193-9/+17
| | | | | | | | | | | | with, is the same as the one in the current compiler invocation. If they differ reject the PCH. This protects against the badness occurring from getting modules loaded from different module caches (see crashes). rdar://19889860 llvm-svn: 229909
* Revert adding hostname to module hashBen Langmuir2015-02-191-17/+0
| | | | | | | | | | | | I didn't realize how easily the hostname could change - for example just changing wireless networks seems to prompt it in some cases. Users can always set their own local module cache path to avoid this. This reverts commits r228592, 228594, 228601 and 228613. rdar://19287368 llvm-svn: 229815
* Rename flags and options to match current naming: from -fdef-sized-delete to ↵Larisse Voufo2015-02-181-2/+2
| | | | | | -fdefine-sized-deallocation, and from DefaultSizedDelete to DefineSizedDeallocation. llvm-svn: 229597
* Revise the implementation logic of sized deallocation: Do not automatically ↵Larisse Voufo2015-02-141-0/+2
| | | | | | | | generate weak definitions of the sized operator delete (in terms of unsized operator delete). Instead, provide the funcitonality via a new compiler flag, -fdef-sized-delete. The current implementation causes link-time ODR violations when the delete symbols are exported into the dynamic table. llvm-svn: 229241
* Revert "Revert r229082 for a bit, it caused PR22577."David Majnemer2015-02-141-0/+2
| | | | | | | This reverts commit r229123. It was a red herring, the bug was present without r229082. llvm-svn: 229205
* Revert r229082 for a bit, it caused PR22577.Nico Weber2015-02-131-2/+0
| | | | llvm-svn: 229123
* MS ABI: Implement /volatile:msDavid Majnemer2015-02-131-0/+2
| | | | | | | | | | | | The /volatile:ms semantics turn volatile loads and stores into atomic acquire and release operations. This distinction is important because volatile memory operations do not form a happens-before relationship with non-atomic memory. This means that a volatile store is not sufficient for implementing a mutex unlock routine. Differential Revision: http://reviews.llvm.org/D7580 llvm-svn: 229082
* Mangle the IsSystem bit into the .pcm file nameBen Langmuir2015-02-121-1/+1
| | | | | | | | | When mangling the module map path into a .pcm file name, also mangle the IsSystem bit, which can also depend on the header search paths. For example, the user may change from -I to -isystem. This can affect diagnostics in the importing TU. llvm-svn: 228966
* [mips] Partially revert r223927: Removing __SIZEOF_INT128__ macro for MIPS64Vasileios Kalintiris2015-02-121-6/+1
| | | | | | | | Partially revert r223927 because LLVM gained support for 128-bit integers in r227089. Modify and keep the tests that verify the definition of the macro __SIZEOF_INT128__ for MIPS64 BE & LE in the preprocessor. llvm-svn: 228918
* Be more conservative about gethostname()'s truncating behaviourBen Langmuir2015-02-091-1/+5
| | | | | | | | Don't assume it will provide an error or null-terminate the string on truncation, since POSIX doesn't guarantee either behaviour (although Linux and Darwin at least will do the 'right thing'). llvm-svn: 228613
* Diagnose timeouts in the LockFileManager and delete the dead lock fileBen Langmuir2015-02-091-2/+12
| | | | | | | | | | | | If the lock file manager times out, we should give an error rather than silently trying to load the existing module. And delete the (presumably) dead lock file, since it will otherwise prevent progress in future invokations. This is unsound since we have no way to prove that the lock file we are deleting is the same one we timed out on, but since the lock is only to avoid excessive rebuilding anyway it should be okay. Depends on llvm r228603. llvm-svn: 228604
* Update r228592 for when gethostname() returns an errorBen Langmuir2015-02-091-3/+3
| | | | | | | | | If gethostname() is not successful, just skip adding the hostname to the module hash. And don't bother setting hostname[255] = 0, since if gethostname() is successful, it will be null-terminated already (and if it's not successful we don't read the string now. llvm-svn: 228601
* Add missing include from r228592Ben Langmuir2015-02-091-0/+3
| | | | llvm-svn: 228594
* Add the hostname to the module hash to avoid sharing between hostsBen Langmuir2015-02-091-0/+10
| | | | | | | Sharing between hosts will cause problems for the LockFileManager, which can timeout waiting for a process that has already died. llvm-svn: 228592
* ASTUnit: Fix a name clash in GCC builds.Benjamin Kramer2015-02-061-2/+2
| | | | | | | Should fix the build. Looks like GCC 4.9 is using different scoping rules for range-based for loops. llvm-svn: 228424
* ASTUnit: Use range-based for loops.Benjamin Kramer2015-02-061-91/+69
| | | | llvm-svn: 228420
* Update APIs that return a pair of iterators to return an iterator_range instead.Benjamin Kramer2015-02-061-8/+6
| | | | | | Convert uses of those APIs into ranged for loops. NFC. llvm-svn: 228404
OpenPOWER on IntegriCloud