summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Move external instantiation for __vector_base_common to vector.cppEric Fiselier2017-06-153-2/+17
| | | | | | | | Previously the explicit instantiation for this was in locale.cpp, but that didn't make much sense. This patch creates a new vector.cpp source file to contain the explicit instantiation. llvm-svn: 305442
* Change how LocateDSYMInVincinityOfExecutable strips off pathJason Molenda2017-06-1511-32/+332
| | | | | | | | | | | | | | | | | | components to not depend on "." characters in the fileanme (e.g. "Foundation.framework") but instead to just use path separators. The names of the files themselves may have dots in them ("com.apple.sbd") which would break the old scheme. Also add a test case for this (macosx/find-dsym/bundle-with-dot-in-filename) as well as a test case for r304520 (macosx/find-dsym/deep-bundle) which needed a similar setup to test correctly on a single machine. (both of these are really testing remote debug session situations where the binary can't be found on the system where lldb is running, complicating the test case a bit.) <rdar://problem/31825940> llvm-svn: 305441
* [ODRHash] Hash TemplateArgument::Pack and TemplateTypeParmTypeRichard Trieu2017-06-152-0/+52
| | | | llvm-svn: 305440
* [Basic] Use a static_assert instead of using the old array of size -1 trick.Craig Topper2017-06-151-1/+1
| | | | llvm-svn: 305439
* [InstCombine] Add a test case to show a case where don't handle a partially ↵Craig Topper2017-06-151-0/+27
| | | | | | commuted IR. NFC llvm-svn: 305438
* [clang-format] Allow git-clang-format to handle empty extensions.Eric Fiselier2017-06-151-0/+2
| | | | | | | | | | | Most of libc++'s header files don't use extension. This prevents using git-clang-format on them, which is frustrating. This patch allows empty extensions to be passed using either the --extensions option, or the clangformat.extensions git-config value. llvm-svn: 305437
* [asan] Fix typo in doc string.Vitaly Buka2017-06-151-1/+1
| | | | llvm-svn: 305436
* Fix LexerTest signed/unsigned comparison.Erich Keane2017-06-151-1/+1
| | | | | | | | Werror was catching a signed/unsigned compare in an assert, correct the signed 'expected' value to be unsigned. llvm-svn: 305435
* Update Append Argument to more efficiently traverse tokensErich Keane2017-06-151-10/+9
| | | | | | | | | | | | | | | This function was previously making (correct) assumptions without complete knowledge of MacroArgs guarantees for Arguments. After going through Macro Args a bunch, I'd corrected the getNumArguments (and changed its name), however didn't realize this was depending on the behavior. This patch has version that depends on the corrected getNumMacroArguments's behavior, with the rest checked against my knowledge of the MacroArgs' token list. Commiting no-wait since the test is broken. llvm-svn: 305434
* [asan] Return allow_user_segv_handler=0 to fix compatibility issues.Vitaly Buka2017-06-154-5/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: After r303941 it was not possible to setup ASAN_OPTIONS to have the same behavior for pre r303941 and post r303941 builds. Pre r303941 Asan does not accept handle_sigbus=2. Post r303941 Asan does not accept allow_user_segv_handler. This fix ignores allow_user_segv_handler=1, but for allow_user_segv_handler=0 it will upgrade flags like handle_sigbus=1 to handle_sigbus=2. So user can set ASAN_OPTIONS=allow_user_segv_handler=0 and have same behavior on old and new clang builds (except range from r303941 to this revision). In future users which need to prevent third party handlers should switch to handle_sigbus=2 and remove allow_user_segv_handler as soon as suport of older builds is not needed. Related bugs: https://github.com/google/oss-fuzz/issues/675 https://bugs.chromium.org/p/chromium/issues/detail?id=731130 Reviewers: eugenis Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D34227 llvm-svn: 305433
* Handle -ast-dump-all when passed as the only option.Aaron Ballman2017-06-153-1/+3
| | | | | | Patch by Don Hinton llvm-svn: 305432
* Removal of accidental duplication in test assembly file. NFC.Wolfgang Pieb2017-06-141-250/+0
| | | | llvm-svn: 305431
* [DWARF] Minor coding style modifications, no functionality change.Spyridoula Gravani2017-06-141-7/+7
| | | | llvm-svn: 305430
* Fixing section name for Darwin platforms for sanitizer coverageGeorge Karpenkov2017-06-143-3/+3
| | | | | | On Darwin, section names have a 16char length limit. llvm-svn: 305429
* Inline a small function. NFC.Rui Ueyama2017-06-141-5/+1
| | | | llvm-svn: 305428
* [locale] Avoid copy of __atoms when char_type is charAditya Kumar2017-06-143-6/+107
| | | | | | | | | | | | | | | The function num_get<_CharT>::stage2_int_prep makes unnecessary copy of src into atoms when char_type is char. This can be avoided by creating a switch on type and just returning __src when char_type is char. Added the test case to demonstrate performance improvement. In order to avoid ABI incompatibilities, the changes are guarded with a macro _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET Differential Revision: https://reviews.llvm.org/D30268 Reviewed by: EricWF llvm-svn: 305427
* Update callbacks tracker to match change in 305425Erich Keane2017-06-141-1/+1
| | | | llvm-svn: 305426
* [Preprocessor]Correct Macro-Arg allocation of StringifiedArguments, Erich Keane2017-06-143-26/+81
| | | | | | | | | | | | | | | | | | | | | correct getNumArguments StringifiedArguments is allocated (resized) based on the size the getNumArguments function. However, this function ACTUALLY currently returns the amount of total UnexpArgTokens which is minimum the same as the new implementation of getNumMacroArguments, since empty/omitted arguments result in 1 UnexpArgToken, and included ones at minimum include 2 (1 for the arg itself, 1 for eof). This patch renames the otherwise unused getNumArguments to be more clear that it is the number of arguments that the Macro expects, and thus the maximum number that can be stringified. This patch also replaces the explicit memset (which results in value instantiation of the new tokens, PLUS clearing the memory) with brace initialization. Differential Revision: https://reviews.llvm.org/D32046 llvm-svn: 305425
* [testsuite] xfailed two tests that depend on NSString conforming to NSCopying.Sean Callanan2017-06-141-0/+4
| | | | | | | | | | | | | NSString is loaded from the DWARF, which doesn't have the concept of protocols. When this is used with the NSMutableDictionary type from Objective-C modules, this produces errors of the form error: cannot initialize a parameter of type 'id<NSCopying> _Nonnull' with an rvalue of type 'NSString *' We're aware of these problems and have an internal bug report filed (<rdar://problem/32777981>) llvm-svn: 305424
* Don't check side effects for functions outside of SCoPEli Friedman2017-06-142-4/+41
| | | | | | | | | | | | In r304074 we introduce a patch to accept results from side effect free functions into SCEV modeling. This causes rejection of cases where the call is happening outside the SCoP. This patch checks if the call is outside the Region and treats the results as a parameter (SCEVType::PARAM) to the SCoP instead of returning SCEVType::INVALID. Patch by Sameer Abu Asal. llvm-svn: 305423
* IR: Tweak the API around adding modules to the summary index.Peter Collingbourne2017-06-142-23/+22
| | | | | | | | | | | | | The current name (addModulePath) and return value (ModulePathStringTableTy::iterator) is a little confusing. This API adds a module, not just a path. And the iterator is basically just an implementation detail of the summary index. Address both of those issues by renaming to addModule and introducing a ModuleSummaryIndex::ModuleInfo type that the function returns. Differential Revision: https://reviews.llvm.org/D34124 llvm-svn: 305422
* Don't include TestingSupport in LLVM_LINK_COMPONENTS.Zachary Turner2017-06-143-4/+5
| | | | | | | | Instead use target_link_libraries directly. Thanks to Juergen Ributzka for the suggestion, which fixes an issue when llvm is configured with no targets. llvm-svn: 305421
* [ADT] Partial re-commit of r303383. Fix some Clang-tidy modernize-use-using ↵Eugene Zelenko2017-06-1411-186/+216
| | | | | | and Include What You Use warnings; other minor fixes (NFC). llvm-svn: 305419
* AST: Add missing break at end of switchDuncan P. N. Exon Smith2017-06-141-0/+1
| | | | llvm-svn: 305418
* Rework some metaprogramming to use the detection idiom; no functional changeMarshall Clow2017-06-141-99/+58
| | | | llvm-svn: 305417
* PredicateInfo: Don't insert conditional info when a conditional branch jumps ↵Daniel Berlin2017-06-143-0/+164
| | | | | | to the same target regardless of condition llvm-svn: 305416
* NewGVN: This is wrong by inspection, it will not cause an issue currently ↵Daniel Berlin2017-06-141-1/+1
| | | | | | due to other limitations, i believe. This also means i can't make a test for it. llvm-svn: 305415
* [x86] avoid unnecessary shuffle mask math in combineX86ShufflesRecursively()Sanjay Patel2017-06-141-6/+7
| | | | | | | | | | | | This is a follow-up to https://reviews.llvm.org/D34174 / https://reviews.llvm.org/rL305398. We mentioned replacing the multiplies with shifts, but the real win seems to be in bypassing the extra ops in the common case when the RootRatio and OpRatio are one. This gives us another 1-2% overall win for the test in PR32037: https://bugs.llvm.org/show_bug.cgi?id=32037 llvm-svn: 305414
* Allow -profile-guided-section-prefix more than onceDavid Callahan2017-06-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: At present, `-profile-guided-section-prefix` is a `cl::Optional` option, which means it demands to be passed exactly zero or one times. Our build system makes it pretty tricky to guarantee this. We often accidentally pass the flag more than once (but always with the same "false" value) which results in an error, after which compilation fails: ``` clang (LLVM option parsing): for the -profile-guided-section-prefix option: may only occur zero or one times! ``` While we work on improving our build system, it also seems reasonable just to allow `-profile-guided-section-prefix` to be passed more than once, by to `cl::ZeroOrMore`. Quoting [[ http://llvm.org/docs/CommandLine.html#controlling-the-number-of-occurrences-required-and-allowed | the documentation ]]: > The cl::ZeroOrMore modifier ... indicates that your program will allow the option to be specified zero or more times. > ... > If an option is specified multiple times for an option of the cl::opt class, only the last value will be retained. Reviewers: danielcdh Reviewed By: danielcdh Subscribers: twoh, david2050, llvm-commits Differential Revision: https://reviews.llvm.org/D34219 llvm-svn: 305413
* Remove lld toStringRef function.Zachary Turner2017-06-141-4/+0
| | | | | | | I added the same function in llvm, so this is causing an ambiguous symbol. llvm-svn: 305412
* [StringExtras] overload toHex for ArrayRef<uint8_t>Zachary Turner2017-06-141-1/+11
| | | | llvm-svn: 305411
* Add some const_casts in places where we were implicitly casting away ↵Marshall Clow2017-06-145-13/+15
| | | | | | constness. No functional change, but now they're explicit llvm-svn: 305410
* [EarlyCSE] Make PhiToCheck in removeMSSA() a set.Davide Italiano2017-06-142-2/+29
| | | | | | | | | | | This way we end up not looking at PHI args already removed. MemSSA now goes through the updater so we can prune it to avoid having redundant MemoryPHI arguments, but that doesn't quite work for the general case. Discussed with Daniel Berlin, fixes PR33406. llvm-svn: 305409
* Hide dbgs() stream for when built with -fmodules.Frederich Munch2017-06-144-8/+20
| | | | | | | | | | | | | | Summary: Make DebugCounter::print and dump methods to be const correct. Reviewers: aprantl Reviewed By: aprantl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34214 llvm-svn: 305408
* MC, Object: Reserve a section type, SHT_LLVM_ODRTAB, for the ODR table.Peter Collingbourne2017-06-147-0/+21
| | | | | | | | | | | | | | This is part of the ODR checker proposal: http://lists.llvm.org/pipermail/llvm-dev/2017-June/113820.html Per discussion on the gnu-gabi mailing list [1] the section type range 0x6fff4c00..0x6fff4cff is reserved for LLVM. [1] https://sourceware.org/ml/gnu-gabi/2017-q2/msg00030.html Differential Revision: https://reviews.llvm.org/D33978 llvm-svn: 305407
* Fix documentation.Rui Ueyama2017-06-141-5/+2
| | | | | | | | We do not actually accept .rc files. We only accept .res files. Pointed out by Eric Beckmann. llvm-svn: 305406
* Specified ReportError as noreturn friendly to old compilers.Galina Kistanova2017-06-141-9/+14
| | | | llvm-svn: 305405
* [sanitizer] Reverting D34152Kostya Kortchinsky2017-06-145-112/+20
| | | | | | | | | | | | | | | | | Summary: This broke thread_local_quarantine_pthread_join.cc on some architectures, due to the overhead of the stashed regions. Reverting while figuring out the best way to deal with it. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D34213 llvm-svn: 305404
* Supressed warning: declared ‘static’ but never defined.Galina Kistanova2017-06-141-0/+11
| | | | llvm-svn: 305403
* Test commit - NFC.Lei Huang2017-06-141-1/+1
| | | | | | Modified a comment to confirm commit access functionality. llvm-svn: 305402
* [PPC] Enhance altivec conversion function macros implementation.Tony Jiang2017-06-142-4/+37
| | | | | | | | | | Add checking for the second parameter of altivec conversion builtin to make sure it is compile-time constant int. This patch fixes PR33212: PPC vec_cst useless at -O0 Differential Revision: https://reviews.llvm.org/D34092 llvm-svn: 305401
* [ValueTracking] Correct early out in computeKnownBitsFromOperator to work ↵Craig Topper2017-06-142-1/+12
| | | | | | | | | | | | with non power of 2 bit widths There's an early out that's trying to detect when we don't know any bits that make up the legal range of a shift. The code subtracts one from BitWidth which creates a mask in the lower bits for power of 2 bit widths. This is then ANDed with the known bits to see if any of those bits are known. If the bit width isn't a power of 2 this creates a non-sensical mask. This patch corrects this by rounding up to a power of 2 before doing the subtract and mask. Differential Revision: https://reviews.llvm.org/D34165 llvm-svn: 305400
* Define _GNU_SOURCE for rtems c++James Y Knight2017-06-142-0/+4
| | | | | | | | | | This is required by the libc++ locale support. Patch by Walter Lee. Differential Revision: https://reviews.llvm.org/D34105 llvm-svn: 305399
* [x86] replace div/rem with shift/mask for better shuffle combining perfSanjay Patel2017-06-141-13/+31
| | | | | | | | | | | | We know that shuffle masks are power-of-2 sizes, but there's no way (?) for LLVM to know that, so hack combineX86ShufflesRecursively() to be much faster by replacing div/rem with shift/mask. This makes the motivating compile-time bug in PR32037 ( https://bugs.llvm.org/show_bug.cgi?id=32037 ) about 9% faster overall. Differential Revision: https://reviews.llvm.org/D34174 llvm-svn: 305398
* In several places in std::allocator<const T> (and one in shared_ptr, we were ↵Marshall Clow2017-06-141-9/+11
| | | | | | casting a 'const T*' to a 'void *' - implicitly casting away the const. Add const_cast to make that explicit. No functional change. llvm-svn: 305397
* Add an include of gtest-printers.h to appease the buildbots.Zachary Turner2017-06-141-1/+2
| | | | llvm-svn: 305396
* [gtest] Create a shared include directory for gtest utilities.Zachary Turner2017-06-1422-373/+441
| | | | | | | | | | | | | | | | | | | | | | | Many times unit tests for different libraries would like to use the same helper functions for checking common types of errors. This patch adds a common library with helpers for testing things in Support, and introduces helpers in here for integrating the llvm::Error and llvm::Expected<T> classes with gtest and gmock. Normally, we would just be able to write: EXPECT_THAT(someFunction(), succeeded()); but due to some quirks in llvm::Error's move semantics, gmock doesn't make this easy, so two macros EXPECT_THAT_ERROR() and EXPECT_THAT_EXPECTED() are introduced to gloss over the difficulties. Consider this an exception, and possibly only temporary as we look for ways to improve this. Differential Revision: https://reviews.llvm.org/D33059 llvm-svn: 305395
* PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+James Y Knight2017-06-141-0/+3
| | | | | | | | | | | | | | | | | | | | Newlib 2.5 added the locale management functions, so it should not include __nop_local_mgmt.h. This change adds proper guard around that include statement. For newlib 2.4, some releases contain these functions and some don't, and they all have the same version numbers. This patch will work properly with the initial "2.4.0" release which does not include these functions and require __nop_local_mgmt.h. This has been tested against newlib 2.2 and 2.5, and also sanity checks against other different version numbers. Patch by Martin J. O'Riordan and Walter Lee Differential Revision: https://reviews.llvm.org/D32146 llvm-svn: 305394
* Resubmit "[codeview] Make obj2yaml/yaml2obj support .debug$S..."Zachary Turner2017-06-1431-326/+865
| | | | | | | | | This was originally reverted because of some non-deterministic failures on certain buildbots. Luckily ASAN eventually caught this as a stack-use-after-scope, so the fix is included in this patch. llvm-svn: 305393
* Be more strict when checking the -flto option valueYuka Takahashi2017-06-142-4/+12
| | | | | | | | | | | | | | Summary: It seems -flto must be either "thin" or "full". I think the use of containValue is just a typo. Reviewers: ruiu, tejohnson Subscribers: mehdi_amini, inglorion Differential Revision: https://reviews.llvm.org/D34055 llvm-svn: 305392
OpenPOWER on IntegriCloud