summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
* Basic: [asmSymbolicName] follows the same rule as numbers in asm inputsDavid Majnemer2015-01-111-0/+4
| | | | | | | | | Input constraints like "0" and "[foo]" should be treated the same when it comes to their corresponding output constraint. This fixes PR21850. llvm-svn: 225605
* Basic: The asm constraint '#m' isn't valid, reject itDavid Majnemer2015-01-111-1/+7
| | | | llvm-svn: 225603
* Basic: The asm constraint '+#r' isn't valid, reject itDavid Majnemer2015-01-111-1/+5
| | | | llvm-svn: 225600
* Sema: The asm constraint '+&m' isn't valid, reject itDavid Majnemer2015-01-101-0/+7
| | | | | | Don't permit '+&m' to make it to CodeGen, it's invalid. llvm-svn: 225586
* When the diagnostic text is simply "%0", sanitize the string for anyRichard Trieu2015-01-081-0/+15
| | | | | | unprintable characters. Fixes PR22048. llvm-svn: 225423
* R600: Handle amdgcn tripleTom Stellard2015-01-061-0/+1
| | | | | | For now there is no difference between amdgcn and r600. llvm-svn: 225294
* Sema: analyze I,J,K,M,N,O constraintsSaleem Abdulrasool2015-01-062-0/+57
| | | | | | | | | | Add additional constraint checking for target specific behaviour for inline assembly constraints. We would previously silently let all arguments through for these constraints. In cases where the constraints were violated, we could end up failing to select instructions and triggering assertions or worse, silently ignoring instructions. llvm-svn: 225244
* Fix formatting. NFC.Craig Topper2014-12-271-2/+2
| | | | llvm-svn: 224877
* Update for llvm front end change and use the TargetOptions structEric Christopher2014-12-181-5/+0
| | | | | | for ABI. llvm-svn: 224493
* Make sure that arm-linux-gnu is still the apcs-gnu ABI when weEric Christopher2014-12-181-0/+3
| | | | | | | | | | | | use clang -cc1 matching the front end and backend. Fix up a couple of tests that were testing aapcs for arm-linux-gnu. The test that removes the aapcs abi calling convention removes them because the default triple matches what the backend uses for the calling convention there and so it doesn't need to be explicitly stated - see the code in TargetInfo.cpp. llvm-svn: 224491
* Destroy the diagnostic client first in ~DiagnosticEngineReid Kleckner2014-12-171-0/+6
| | | | | | | | | | | | Add a comment and a test to ~DiagnosticEngine about the ordering requirements on the teardown of DiagnosticConsumer. This could also be accomplished by rearranging the fields of ~DiagnosticEngine, but I felt that this was a better, more explicit solution. This fixes PR21911, an issue that occurred after the unique_ptr migration in r222193. llvm-svn: 224454
* [mips] Always clobber $1 for MIPS inline asm.Toma Tabacu2014-12-171-2/+1
| | | | | | | | | | | | | | | | | | | | Summary: Because GCC doesn't use $1 for code generation, inline assembly code can use $1 without having to add it to the clobbers list. LLVM, on the other hand, does not shy away from using $1, and this can cause conflicts with inline assembly which assumes GCC-like code generation. A solution to this problem is to make Clang automatically clobber $1 for all MIPS inline assembly. This is not the optimal solution, but it seems like a necessary compromise, for now. Reviewers: dsanders Reviewed By: dsanders Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6638 llvm-svn: 224428
* [modules] When constructing paths relative to a module, strip out /./ directoryRichard Smith2014-12-111-4/+39
| | | | | | | components. These sometimes get synthetically added, and we don't want -Ifoo and -I./foo to be treated fundamentally differently here. llvm-svn: 224055
* Emit warning if define or undef reserved identifier or keyword.Serge Pavlov2014-12-111-2/+27
| | | | | | Recommit of r223114, reverted in r223120. llvm-svn: 224012
* Revert r223578, perf data collection depends on the old symbol name.Paul Robinson2014-12-103-11/+11
| | | | llvm-svn: 223987
* cmake: Make SVNVersion.inc step depend on GetSVN.cmake.Nico Weber2014-12-101-2/+4
| | | | | | | | This way, the step generating SVNVersion.inc gets rerun every time someone changes GetSVN.cmake (which is the file that decides how the contents of SVNVersion.inc look). This makes hacking on GetSVN.cmake a bit easier. llvm-svn: 223861
* Re-work the Clang system for classifying Intel x86 CPUs to use theirChandler Carruth2014-12-091-38/+71
| | | | | | | | | | | | | | | | | | | | | | | | basic microarchitecture names, and add support (with tests) for parsing all of the masic microarchitecture names for CPUs documented to be accepted by GCC with -march. I didn't go back through the 32-bit-only old microarchitectures, but this at least brings the recent architecture names up to speed. This is essentially the follow-up to the LLVM commit r223769 which did similar cleanups for the LLVM CPUs. One particular benefit is that you can now use -march=westmere in Clang and get the LLVM westmere processor which is a different ISA variant (!) and so quite significant. Much like with r223769, I would appreciate the Intel folks carefully thinking about the macros defined, names used, etc for the atom chips and newest primary x86 chips. The current patterns seem quite strange to me, especially here in Clang. Note that I haven't replicated the per-microarchitecture macro defines provided by GCC. I'm really opposed to source code using these rather than using ISA feature macros. llvm-svn: 223776
* Rename a couple of preprocessor symbols to be more descriptive. NFC.Paul Robinson2014-12-063-11/+11
| | | | | | Review feedback from recent changes to GetSVN.cmake. llvm-svn: 223578
* Specify the name of the generated header only once. NFC.Paul Robinson2014-12-051-4/+7
| | | | | | This will also simplify a private patch that we have. llvm-svn: 223537
* Make DiagnosticErrorTrap work even if SuppressAllDiagnostics is enabled.Richard Smith2014-12-051-10/+11
| | | | | | Patch by Brad King! llvm-svn: 223525
* Have the driver and the target code agree on what the default ABIEric Christopher2014-12-051-1/+36
| | | | | | | | | is for each machine. Fix up darwin tests that were testing for aapcs on armv7-ios when the actual ABI is apcs. Should be no user visible change without -cc1. llvm-svn: 223429
* CUDA host device code with two code pathsReid Kleckner2014-12-031-8/+41
| | | | | | | | | | | | | | | | | | | | | | | Summary: Allow CUDA host device functions with two code paths using __CUDA_ARCH__ to differentiate between code path being compiled. For example: __host__ __device__ void host_device_function(void) { #ifdef __CUDA_ARCH__ device_only_function(); #else host_only_function(); #endif } Patch by Jacques Pienaar. Reviewed By: rnk Differential Revision: http://reviews.llvm.org/D6457 llvm-svn: 223271
* Make le64 DescriptionString consistent with other targets.JF Bastien2014-12-021-1/+1
| | | | | | | | | | | | | | | Summary: In particular, remove the defaults and reorder fields so it matches the result of DataLayout::getStringDescription(). Change by David Neto. Reviewers: dschuff, sdt Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6482 llvm-svn: 223140
* Reverted r223114, it caused failure on on clang-native-arm-cortex-a9.Serge Pavlov2014-12-021-27/+2
| | | | llvm-svn: 223120
* Emit warning if define or undef reserved identifier or keyword.Serge Pavlov2014-12-021-2/+27
| | | | | | | | | | | | | | | | | | | | | Summary: This change implements warnings if macro name is identical to a keyword or reserved identifier. The warnings are different depending on the "danger" of the operation. Defining macro that replaces a keyword is on by default. Other cases produce warning that is off by default but can be turned on using option -Wreserved-id-macro. This change fixes PR11488. Reviewers: rnk Reviewed By: rnk Subscribers: rnk, cfe-commits Differential Revision: http://reviews.llvm.org/D6194 llvm-svn: 223114
* [modules] Track how 'header' directives were written in module map files,Richard Smith2014-12-021-12/+13
| | | | | | | | | | | | | rather than trying to extract this information from the FileEntry after the fact. This has a number of beneficial effects. For instance, diagnostic messages for failed module builds give a path relative to the "module root" rather than an absolute file path, and the contents of the module includes file is no longer dependent on what files the including TU happened to inspect prior to triggering the module build. llvm-svn: 223095
* Update R600 address space map to include genericMatt Arsenault2014-12-011-2/+1
| | | | llvm-svn: 223046
* [OpenCL] Generic address space has been added in OpenCL v2.0.Anastasia Stulova2014-11-261-0/+7
| | | | | | | | | | To support it in the frontend, the following has been added: - generic address space type attribute; - documentation for the OpenCL address space attributes; - parsing of __generic(generic) keyword; - test code for the parser and diagnostics. llvm-svn: 222831
* [ARM] Define __ARM_FEATURE_DSP macro for CPUs that have DSP instructionsSergey Dmitrouk2014-11-251-0/+7
| | | | | | | | | | | | | | | | | Summary: This resolves [[ http://llvm.org/bugs/show_bug.cgi?id=17391 | PR17391 ]]. GCC's sources were used as a guide (couldn't find much information in ARM documentation). Reviewers: doug.gregor, asl Reviewed By: asl Subscribers: asl, aemerson, cfe-commits Differential Revision: http://reviews.llvm.org/D6339 llvm-svn: 222741
* [CMake] Use .svn/wc.db as our VC dependency if it's available.Jordan Rose2014-11-201-6/+10
| | | | | | | | | | | In order to keep SVNVersion.inc from being regenerated on every build, we need to specify as a dependency a file that only changes when the VC state updates. I previously just had .svn/entries, but that's only used by Subversion 1.6. 1.7 uses .svn/wc.db instead; prefer that if it's present. (Thanks, Nico!) llvm-svn: 222407
* [CMake] Always include the Clang repo version, just like the autoconf build.Jordan Rose2014-11-191-25/+43
| | | | | | | | | | | | | | Now that LLVM's helper script GetSVN.cmake actually works consistently, there's no reason not to use it. We avoid having to regenerate SVNVersion.inc every time by marking it as dependent on Git's reflog or SVN's entries file. This should end most of the issues of the AST format changing and breaking old module files: CMake-Clang should now detect that the version changed just like Autoconf-Clang has. Based on r190557. Depends on LLVM r222391. llvm-svn: 222393
* Standardize on StringMap::insert, removing uses of StringMap::GetOrCreateValue.David Blaikie2014-11-192-45/+40
| | | | llvm-svn: 222306
* Update for LLVM API changeDavid Blaikie2014-11-191-1/+1
| | | | llvm-svn: 222303
* Fix 80-column violations, trailing whitespace, comment text.Eric Christopher2014-11-181-63/+74
| | | | llvm-svn: 222269
* Make DiagnosticsEngine::takeClient return std::unique_ptr<>Alexander Kornienko2014-11-171-15/+5
| | | | | | | | | | | | | | | | | | Summary: Make DiagnosticsEngine::takeClient return std::unique_ptr<>. Updated callers to store conditional ownership using a pair of pointer and unique_ptr instead of a pointer + bool. Updated code that temporarily registers clients to use the non-owning registration (+ removed extra calls to takeClient). Reviewers: dblaikie Reviewed By: dblaikie Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6294 llvm-svn: 222193
* Basic: tweak commentSaleem Abdulrasool2014-11-171-0/+1
| | | | | | | Add a missing surrounding brace for doxygen group. This messes with pair jumping in vim and is annoying. NFC. llvm-svn: 222155
* Remove some redundant virtual specifiers on overriden functions.David Blaikie2014-11-141-7/+7
| | | | llvm-svn: 222024
* Complete support for the SD-6 standing document (based off N4200) with ↵Aaron Ballman2014-11-141-2/+2
| | | | | | support for __has_cpp_attribute. llvm-svn: 221991
* [Sanitizer] Refactor SanitizerArgs parsing in Driver.Alexey Samsonov2014-11-141-0/+4
| | | | | | | | | | | Remove flag parsing details from the public header. Use SanitizerSet to represent the set of enabled sanitizers. Cleanup the implementation: update the comments to reflect reality, remove dead code. No functionality change. llvm-svn: 221968
* Remove -fseh-exceptions in favor of checking the tripleReid Kleckner2014-11-141-0/+4
| | | | | | | | | This option was misleading because it looked like it enabled the language feature of SEH (__try / __except), when this option was really controlling which EH personality function to use. Mingw only supports SEH and SjLj EH on x86_64, so we can simply do away with this flag. llvm-svn: 221963
* Hook up FreeBSD AArch64 supportEd Maste2014-11-131-0/+4
| | | | | | Patch from Andrew Turner. llvm-svn: 221900
* [Sanitizer] Refactor sanitizer options in LangOptions.Alexey Samsonov2014-11-113-18/+33
| | | | | | | | | | | | | | | | | | Get rid of ugly SanitizerOptions class thrust into LangOptions: * Make SanitizeAddressFieldPadding a regular language option, and rely on default behavior to initialize/reset it. * Make SanitizerBlacklistFile a regular member LangOptions. * Introduce the helper class "SanitizerSet" to represent the set of enabled sanitizers and make it a member of LangOptions. It is exactly the entity we want to cache and modify in CodeGenFunction, for instance. We'd also be able to reuse SanitizerSet in CodeGenOptions for storing the set of recoverable sanitizers, and in the Driver to represent the set of sanitizers turned on/off by the commandline flags. No functionality change. llvm-svn: 221653
* Introduce a SanitizerKind enum to LangOptions.Alexey Samsonov2014-11-072-5/+13
| | | | | | | | | | | | | Use the bitmask to store the set of enabled sanitizers instead of a bitfield. On the negative side, it makes syntax for querying the set of enabled sanitizers a bit more clunky. On the positive side, we will be able to use SanitizerKind to eventually implement the new semantics for -fsanitize-recover= flag, that would allow us to make some sanitizers recoverable, and some non-recoverable. No functionality change. llvm-svn: 221558
* Remove references to the cortex-a9-mp CPU.Charlie Turner2014-11-061-3/+2
| | | | | | | | | | This CPU definition is redundant. The Cortex-A9 is defined as supporting multiprocessing extensions. Remove references to this CPU. This CPU was recently removed from LLVM. See http://reviews.llvm.org/D6057 Change-Id: I62ae7cc656fcae54fbaefc4b6976e77e694a8678 llvm-svn: 221458
* [X86] Slightly refactor default features for AMD bdver cpus (NFC). Also add ↵Andrea Di Biagio2014-11-061-12/+7
| | | | | | | | | | | | | | | | | | | missing checks to test for target features. This patch simplifies how default target features are set for AMD bdver2 and bdver1. In particular, method 'getDefaultFeatures' now implements a fallthrough from case 'CK_BDVER2' to case 'CK_BDVER1'. That is because 'bdver2' has the same features available in bdver1 plus BMI, FMA, F16C and TBM. This patch also adds missing checks for predefined macros in test predefined-arch-macros.c. In the case of BTVER2, the test now also checks for F16C, BMI and PCLMUL. In the case of BDVER3 and BDVER4, the test now also checks for the presence of FSGSBASE. Differential Revision: http://reviews.llvm.org/D6134 llvm-svn: 221449
* [X86] Use fallthroughs to reduce the number of calls to setFeatureEnabled ↵Craig Topper2014-11-061-98/+45
| | | | | | for different CPUs. llvm-svn: 221437
* [x86] Add cx16 feature to KNL, SKX, and CoreAVXi CPUs.Craig Topper2014-11-031-2/+5
| | | | llvm-svn: 221132
* [x86] Realphabetize the feature string decoding function since it was mostly ↵Craig Topper2014-11-031-4/+4
| | | | | | in alphabetical order. llvm-svn: 221131
* Add FSGSBASE intrinsics to x86 intrinsic headers.Craig Topper2014-11-031-7/+24
| | | | llvm-svn: 221130
* [PowerPC] Change PPCTargetInfo::hasFeature() to use StringSwitchBill Schmidt2014-11-021-3/+5
| | | | | | Implement post-commit comment on r220989 from Eric Christopher. llvm-svn: 221099
OpenPOWER on IntegriCloud