summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Return an ArrayRef instead of having two out parameters of a pointer and ↵Craig Topper2015-10-192-209/+108
| | | | | | length. NFC llvm-svn: 250676
* clang-format: Extend main header include sorting heuristic to Objective-C files.Nico Weber2015-10-191-1/+3
| | | | llvm-svn: 250675
* No functionality change, just fix whitespace, a typo and remove an unnecessaryNick Lewycky2015-10-183-6/+6
| | | | | | | emacs mode marker. (Changes left behind from another patch that ended up not working out.) llvm-svn: 250666
* CodeGen: simplify TargetOptions setupSaleem Abdulrasool2015-10-181-17/+12
| | | | | | | Do direct assignment of boolean values and regroup. Use StringSwitch instead of custom cases. NFC. llvm-svn: 250665
* Support linking against OpenMP runtime on FreeBSD.Dimitry Andric2015-10-181-0/+1
| | | | | | | | | | | | | | | Summary: Similar to rL248426 (which was a followup to rL248379 and rL248424), add the required libraries for OpenMP on the linker command line, and update the test case. Reviewers: emaste, theraven, joerg Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D13822 llvm-svn: 250657
* clang-format: [JS] Handle string literals spanning character classes.Daniel Jasper2015-10-181-92/+80
| | | | | | | | | | | | | | | If a RegExp contains a character group with a quote (/["]/), the trailing end of it is first tokenized as a string literal, which leads to the merging code seeing an unbalanced bracket. This change parses regex literals from the left hand side. That simplifies the parsing code and also allows correctly handling escapes and character classes, hopefully correctly parsing all regex literals. Patch by Martin Probst, thank you. Review: http://reviews.llvm.org/D13765 llvm-svn: 250648
* Make a bunch of static arrays const.Craig Topper2015-10-184-9/+9
| | | | llvm-svn: 250647
* Add an unnecessary makeArrayRef I add earlier. I didn't realize range-based ↵Craig Topper2015-10-181-1/+1
| | | | | | for loops worked with arrays. llvm-svn: 250646
* Use std::is_sorted instead of a manual loop.Craig Topper2015-10-181-5/+4
| | | | llvm-svn: 250645
* Replace a static compare function with a lambda. NFCCraig Topper2015-10-171-7/+5
| | | | llvm-svn: 250621
* Use a range-based for loop. Use std::end instead of pointer+array_lengthof. NFCCraig Topper2015-10-171-11/+9
| | | | llvm-svn: 250617
* [Frontend] Name variable correctly.Davide Italiano2015-10-171-2/+2
| | | | | | Reported by: Kim Grasman! llvm-svn: 250605
* Diagnose UnresolvedLookupExprs that resolve to instance members in static ↵Reid Kleckner2015-10-172-15/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | methods During the initial template parse for this code, 'member' is unresolved and we don't know anything about it: struct A { int member }; template <typename T> struct B : public T { using T::member; static void f() { (void)member; // Could be static or non-static. } }; template class B<A>; The pattern declaration contains an UnresolvedLookupExpr rather than an UnresolvedMemberExpr because `f` is static, and `member` should never be a field. However, if the code is invalid, it may become a field, in which case we should diagnose it. Reviewers: rjmccall, rsmith Differential Revision: http://reviews.llvm.org/D6700 llvm-svn: 250592
* [modules] Allow the error when explicitly loading an incompatible module fileRichard Smith2015-10-161-5/+14
| | | | | | | | | via -fmodule-file= to be turned off; in that case, just include the relevant files textually. This allows module files to be unconditionally passed to all compile actions via CXXFLAGS, and to be ignored for rules that specify custom incompatible flags. llvm-svn: 250577
* [Frontend/CompilerInvocation] Use range-based loop. NFC.Davide Italiano2015-10-161-2/+2
| | | | llvm-svn: 250559
* Refactor module lookup when looking up a header file, and wire through the ↵Richard Smith2015-10-163-93/+95
| | | | | | requesting module. No functionality change. llvm-svn: 250554
* Further increase helfulness of assert messageRichard Barton2015-10-161-4/+1
| | | | | | | | | If you increase the number of diags of a particular type by one more than the number available you get the nice assert message. If you do it by two more than available you get the old non-helpful message. Combining the two makes sense I think. llvm-svn: 250546
* Teach MyriadToolchain how to find its C++ header paths.James Y Knight2015-10-162-39/+60
| | | | | | | Also move the addLibStdCXXIncludePaths helper function from Linux to Generic_GCC. llvm-svn: 250536
* PS4: Make sure to add the sanitizer runtime before any linker inputFilipe Cabecinhas2015-10-161-2/+4
| | | | llvm-svn: 250514
* Test commitSean Eveson2015-10-161-1/+1
| | | | llvm-svn: 250500
* [X86] Add fxsr feature name for fxsave/fxrestore builtins.Craig Topper2015-10-162-1/+19
| | | | llvm-svn: 250498
* Make __builtin_object_size more conservativeGeorge Burgess IV2015-10-161-22/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | r246877 made __builtin_object_size substantially more aggressive with unknown bases if Type=1 or Type=3, which causes issues when we encounter code like this: struct Foo { int a; char str[1]; }; const char str[] = "Hello, World!"; struct Foo *f = (struct Foo *)malloc(sizeof(*f) + strlen(str)); strcpy(&f->str, str); __builtin_object_size(&f->str, 1) would hand back 1, which is technically correct given the type of Foo, but the type of Foo lies to us about how many bytes are available in this case. This patch adds support for this "writing off the end" idiom -- we now answer conservatively when we're given the address of the very last member in a struct. Differential Revision: http://reviews.llvm.org/D12169 llvm-svn: 250488
* [Sema] Fix address-of + enable_if overloading logicGeorge Burgess IV2015-10-161-57/+93
| | | | | | | | | | | | | | | | | Previously, our logic when taking the address of an overloaded function would not consider enable_if attributes, so long as all of the enable_if conditions on a given candidate were true. So, two functions with identical signatures (one with enable_if attributes, the other without), would be considered equally good overloads. If we were calling the function instead of taking its address, then the function with enable_if attributes would be preferred. This patch makes us prefer the candidate with enable_if regardless of if we're calling or taking the address of an overloaded function. Differential Revision: http://reviews.llvm.org/D13795 llvm-svn: 250486
* Add an error when calling a builtin that requires features that don'tEric Christopher2015-10-153-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | match the feature set of the function that they're being called from. This ensures that we can effectively diagnose some[1] code that would instead ICE in the backend with a failure to select message. Example: __m128d foo(__m128d a, __m128d b) { return __builtin_ia32_addsubps(b, a); } compiled for normal x86_64 via: clang -target x86_64-linux-gnu -c would fail to compile in the back end because the normal subtarget features for x86_64 only include sse2 and the builtin requires sse3. [1] We're still not erroring on: __m128i bar(__m128i const *p) { return _mm_lddqu_si128(p); } where we should fail and error on an always_inline function being inlined into a function that doesn't support the subtarget features required. llvm-svn: 250473
* Recommit "Clang support for -flto=thin."Teresa Johnson2015-10-155-22/+50
| | | | | | | | | This recommits r250398 with fixes to the tests for bot failures. Add "-target x86_64-unknown-linux" to the clang invocations that check for the gold plugin. llvm-svn: 250455
* Put back doxygen comment accidentally dropped in r250418.Benjamin Kramer2015-10-151-0/+5
| | | | llvm-svn: 250428
* clang-format/java: Break after annotations on fields in Chromium style.Nico Weber2015-10-152-2/+4
| | | | | | | | | | | Chromium follows the Android style guide for Java code, and that doesn't make the distinction between fields and non-fields that the Google Java style guide makes: https://source.android.com/source/code-style.html#use-standard-java-annotations https://google.github.io/styleguide/javaguide.html#s4.8.5-annotations llvm-svn: 250422
* [CodeGen] Remove dead code. NFC.Benjamin Kramer2015-10-1515-235/+1
| | | | llvm-svn: 250418
* Add support for CloudABI/aarch64.Ed Schouten2015-10-151-0/+2
| | | | | | | The core C library has already been ported over to aarch64 successfully, meaning there is no reason to hold this change back. llvm-svn: 250416
* Revert "Clang support for -flto=thin." (bot failures)Teresa Johnson2015-10-155-50/+22
| | | | | | | | | | | Rolling this back for now since there are a couple of bot failures on the new tests I added, and I won't have a chance to look at them in detail until later this afternoon. I think the new tests need some restrictions on having the gold plugin available. This reverts commit r250398. llvm-svn: 250402
* Clang support for -flto=thin.Teresa Johnson2015-10-155-22/+50
| | | | | | | | | | | | | | | | | | | Summary: Add clang support for -flto=thin option, which is used to set the EmitFunctionSummary code gen option on compiles. Add -flto=full as an alias to the existing -flto. Add tests to check for proper overriding of -flto variants on the command line, and convert grep tests to FileCheck. Reviewers: dexonsmith, joker.eph Subscribers: davidxl, cfe-commits Differential Revision: http://reviews.llvm.org/D11908 llvm-svn: 250398
* Headers: Switch some headers to LF line endings for consistency.Peter Collingbourne2015-10-155-343/+343
| | | | llvm-svn: 250388
* Update clang for DIBuilder::createSubroutineType API change.Eric Christopher2015-10-151-7/+6
| | | | | | Patch by Amaury Sechet! llvm-svn: 250373
* [X86] Add command line switches for xsave/xsaveopt/xsavec/xsaves. Macro ↵Craig Topper2015-10-151-1/+48
| | | | | | defines for the same. And add the flags to correct CPU names. llvm-svn: 250368
* Remove unnecessary braces in single-line 'if'.Douglas Katzman2015-10-151-2/+1
| | | | llvm-svn: 250363
* [X86] Use C+11 non-static data member initialization to initialize all the ↵Craig Topper2015-10-141-34/+30
| | | | | | | | X86 feature controls. NFC This simplifies the constructor initialization list and makes it less likely a feature flag will be forgotten there. llvm-svn: 250348
* Intrin.h: implement __emul and __emuluHans Wennborg2015-10-141-0/+11
| | | | llvm-svn: 250301
* Bring back r250262: PS4 toolchainFilipe Cabecinhas2015-10-146-7/+492
| | | | | | | | | | | | | | There was a minor problem with a test. Sorry for the noise yesterday. This patch adds missing pieces to clang, including the PS4 toolchain definition, added warnings, PS4 defaults, and Driver changes needed for our compiler. A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova! Differential Revision: http://reviews.llvm.org/D13482 llvm-svn: 250293
* Revert-to-green r250262 (PS4 toolchain patch)Sean Silva2015-10-146-492/+7
| | | | | | | It is breaking llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast e.g. http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/1362 llvm-svn: 250273
* [MSVC] Fix for http://llvm.org/PR24132: __declspec(property): double ↵Alexey Bataev2015-10-141-11/+12
| | | | | | | | | invocations of foo() when compiling foo()->propertyName Removes extra codegen for base expression of MS property call Differential Revision: http://reviews.llvm.org/D13375 llvm-svn: 250265
* I took care of the build problem in the commit 250252.Ekaterina Romanova2015-10-146-7/+492
| | | | | | | | | | | | | | Resubmitting the patch. This patch adds missing pieces to clang, including the PS4 toolchain definition, added warnings, PS4 defaults, and Driver changes needed for our compiler. A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova! Differential Revision: http://reviews.llvm.org/D13482 llvm-svn: 250262
* reverting my patch, cause build problemsEkaterina Romanova2015-10-146-492/+7
| | | | llvm-svn: 250257
* This patch adds missing pieces to clang, including the PS4 toolchainEkaterina Romanova2015-10-136-7/+492
| | | | | | | | | | | definition, added warnings, PS4 defaults, and Driver changes needed for our compiler. A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova! Differential Revision: http://reviews.llvm.org/D13482 llvm-svn: 250252
* [Sema/objc] When checking for unimplemented methods treat methods from class ↵Argyrios Kyrtzidis2015-10-131-4/+2
| | | | | | extensions as continuation of the class interface. llvm-svn: 250250
* [analyzer] Don’t invalidate CXXThis when conservatively evaluating const ↵Devin Coughlin2015-10-131-6/+29
| | | | | | | | | | | | methods (PR 21606) Prevent invalidation of `this' when a method is const; fixing PR 21606. A patch by Sean Eveson! Differential Revision: http://reviews.llvm.org/D13099 llvm-svn: 250237
* Add subtarget feature support for 3dnowa to the 3dnowa intrinsics.Eric Christopher2015-10-131-0/+4
| | | | llvm-svn: 250202
* Always pass a -dwarf-version argument to integrated as.Douglas Katzman2015-10-131-2/+3
| | | | | | | | This removes the default of 3 hidden in the assembler previously. Fixes breakage caused by r249655, reported by vsukharev. llvm-svn: 250173
* [Driver] Use the parent_path of the clang executable as the default InstalledDirBenjamin Kramer2015-10-131-0/+1
| | | | | | | | This is what most people want anyways. Clang -cc1's main() will override this but for other tools this is the most sensible default and avoids some work. llvm-svn: 250164
* [X86] Add XSAVE intrinsic familyAmjad Aboud2015-10-138-6/+264
| | | | | | | | | | | | Add intrinsics for the XSAVE instructions (XSAVE/XSAVE64/XRSTOR/XRSTOR64) XSAVEOPT instructions (XSAVEOPT/XSAVEOPT64) XSAVEC instructions (XSAVEC/XSAVEC64) XSAVES instructions (XSAVES/XSAVES64/XRSTORS/XRSTORS64) Differential Revision: http://reviews.llvm.org/D13014 llvm-svn: 250158
* [modules] Improve error message on failed module load due to a missing file toRichard Smith2015-10-131-1/+3
| | | | | | say which module file referenced the missing file. llvm-svn: 250140
OpenPOWER on IntegriCloud