summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
...
* [CMake] Put controversial always-recheck-revision-number behind an option.Jordan Rose2013-09-121-2/+8
| | | | | | | | | | | | | | | CMake does not have the ability to perform actions before calculating dependencies, so it can't know whether it needs to rebuild clangBasic to update for a new revision number. CLANG_ALWAYS_CHECK_VC_REV (off by default) will cause clangBasic to always be dirty by deleting the generated SVNVersion.inc after use; otherwise, SVNVersion.inc will always be updated, but only included in the final binary when clangBasic is rebuilt. It'd be great to find a better way to do this, but hopefully this is still an improvement over the complete lack of version information before. llvm-svn: 190613
* [CMake] Fix repository version checking dependencies harder.Jordan Rose2013-09-111-1/+1
| | | | | | Just always regenerate SVNVersion.inc. Don't worry about it not changing. llvm-svn: 190560
* [CMake] Always include the Clang repo version, just like the autoconf build.Jordan Rose2013-09-111-30/+20
| | | | | | | | | | | | | Now that LLVM's helper script GetSVN.cmake actually works consistently, there's no reason not to use it. This does mean that the clangBasic target is potentially always dirty, because CMake-generated projects do not necessarily recalculate dependencies after running each target. This should end 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. llvm-svn: 190557
* Fix a bug where -msse followed by -mno-sse would leave MMX enabled.Craig Topper2013-09-111-2/+4
| | | | llvm-svn: 190496
* Delete unused static class membersAlexey Samsonov2013-09-101-2/+0
| | | | llvm-svn: 190394
* Fix minor coding style issue in r190296 pointed out by Richard Smith.David Tweed2013-09-101-4/+4
| | | | llvm-svn: 190390
* Separate popcnt and sse4.2 feature control somewhat to match gcc behavior.Craig Topper2013-09-101-2/+11
| | | | | | | Enabling sse4.2 will implicitly enable popcnt unless popcnt is explicitly disabled. Disabling sse4.2 will not disable popcnt if popcnt is explicitly enabled. llvm-svn: 190387
* The OpenCL standard specifies the sizes and alignments of various types than ↵David Tweed2013-09-091-0/+29
| | | | | | | | | | | other C-family languages, as well as specifying errno is not set by the math functions. Make the clang front-end set those appropriately when the OpenCL language option is set. Patch by Erik Schnetter! llvm-svn: 190296
* Additional fix for PR16752 and for commit 190044:Stepan Dyatkovskiy2013-09-091-1/+2
| | | | | | -- For TargetInfo::getRealTypeByWidth also added support for IEEEQuad float type. llvm-svn: 190294
* Unbreak the Clang -Werror build after r190183.David Blaikie2013-09-061-0/+2
| | | | | | | Best guess at the right answer here - no guarantees of fitness for any particular purpose. llvm-svn: 190203
* Fix the profile of the function (fix commit 190048)Sylvestre Ledru2013-09-051-2/+1
| | | | llvm-svn: 190051
* Fix bug #17104 - Target info for GNU/kFreeBSD were missing.Sylvestre Ledru2013-09-051-0/+28
| | | | | | | | | As a result, Clang doesn't define the pre-processor macros that are expected on this platform. Thanks to Robert Millan for the patch llvm-svn: 190048
* Add new methods for TargetInfo:Stepan Dyatkovskiy2013-09-051-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | getRealTypeByWidth and getIntTypeByWidth for ASTContext names are almost same(invokes new methods from TargetInfo): getIntTypeForBitwidth and getRealTypeForBitwidth. As first commit for PR16752 fix: 'mode' attribute for unusual targets doesn't work properly Description: Troubles could be happened due to some assumptions in handleModeAttr function (see SemaDeclAttr.cpp). For example, it assumes that 32 bit integer is 'int', while it could be 16 bit only. Instead of asking target: 'which type do you want to use for int32_t ?' it just hardcodes general opinion. That doesn't looks pretty correct. Please consider the next solution: 1. In Basic/TargetInfo add getIntTypeByWidth and getRealTypeByWidth virtual methods. By default current behaviour could be implemented here. 2. Fix handleModeAttr according to new methods in TargetInfo. This approach is implemented in the patch attached to this post. Fixes: 1st Commit (Current): Add new methods for TargetInfo: getRealTypeByWidth and getIntTypeByWidth for ASTContext names are almost same(invokes new methods from TargetInfo): getIntTypeForBitwidth and getRealTypeForBitwidth 2nd Commit (Next): Fix SemaDeclAttr, handleModeAttr function. llvm-svn: 190044
* Add support for -march=slm, aka Intel Atom Silvermont.Benjamin Kramer2013-08-301-0/+7
| | | | llvm-svn: 189670
* Add ms_abi and sysv_abi attribute handling.Charles Davis2013-08-301-1/+8
| | | | | | Based on a patch by Benno Rice! llvm-svn: 189644
* ObjectiveC migrator: remove dead code.Fariborz Jahanian2013-08-291-9/+1
| | | | llvm-svn: 189592
* Make getDiagnosticsInGroup helper method a static function in the cpp file ↵Craig Topper2013-08-291-15/+16
| | | | | | and move the WarningOption struct into an anonymous namespace instead of clang namespace since it no longer needs to be forward declared in the header. llvm-svn: 189569
* Move individual group name strings from the OptionTable into one big char ↵Craig Topper2013-08-291-14/+11
| | | | | | array. Then only store offsets into it in the OptionTable. Saves about 4K from the clang binary and removes 400 relocation entries from DiagnosticIDs.o. llvm-svn: 189568
* Reorder and shrink size of NameLen field in diagnostic group table. Shaves ↵Craig Topper2013-08-281-5/+4
| | | | | | ~4K from clang binary. llvm-svn: 189445
* Merge diagnostic group tables to reduce data size and relocation entries.Craig Topper2013-08-281-10/+8
| | | | | | | | The individual group and subgroups tables are now two large tables. The option table stores an index into these two tables instead of pointers. This reduces the size of the options tabe since it doesn't need to store pointers. It also reduces the number of relocations needed. My build shows this reducing DiagnosticsIDs.o and the clang binary by ~20.5K. It also removes ~400 relocation entries from DiagnosticIDs.o. llvm-svn: 189438
* Delete CC_Default and use the target default CC everywhereReid Kleckner2013-08-271-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Makes functions with implicit calling convention compatible with function types with a matching explicit calling convention. This fixes things like calls to qsort(), which has an explicit __cdecl attribute on the comparator in Windows headers. Clang will now infer the calling convention from the declarator. There are two cases when the CC must be adjusted during redeclaration: 1. When defining a non-inline static method. 2. When redeclaring a function with an implicit or mismatched convention. Fixes PR13457, and allows clang to compile CommandLine.cpp for the Microsoft C++ ABI. Excellent test cases provided by Alexander Zinenko! Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1231 llvm-svn: 189412
* R600: Add local address pointer size to DataLayoutTom Stellard2013-08-271-0/+1
| | | | llvm-svn: 189302
* Update now that llvm uses the same feature names as the driver.Rafael Espindola2013-08-231-18/+14
| | | | llvm-svn: 189142
* Move -mfpmath handling to -cc1 and implement it for x86.Rafael Espindola2013-08-211-9/+87
| | | | | | | | | | | | | | | | | | | | | | | The original idea was to implement it all on the driver, but to do that the driver needs to know the sse level and to do that it has to know the default features of a cpu. Benjamin Kramer pointed out that if one day we decide to implement support for ' __attribute__ ((__target__ ("arch=core2")))', then the frontend needs to keep its knowledge of default features of a cpu. To avoid duplicating which part of clang handles default cpu features, it is probably better to handle -mfpmath in the frontend. For ARM this patch is just a small improvement. Instead of a cpu list, we check if neon is enabled, which allows us to reject things like -mcpu=cortex-a9 -mfpu=vfp -mfpmath=neon For X86, since LLVM doesn't support an independent ssefp feature, we just make sure the selected -mfpmath matches the sse level. llvm-svn: 188939
* Remove dead code.Rafael Espindola2013-08-211-10/+0
| | | | | | | setFeatureEnabled is never called with "32" or "64". The driver never passes it and mips' getDefaultFeatures sets the Features map directly. llvm-svn: 188913
* Move the logic for selecting the last feature in the command line to the driver.Rafael Espindola2013-08-211-16/+0
| | | | | | | This is a partial revert of r188817 now that the driver handles -target-feature in a single place. llvm-svn: 188910
* Don't disable SSE4A when disabling AVX.Rafael Espindola2013-08-211-1/+1
| | | | | | Thanks for Craig Topper for noticing it. llvm-svn: 188902
* Add avx512cd, avx512er, avx512pf feature flags and enable them on KNL CPU.Craig Topper2013-08-211-6/+40
| | | | llvm-svn: 188867
* Replace avx-512 with avx512f to match llvm side and what gcc patches appear ↵Craig Topper2013-08-211-10/+10
| | | | | | to be using. llvm-svn: 188860
* Centralize the logic for handling -m* options and fix pr16943.Rafael Espindola2013-08-201-24/+20
| | | | | | | | | This moves the logic for handling -mfoo -mno-foo from the driver to -cc1. It also changes -cc1 to apply the options in order, fixing pr16943. The handling of -mno-mmx -msse is now an explicit special case. llvm-svn: 188817
* Remove duplicated error checking.Rafael Espindola2013-08-201-111/+11
| | | | | | | The driver validates its options, so we don't need to redo the work in "clang -cc1". llvm-svn: 188806
* Remove dead code.Rafael Espindola2013-08-201-17/+0
| | | | llvm-svn: 188802
* Refactor the x86 feature handling.Rafael Espindola2013-08-201-185/+193
| | | | | | | This removes the very long chains of Feature["avx"] = Feature["sse42"] = ... = true; llvm-svn: 188799
* Change 'avx512' to 'avx-512' to match llvm backend.Craig Topper2013-08-201-16/+16
| | | | llvm-svn: 188762
* Add AVX-512 feature flag and knl cpu to clang.Craig Topper2013-08-201-14/+49
| | | | llvm-svn: 188758
* Revert r188756 because some other changes snuck in with it.Craig Topper2013-08-201-49/+14
| | | | llvm-svn: 188757
* Add AVX-512 feature flag and knl cpu to clang.Craig Topper2013-08-201-14/+49
| | | | llvm-svn: 188756
* Bump the value of the __APPLE_CC__ predefined macro up to 6000.Bob Wilson2013-08-191-1/+1
| | | | | | | | | The previous value was set to match some ancient version of Apple's GCC. The value should be higher than anything used by Apple's GCC, but we don't intend for this value to be updated in the future. We have other macros to identify compiler versions. <rdar://problem/14749599> llvm-svn: 188700
* Add XCore targetRobert Lytton2013-08-131-0/+61
| | | | llvm-svn: 188258
* [Mips] MSA frontend option supportJack Carter2013-08-121-2/+10
| | | | | | | | | | | This patch adds -mmsa and -mno-msa to the options supported by clang to enable and disable support for MSA. When MSA is enabled, a predefined macro '__mips_msa' is defined to 1. Patch by Daniel Sanders llvm-svn: 188184
* Remove "static" on simple temporary StringRef.Benjamin Kramer2013-08-091-1/+1
| | | | llvm-svn: 188088
* ObjectiveC migrator: Add another family of factory Fariborz Jahanian2013-08-021-0/+5
| | | | | | methods which can be migrated to instancetype. llvm-svn: 187672
* ObjectiveC migrator: Fixes public buildbot failures,Fariborz Jahanian2013-08-021-8/+0
| | | | | | in my previous patch which was reverted in r187657 llvm-svn: 187661
* revert patch I added in r187655. It still breaks publicFariborz Jahanian2013-08-021-0/+8
| | | | | | buildbot. llvm-svn: 187657
* ObjectiveC migration. Check-in patch reverted in r187634.Fariborz Jahanian2013-08-021-8/+0
| | | | | | Also removed check for "NS" prefix for class name. llvm-svn: 187655
* Revert "ObjectiveC migrator. Migrate to instancetype return type for mehods ↵Rafael Espindola2013-08-021-0/+8
| | | | | | | | | | with certain prefix selector matching their class names' suffix." This reverts commit r187626. It is breaking the bots. llvm-svn: 187634
* ObjectiveC migrator. Migrate to instancetype return typeFariborz Jahanian2013-08-011-8/+0
| | | | | | | for mehods with certain prefix selector matching their class names' suffix. llvm-svn: 187626
* Use llvm::sys::fs::UniqueID for windows and unix.Rafael Espindola2013-08-012-120/+59
| | | | | | | | | | | | | | | | | | | 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
* AArch64: initial NEON supportTim Northover2013-08-011-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch by Ana Pazos - Completed implementation of instruction formats: AdvSIMD three same AdvSIMD modified immediate AdvSIMD scalar pairwise - Completed implementation of instruction classes (some of the instructions in these classes belong to yet unfinished instruction formats): Vector Arithmetic Vector Immediate Vector Pairwise Arithmetic - Initial implementation of instruction formats: AdvSIMD scalar two-reg misc AdvSIMD scalar three same - Intial implementation of instruction class: Scalar Arithmetic - Initial clang changes to support arm v8 intrinsics. Note: no clang changes for scalar intrinsics function name mangling yet. - Comprehensive test cases for added instructions To verify auto codegen, encoding, decoding, diagnosis, intrinsics. llvm-svn: 187568
* Simplified SourceManager::translateLineCol a bit.Alexander Kornienko2013-07-291-6/+3
| | | | | | | | | | | | Reviewers: rsmith Reviewed By: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1183 llvm-svn: 187386
OpenPOWER on IntegriCloud