summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
* <rdar://problem/12368093> Extend module maps with a 'conflict' declaration, ↵Douglas Gregor2013-03-201-0/+18
| | | | | | and warn when a newly-imported module conflicts with an already-imported module. llvm-svn: 177577
* Make sure that Module::ConfigMacrosExhaustive gets initialized and ↵Douglas Gregor2013-03-201-3/+4
| | | | | | | | | deserialized correctly. This fixes regressions introduced in r177466 that caused several module tests to fail sporadically. llvm-svn: 177481
* <rdar://problem/10796651> Introduce configuration macros into module maps.Douglas Gregor2013-03-201-1/+13
| | | | | | | | | | | | | | | | | | | | | | Configuration macros are macros that are intended to alter how a module works, such that we need to build different module variants for different values of these macros. A module can declare its configuration macros, in which case we will complain if the definition of a configation macro on the command line (or lack thereof) differs from the current preprocessor state at the point where the module is imported. This should eliminate some surprises when enabling modules, because "#define CONFIG_MACRO ..." followed by "#include <module/header.h>" would silently ignore the CONFIG_MACRO setting. At least it will no longer be silent about it. Configuration macros are eventually intended to help reduce the number of module variants that need to be built. When the list of configuration macros for a module is exhaustive, we only need to consider the settings for those macros when building/finding the module, which can help isolate modules for various project-specific -D flags that should never affect how modules are build (but currently do). llvm-svn: 177466
* [Modules] Resolve top-headers of modules lazily.Argyrios Kyrtzidis2013-03-131-0/+14
| | | | | | | | | | | This allows resolving top-header filenames of modules to FileEntries when we need them, not eagerly. Note that that this breaks ABI for libclang functions clang_Module_getTopLevelHeader / clang_Module_getNumTopLevelHeaders but this is fine because they are experimental and not widely used yet. llvm-svn: 176975
* Remove driver support for Hexagon V2 and V3Matthew Curtis2013-03-121-2/+0
| | | | | | | | | Driver will now error when trying to compile for V2 or V3. Removal of V2 and V3 support will allow us to simplify the hexagon back-end. llvm-svn: 176859
* Add 'e' to the SPIR data layout - SPIR is little endian for now.Guy Benyei2013-03-071-4/+12
| | | | | | Add 32/64 bit specific target defines for SPIR. llvm-svn: 176629
* Mips specific inline assembler constraint 'R'Jack Carter2013-03-051-1/+1
| | | | | | | | | | | | 'R' An address that can be sued in a non-macro load or store. Including missing positive test case and fixed typo for r176453. Thanks to Richard Smith for catching this! Jack llvm-svn: 176506
* Tidy up lists of Cortex-A series processors, adding entries for A7.Bob Wilson2013-03-041-2/+3
| | | | | | Also fix a missing entry for cortex-r5 in one copy of getLLVMArchSuffixForARM. llvm-svn: 176457
* Mips specific inline assembler constraint 'R'Jack Carter2013-03-041-0/+3
| | | | | | | 'R' An address that can be sued in a non-macro load or store. This patch includes a positive test case. llvm-svn: 176453
* R600: Use the GPU type to determine the correct DataLayout v2Tom Stellard2013-03-041-8/+101
| | | | | | | | | v2: - Add R600_DOUBLE_OPS for RV670 - s/CPU/GPU/ Reviewed-by: Alex Deucher <alexander.deucher@amd.com> llvm-svn: 176440
* Fix typos: [Dd]iagnosic -> [Dd]iagnosticStefanus Du Toit2013-03-011-3/+3
| | | | | | These all appear in comments or (ironically) diagnostics output. llvm-svn: 176383
* Add one more sanity check in SourceManager::getFileIDLoaded().Argyrios Kyrtzidis2013-03-011-0/+5
| | | | llvm-svn: 176333
* In SourceManager::getFileIDLoaded(), add some sanity checks to make sure we ↵Argyrios Kyrtzidis2013-03-011-0/+7
| | | | | | | | don't enter an infinite loop. rdar://13120919 llvm-svn: 176331
* [Mips] Add two new aliases for MIPS ABI names 32 (means o32 abi) and 64Simon Atanasyan2013-02-271-9/+19
| | | | | | | (means n64 abi) to improve compatibility with GNU tools. Patch by Jia Liu <proljc@gmail.com>. llvm-svn: 176187
* Refine SourceManager's isBeforeInTranslationUnit() cache to have more entries.Ted Kremenek2013-02-271-1/+31
| | | | | | | | | | | | | | | | | | | | | | isBeforeInTranslationUnit() uses a cache to reduce the expensive work to compute a common ancestor for two FileIDs. This work is very expensive, so even caching the latest used FileIDs was a big win. A closer analysis of the cache before, however, shows that the cache access pattern would oscillate between a working set of FileIDs, and thus caching more pairs would be profitable. This patch adds a side table for extending caching. This side table is bounded in size (experimentally determined in this case from a simple Objective-C project), and when the table gets too large we fall back to the single entry caching before as before. On Sketch (a small example Objective-C project), this optimization reduces -fsyntax-only time on SKTGraphicView.m by 5%. This is for a project that is already using PCH. Fixes <rdar://problem/13299847> llvm-svn: 176142
* Moving initialization into the initializer list and correcting ↵Aaron Ballman2013-02-241-4/+3
| | | | | | capitalization, as suggested by Chandler. llvm-svn: 176001
* Implement __builtin_eh_return_data_regno() for ARM and MIPS.Logan Chien2013-02-231-0/+12
| | | | llvm-svn: 175954
* Revert r175912, "Add support for coldcc to clang" at John's request.Peter Collingbourne2013-02-231-2/+5
| | | | llvm-svn: 175936
* Add support for coldcc to clangPeter Collingbourne2013-02-221-5/+2
| | | | llvm-svn: 175912
* Replace some typically large vectors with SmallVector.Benjamin Kramer2013-02-221-1/+1
| | | | | | | | This may seem counter-intuitive but the POD-like optimization helps when the vectors grow into multimegabyte buffers. SmallVector calls realloc which knows how to twiddle virtual memory bits and avoids large copies. llvm-svn: 175906
* Use None rather than Optional<T>() where possible.David Blaikie2013-02-211-2/+2
| | | | llvm-svn: 175705
* Revert "intmax_t is long long on Darwin, not long."Jordan Rose2013-02-201-2/+0
| | | | | | | | | 'long' and 'long long' are different for the purposes of mangling. This caused <rdar://problem/13254874>. This reverts commit c2f994d31ec85e9af811af38eb1b28709aef0b2c. llvm-svn: 175681
* Include llvm::Optional in clang/Basic/LLVM.hDavid Blaikie2013-02-202-10/+9
| | | | | | Post-commit CR feedback from Jordan Rose regarding r175594. llvm-svn: 175679
* intmax_t is long long on Darwin, not long.Jordan Rose2013-02-201-0/+2
| | | | | | <rdar://problem/11540697> llvm-svn: 175588
* [modules] Refactor code from ASTReader::makeModuleVisible() into a new function,Argyrios Kyrtzidis2013-02-191-0/+53
| | | | | | Module::getExportedModules() so it can be reused. llvm-svn: 175548
* Fixing a typo where FixIts was accidentally self-assigning instead of ↵Aaron Ballman2013-02-191-1/+1
| | | | | | assigning in the parameter Fixits. This fixes several failed assertions with MSVC debug builds. llvm-svn: 175483
* AArch64: add atomic support parameters to TargetInfoTim Northover2013-02-181-0/+4
| | | | | | | | This allows Clang to detect and deal wih __atomic_* operations properly on AArch64. Previously we produced an error when encountering them at high optimisation levels. llvm-svn: 175438
* Remove some stray uses of <ctype.h> functions.Jordan Rose2013-02-091-1/+1
| | | | | | These are causing assertions on some MSVC builds. llvm-svn: 174805
* CharInfo: Add missing "using namespace clang::charinfo" in .cpp file.Jordan Rose2013-02-081-2/+3
| | | | | | Should fix the MSC bot. llvm-svn: 174769
* Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h.Jordan Rose2013-02-083-14/+13
| | | | | | | Nearly all of these changes are one-to-one replacements; the few that aren't have to do with custom identifier validation. llvm-svn: 174768
* Pull Lexer's CharInfo table out for general use throughout Clang.Jordan Rose2013-02-082-0/+81
| | | | | | | | | | | Rewriting the same predicates over and over again is bad for code size and code maintainence. Using the functions in <ctype.h> is generally unsafe unless they are specified to be locale-independent (i.e. only isdigit and isxdigit). The next commit will try to clean up uses of <ctype.h> functions within Clang. llvm-svn: 174765
* Add a *San + modules FIXME.Richard Smith2013-02-071-0/+2
| | | | llvm-svn: 174565
* Add some missing PPC cpusBill Schmidt2013-02-011-9/+85
| | | | llvm-svn: 174215
* Add -mqpx and -mno-qpx feature flags to toggle use of the PPC QPX vector ↵Hal Finkel2013-02-011-1/+3
| | | | | | | | instruction set I've renamed the altivec test to ppc-features (because now there is more than one feature to test). llvm-svn: 174204
* Add PPC A2Q core and BG/Q preprocessor definitionsHal Finkel2013-02-011-2/+20
| | | | | | The a2q core is the variant of the a2 core used on the BG/Q supercomputers. llvm-svn: 174151
* Enable -fno-altivec, -mno-altivec for PowerPC.Bill Schmidt2013-02-011-0/+31
| | | | | | | | | | | Introduces these negation forms explicitly and uses them to control a new "altivec" target feature for PowerPC. This allows avoiding generating Altivec instructions on processors that support Altivec. The new test case verifies that the Altivec "lvx" instruction is not used when -fno-altivec is present on the command line. llvm-svn: 174140
* Add support for AArch64 target.Tim Northover2013-01-311-0/+188
| | | | | | | | | | | | | In cooperation with the LLVM patch, this should implement all scalar front-end parts of the C and C++ ABIs for AArch64. This patch excludes the NEON support also reviewed due to an outbreak of batshit insanity in our legal department. That will be committed soon bringing the changes to precisely what has been approved. Further reviews would be gratefully received. llvm-svn: 174055
* Changed to static_cast, due to post-commit review.Filipe Cabecinhas2013-01-301-2/+2
| | | | llvm-svn: 173980
* Cast to remove the narrowing conversion error in c++11.Filipe Cabecinhas2013-01-301-2/+2
| | | | llvm-svn: 173978
* Handle passing non-Qualtypes to %diff better. Instead of asserting, fall backRichard Trieu2013-01-301-5/+23
| | | | | | to printing the default case. This is a fix for PR15023. llvm-svn: 173965
* Move UTF conversion routines from clang/lib/Basic to llvm/lib/SupportDmitri Gribenko2013-01-303-649/+0
| | | | | | This is required to use them in TableGen. llvm-svn: 173924
* <limits.h> includes <linux/limits.h> on Linux, no need to special-case itDmitri Gribenko2013-01-261-3/+1
| | | | llvm-svn: 173578
* Since we're stuck with realpath for the header <-> module mapping,Douglas Gregor2013-01-261-0/+28
| | | | | | | | factor the realpath calls into FileManager::getCanonicalName() so we can cache the results of this epically slow operation. 5% speedup on my modules test, and realpath drops out of the profile. llvm-svn: 173542
* First pass at abstracting out a class for the target C++ ABI.John McCall2013-01-252-2/+19
| | | | llvm-svn: 173514
* PowerPC: fix __builtin_eh_return_data_regno returnAdhemerval Zanella2013-01-221-0/+5
| | | | llvm-svn: 173188
* [mips] Enable inlining of atomic ops on mips32 and mips64.Akira Hatanaka2013-01-181-0/+2
| | | | llvm-svn: 172855
* [ubsan] Add support for -fsanitize-blacklistWill Dietz2013-01-182-2/+8
| | | | llvm-svn: 172808
* Implement parsing, AST, (de-)serialization, and placeholder globalDouglas Gregor2013-01-141-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | metadata for linking against the libraries/frameworks for imported modules. The module map language is extended with a new "link" directive that specifies what library or framework to link against when a module is imported, e.g., link "clangAST" or link framework "MyFramework" Importing the corresponding module (or any of its submodules) will eventually link against the named library/framework. For now, I've added some placeholder global metadata that encodes the imported libraries/frameworks, so that we can test that this information gets through to the IR. The format of the data is still under discussion. llvm-svn: 172437
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-124-19/+17
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* Fix -Wunused-comparison for comparisons in arguments to function-like macros.Matt Beaumont-Gay2013-01-121-2/+9
| | | | | | | | | | | Previously, -Wunused-comparison ignored comparisons in both macro bodies and macro arguments, but we would still emit a -Wunused-value warning for either. Now we correctly emit -Wunused-comparison for expressions in macro arguments. Also, add isMacroBodyExpansion to SourceManager, to go along with isMacroArgExpansion. llvm-svn: 172279
OpenPOWER on IntegriCloud