summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
...
* Add __ARM_DWARF_EH__ to signify the use of Itanium ABI for unwind instructions.Renato Golin2015-02-271-2/+14
| | | | | | | | Equally to NetBSD, Bitrig will be using .eh_frame unwinding on ARM. Patch by Patrick Wildt. llvm-svn: 230763
* AMDGCN: Define cl_khr_fp64 when compiling OpenCL programsTom Stellard2015-02-271-0/+2
| | | | llvm-svn: 230761
* Win64: Silently ignore __stdcall, __fastcall, and __thiscallReid Kleckner2015-02-261-4/+16
| | | | | | | | | | MSVC doesn't warn on this. Users are expected to apply the WINAPI macro to functions passed by pointer to the Win32 API, and this macro expands to __stdcall. This means we end up with a lot of useless noisy warnings about ignored calling conventions when compiling code with clang for Win64. llvm-svn: 230668
* Add support for generating MIPS legacy NaNPetar Jovanovic2015-02-261-0/+4
| | | | | | | | | | | Currently, the NaN values emitted for MIPS architectures do not cover non-IEEE754-2008 compliant case. This change fixes the issue. Patch by Vladimir Radosavljevic. Differential Revision: http://reviews.llvm.org/D7882 llvm-svn: 230653
* 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
* Fixed typo.Zoran Jovanovic2015-02-231-1/+1
| | | | llvm-svn: 230253
* [Mips] Support mips32r3, mips32r5, mips64r3, mips64r5 MIPS ISA namesSimon Atanasyan2015-02-201-0/+12
| | | | | | | | | The patch teaches the clang's driver to understand new MIPS ISA names, pass appropriate options to the assembler, defines corresponding macros etc http://reviews.llvm.org/D7737 llvm-svn: 230092
* Change representation of member function pointers for MIPS targetsZoran Jovanovic2015-02-182-1/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D7148 llvm-svn: 229680
* [ARM] Add missing M/R class CPUsBradley Smith2015-02-181-7/+9
| | | | | | | | | | | | Add some of the missing M and R class Cortex CPUs, namely: Cortex-M0+ (called Cortex-M0plus for GCC compatibility) Cortex-M1 SC000 SC300 Cortex-R5 llvm-svn: 229661
* Remove the ABI from the target features. It's obsoleted byEric Christopher2015-02-171-3/+0
| | | | | | the -target-abi use and those features don't exist anymore. llvm-svn: 229526
* Prefer SmallVector::append/insert over push_back loops. Clang edition.Benjamin Kramer2015-02-171-8/+2
| | | | | | Same functionality, but hoists the vector growth out of the loop. llvm-svn: 229508
* Preprocessor: support __BIGGEST_ALIGNMENT__ macroTim Northover2015-02-061-2/+2
| | | | | | | | | | | For compatibility with GCC (and because it's generally helpful information otherwise inaccessible to the preprocessor). This appears to be canonically the alignment of max_align_t (e.g. on i386, __BIGGEST_ALIGNMENT__ is 4 even though vector types will be given greater alignment). Patch mostly by Mats Petersson llvm-svn: 228367
* Allow to specify multiple -fsanitize-blacklist= arguments.Alexey Samsonov2015-02-042-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Allow user to provide multiple blacklists by passing several -fsanitize-blacklist= options. These options now don't override default blacklist from Clang resource directory, which is always applied (which fixes PR22431). -fno-sanitize-blacklist option now disables all blacklists that were specified earlier in the command line (including the default one). This change depends on http://reviews.llvm.org/D7367. Test Plan: regression test suite Reviewers: timurrrr Subscribers: cfe-commits, kcc, pcc Differential Revision: http://reviews.llvm.org/D7368 llvm-svn: 228156
* Teaches the Clang driver to accept Cortex-A72Renato Golin2015-02-041-4/+4
| | | | | | | | | A previous commit added Cortex-A72 to LLVM, this teaches Clang to accept it as well. Patch by Ranjeet Singh. llvm-svn: 228141
* Add cc1 option '-fmodule-feature' to add custom values for 'requires' declsBen Langmuir2015-02-021-10/+15
| | | | | | | This allows clang-based tools to specify custom features that can be tested by the 'requires' declaration in a module map file. llvm-svn: 227868
* Windows: Fix _CPPUNWIND definition to follow -fcxx-exceptionsReid Kleckner2015-01-301-1/+1
| | | | | | | This is consistent with how we interpret the MSVC /EH flag, which controls -fcxx-exceptions. llvm-svn: 227616
* [mips] Pass ABI name via -target-abi instead of target-featuresDaniel Sanders2015-01-301-8/+0
| | | | | | | | | | | | | | Patch by Vladimir Medic Reviewers: echristo, atanasyan, dsanders Reviewed By: atanasyan, dsanders Subscribers: llvm-commits, echristo, atanasyan Differential Revision: http://reviews.llvm.org/D6091 llvm-svn: 227583
* Remove support for pnaclcall attributeDerek Schuff2015-01-281-5/+0
| | | | | | | | | | | | | | | | | | Summary: It was used for interoperability with PNaCl's calling conventions, but it's no longer needed. Also Remove NaCl*ABIInfo which just existed to delegate to either the portable or native ABIInfo, and remove checkCallingConvention which was now a no-op override. Reviewers: jvoung Subscribers: jfb, llvm-commits Differential Revision: http://reviews.llvm.org/D7206 llvm-svn: 227362
* R600: Use a Southern Islands GPU as the default for the amdgcn targetTom Stellard2015-01-281-2/+9
| | | | llvm-svn: 227315
* Begin to teach clang about the PS4.Alex Rosenberg2015-01-271-0/+29
| | | | llvm-svn: 227194
* [Mips] Fix type of 64-bit integer in case of MIPS N64 ABISimon Atanasyan2015-01-221-0/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D7127 llvm-svn: 226877
* Re-apply "r226548 - Introduce SPIR calling conventions" reverted in r226558.Alexander Kornienko2015-01-201-0/+9
| | | | | | | | | | | | | | | | | | | | | | | The test was fixed after a discussion with the revision author: the check pattern was made more flexible as the "%call" part is not what we actually want to check strictly there. The original patch description: === Introduce SPIR calling conventions. This implements Section 3.7 from the SPIR 1.2 spec: SPIR kernels should use "spir_kernel" calling convention. Non-kernel functions use "spir_func" calling convention. All other calling conventions are disallowed. The patch works only for OpenCL source. Any other uses will need to ensure that kernels are assigned the spir_kernel calling convention correctly. === llvm-svn: 226561
* Reverting r226548 as one of the tests fails in some configurations.Alexander Kornienko2015-01-201-9/+0
| | | | | | | | | | | | | | | | | | | | | | Here's the fail log from our internal setup: === .../tools/clang/clang -cc1 -internal-isystem .../tools/clang/staging/include -nostdsysteminc .../tools/clang/test/CodeGenOpenCL/spir-calling-conv.cl -triple spir-unknown-unknown -emit-llvm -o - FileCheck .../tools/clang/test/CodeGenOpenCL/spir-calling-conv.cl .../tools/clang/test/CodeGenOpenCL/spir-calling-conv.cl:11:12: error: expected string not found in input // CHECK: %call = tail call spir_func i32 @get_dummy_id(i32 0) ^ <stdin>:6:52: note: scanning from here define spir_kernel void @foo(i32 addrspace(1)* %A) #0 { ^ <stdin>:7:2: note: possible intended match here %1 = tail call spir_func i32 @get_dummy_id(i32 0) #2 ^ === Here's a failure on a public CI server: http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/1183/ llvm-svn: 226558
* Introduce SPIR calling conventions.Sameer Sahasrabuddhe2015-01-201-0/+9
| | | | | | | | | | | | | | This implements Section 3.7 from the SPIR 1.2 spec: SPIR kernels should use "spir_kernel" calling convention. Non-kernel functions use "spir_func" calling convention. All other calling conventions are disallowed. The patch works only for OpenCL source. Any other uses will need to ensure that kernels are assigned the spir_kernel calling convention correctly. llvm-svn: 226548
* Clean up a string comparison with StringRef. Suggestion by David Majnemer.Richard Trieu2015-01-171-1/+2
| | | | llvm-svn: 226359
* AArch64: implement AAPCS layout rules for bit-fields.Tim Northover2015-01-161-0/+7
| | | | llvm-svn: 226294
* [Mips] Define macros `__mips_isa_rev` in case of mips32r6/mips64r6 optionsSimon Atanasyan2015-01-151-0/+4
| | | | llvm-svn: 226136
* [cleanup] Re-sort *all* #include lines with llvm/utils/sort_includes.pyChandler Carruth2015-01-141-1/+1
| | | | | | | | | | Sorry for the noise, I managed to miss a bunch of recent regressions of include orderings here. This should actually sort all the includes for Clang. Again, no functionality changed, this is just a mechanical cleanup that I try to run periodically to keep the #include lines as regular as possible across the project. llvm-svn: 225979
* Sema: Relax parsing of '#' in constraintsDavid Majnemer2015-01-141-4/+0
| | | | llvm-svn: 225942
* Handle [extern_c] attribute in module printerBen Langmuir2015-01-131-2/+5
| | | | | | | I'm not sure why we have OS.indent(Indent+2) for the system attribute, but presumably we want the same behaviour for all attributes... llvm-svn: 225802
* PR22208: On FreeBSD systems, __STDC_MB_MIGHT_NEQ_WC__ is expected to be definedRichard Smith2015-01-131-0/+6
| | | | | | | | | | | even though every basic source character literal has the same numerical value as a narrow or wide character literal. It appears that the FreeBSD folks are trying to use this macro to mean something other than what the relevant standards say it means, but their usage is conforming, so put up with it. llvm-svn: 225751
* [mips] Explain why we need to always clobber for MIPS inline asm. NFC.Toma Tabacu2015-01-121-0/+21
| | | | llvm-svn: 225632
* Basic: Numeric constraints are multidigitDavid Majnemer2015-01-111-3/+9
| | | | | | | Clang would treat the digits in an "11m" input constraint separately as if it was handling constraint 1 twice instead of constraint 11. llvm-svn: 225606
* 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
OpenPOWER on IntegriCloud