summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* SCEV: Use range-based for loop and fold variable into assert.Benjamin Kramer2014-05-101-6/+4
| | | | llvm-svn: 208476
* Wrap to 80 columns. No behavior change.Nico Weber2014-05-101-8/+12
| | | | llvm-svn: 208475
* Objective-C ARC. Add support for toll-free bridge Fariborz Jahanian2014-05-104-0/+159
| | | | | | | type ,and bridge attribute, checking with static_cast. // rdar://16756639 llvm-svn: 208474
* Analyzer: Make helper function static.Benjamin Kramer2014-05-101-1/+1
| | | | llvm-svn: 208473
* Add testsuite from OpenUHJim Cownie2014-05-10151-8/+14672
| | | | llvm-svn: 208472
* Update for Clang API change and move ClangTidyDiagnosticRenderer into an ↵Benjamin Kramer2014-05-102-9/+8
| | | | | | anonymous namespace while there. llvm-svn: 208471
* Decouple ExprCXX.h and DeclCXX.h and clean up includes a bit.Benjamin Kramer2014-05-1036-167/+196
| | | | | | | Required pulling LambdaExpr::Capture into its own header. No functionality change. llvm-svn: 208470
* ARM64: fix SELECT_CC lowering in absence of NaNs.Tim Northover2014-05-102-10/+24
| | | | | | | | | | We were swapping the true & false results while testing for FMAX/FMIN, but not putting them back to the original state if the later checks failed. Should fix PR19700. llvm-svn: 208469
* Add FIXME describing the limitation of using column info to disambiguate ↵David Blaikie2014-05-102-106/+55
| | | | | | | | | | | | | | | | | | | | inlining. Also tidy up, simplify, and extend the test coverage to demonstrate the limitations. This test should now fail if the bugs are fixed (& hopefully whoever ends up in this situation sees the FIXMEs and realizes that the test needs to be updated to positively test their change that has fixed some or all of these issues). I do wonder whether I could demonstrate breakage without a macro here, but any way I slice it I can't think of a way to get two calls to the same function on the same line/column in non-macro C++ - implicit conversions happen at the same location as an explicit function, but you'd never get an implicit conversion on the result of an explicit call to the same implicit conversion operator (since the value is already converted to the desired result)... llvm-svn: 208468
* Stop all the Decl classes poking at Redeclarable's data member directly, and ↵Richard Smith2014-05-108-28/+37
| | | | | | make getNextRedeclaration follow the pattern of its friends getPreviousDecl and getMostRecentDecl. llvm-svn: 208467
* Implement ARM EHABI exception handling.Logan Chien2014-05-107-18/+462
| | | | | | | This commit implements the ARM zero-cost exception handling support for libc++abi. llvm-svn: 208466
* Check exception specification with __cplusplus.Logan Chien2014-05-101-1/+1
| | | | | | | | | To allow the compilation with gcc, we can't use the __has_feature(cxx_noexcept) to detect the default destructor exception specification, which is noexcept(true) by default in C++11. We should use __cplusplus >= 201103L instead. llvm-svn: 208465
* InstrProf: Remove redundant declarationDuncan P. N. Exon Smith2014-05-101-1/+0
| | | | llvm-svn: 208464
* Fix llvm-nm to print the full 64-bit address for symbols in 64-bit object files.Kevin Enderby2014-05-096-68/+100
| | | | | | | | | | | | | | The implementation might be better to have a method is64Bit() in the class SymbolicFile instead of having the static routine isSymbolList64Bit() in llvm-nm.cpp . But this is very much in the sprit of isObject() and getNMTypeChar() in llvm-nm.cpp that has a series of if else statements based on the specific class of the SymbolicFile. I can update this if folks would like. Also the tests were updated to be explicit about checking the address for 64-bits or 32-bits from object files. llvm-svn: 208463
* InstrProf: Pacify buildbots after r208460Duncan P. N. Exon Smith2014-05-091-1/+0
| | | | llvm-svn: 208462
* SLPVectorizer: When sorting by domination for CSE don't assert on ↵Benjamin Kramer2014-05-092-1/+32
| | | | | | | | | | | | unreachable code. There is no total ordering if the CFG is disconnected. We don't care if we catch all CSE opportunities in dead code either so just exclude ignore them in the assert. PR19646 llvm-svn: 208461
* InstrProf: Test the functions in the runtimeDuncan P. N. Exon Smith2014-05-096-0/+175
| | | | | | | | | | | | Check that the profile runtime works as expected. This tests the functions that are meant to be available to advanced users. In particular, check that the `atexit()` hook can be disabled by defining a custom `__llvm_profile_runtime` variable, that the libc dependencies are optional, and that the various functions for writing out files work for basic cases. llvm-svn: 208460
* Revert "[ms-cxxabi] Add a new calling convention that swaps 'this' and 'sret'"Reid Kleckner2014-05-0910-124/+2
| | | | | | | | | | | | | | This reverts commit r200561. This calling convention was an attempt to match the MSVC C++ ABI for methods that return structures by value. This solution didn't scale, because it would have required splitting every CC available on Windows into two: one for methods and one for free functions. Now that we can put sret on the second arg (r208453), and Clang does that (r208458), revert this hack. llvm-svn: 208459
* MS ABI: Pass 'sret' as the second parameter of instance methodsReid Kleckner2014-05-099-41/+108
| | | | | | | | | | | | | | | | | Summary: MSVC always passes 'sret' after 'this', unlike GCC. This required changing a number of places in Clang that assumed the sret parameter was always first in LLVM IR. This fixes win64 MSVC ABI compatibility for methods returning structs. Reviewers: rsmith, majnemer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3618 llvm-svn: 208458
* delinearize together all accesses to the same arraySebastian Pop2014-05-092-11/+52
| | | | llvm-svn: 208457
* move findArrayDimensions to ScalarEvolutionSebastian Pop2014-05-094-16/+15
| | | | | | | we do not use the information from SCEVAddRecExpr to compute the shape of the array, so a better place for this function is in ScalarEvolution. llvm-svn: 208456
* fix typo in debug messageSebastian Pop2014-05-091-2/+2
| | | | llvm-svn: 208455
* Don't leak the CXStoredDiagnostics returned by clang_codeCompleteGetDiagnostic()Nico Weber2014-05-091-2/+12
| | | | | | | | | | | | | | | | | r144269 changed clang_disposeDiagnostic() to be a no-op, but didn't update code completion diagnostics. Let CXCodeCompleteResults store all diagnostics returned by clang_codeCompleteGetDiagnostic() and then free them up in clang_disposeCodeCompleteResults(). Code completion diagnostics referred to data stored in CXCodeCompleteResults before already, so it wasn't possible to refer to the results of clang_codeCompleteGetDiagnostic() after clang_disposeCodeCompleteResults() before this change already -- hence this should be a safe, backwards-compatible change. Leak found by LSan, fixes PR19690. llvm-svn: 208454
* Allow sret on the second parameter as well as the firstReid Kleckner2014-05-0910-46/+138
| | | | | | | | | | | | | | | | | | | | | | | | | MSVC always places the implicit sret parameter after the implicit this parameter of instance methods. We used to handle this for x86_thiscallcc by allocating the sret parameter on the stack and leaving the this pointer in ecx, but that doesn't handle alternative calling conventions like cdecl, stdcall, fastcall, or the win64 convention. Instead, change the verifier to allow sret on the second parameter. This also requires changing the Mips and X86 backends to return the argument with the sret parameter, instead of assuming that the sret parameter comes first. The Sparc backend also returns sret parameters in a register, but I wasn't able to update it to handle secondary sret parameters. It currently calls report_fatal_error if you feed it an sret in the second parameter. Reviewers: rafael.espindola, majnemer Differential Revision: http://reviews.llvm.org/D3617 llvm-svn: 208453
* [PECOFF] Resolve dllexported symbols.Rui Ueyama2014-05-093-2/+4
| | | | | | | | | | | | | | | | | We did not actively try to resolve dllexported symbols specified by /export or by a module definition file. So if exported symbols would be resolved for other reasons, like other symbols refer to them, that was fine, but if (unreferenced) exported symbols were in an archive file, and no one refers to that file in the archive, they remained unresolved. That would obviously cause the issue that dllexported symbols are not in a resultant DLL. In this patch, we create an undefined symbol for each dllexported symbol, to let the core linker to resolve it. llvm-svn: 208452
* [CMake] Use ExternalProject to build MSan-ified version of libcxx for unit ↵Alexey Samsonov2014-05-093-53/+71
| | | | | | | | | | | | | | | tests. This change lets MSan rely on libcxx's own build system instead of manually compiling its sources and setting up all the necessary compile flags. It would also simplify compiling libcxx with another sanitizers (in particular, TSan). The tricky part is to make sure libcxx is reconfigured/rebuilt when Clang or MSan runtime library is changed. "clobber" step used in this patch works well for me, but it's possible it would break for other configurations - will watch the buildbots. llvm-svn: 208451
* Don't emit -Wnon-virtual-dtor on final classes, since it's not a problem there.David Blaikie2014-05-092-2/+3
| | | | | | | | | The base class is the culprit/risk here - a sealed/final derived class with virtual functions and a non-virtual dtor can't accidentally be polymorphically destroyed (if the base class's dtor is protected - which also suppresses this warning). llvm-svn: 208449
* Fix ARM intrinsics-overflow.ll test on WindowsReid Kleckner2014-05-091-1/+1
| | | | | | | Windows on ARM only supports thumb mode execution, so we have to explicitly pick some non-Windows OS to test ARM mode codegen. llvm-svn: 208448
* Don't crash on redefinitions.Rafael Espindola2014-05-092-5/+14
| | | | | | | | One error we were not deleting the alias or putting it in the Module. The end result is that there was an use left of the aliasee when the module was deleted. llvm-svn: 208447
* [PECOFF] Fix dllexported name.Rui Ueyama2014-05-092-2/+9
| | | | | | | | Previously the handling of exported symbol was wrong if it's specified in a module definition file in the form of <externalname>=<internalname>. Export the correct symbol. llvm-svn: 208446
* PR19698, PR19674: enable __has_feature checks for cxx_generic_lambdas andRichard Smith2014-05-093-7/+32
| | | | | | | cxx_decltype_auto, and fix documentation of cxx_generic_lambdas and cxx_init_captures to specify the right feature-check name. llvm-svn: 208445
* Objective-C. Reduce false positive warnings with -Wselector by issuing warning Fariborz Jahanian2014-05-094-4/+35
| | | | | | | only when named selector is declared in TU and it is not declared in a system header. rdar://16600230 llvm-svn: 208443
* Amending r208439 to remove buildLExpr; this code isn't strictly required ↵Aaron Ballman2014-05-091-46/+0
| | | | | | yet, and fixes a dead code warning. llvm-svn: 208440
* Add the ability to use logical expressions for capability attributes. This ↵Aaron Ballman2014-05-095-1/+271
| | | | | | | | | | is to allow requirements to be expressed not just in terms of lists, but in terms of logical expressions. Eg) void foo(void) __attribute__((requires_capability((FlightControl || Worker) && !Logger))); This is WIP code. llvm-svn: 208439
* Don't leak MacroArgs when using code completion, PR19688.Nico Weber2014-05-091-1/+4
| | | | | | | | | | | | | | | | | | | | | | | MacroArgs are owned by TokenLexer, and when a TokenLexer is destroyed, it'll call its MacroArgs's destroy() method. destroy() only appends the MacroArg to Preprocessor's MacroArgCache list, and Preprocessor's destructor then calls deallocate() on all MacroArgs in that list. This method then ends up freeing the MacroArgs's memory. In a code completion context, Parser::cutOffParsing() gets called when a code completion token is hit, which changes the type of the current token to tok::eof. eof tokens aren't always ConsumeToken()ed, so Preprocessor::HandleEndOfFile() isn't always called, and that function is responsible for popping the macro stack. Due to this, Preprocessor::CurTokenLexer can be non-NULL when ~Preprocessor runs. It's a unique_ptr, so it ended up being destructed after ~Preprocessor completed, and its MacroArgs thus got added to the freelist after the code freeing things on the freelist had already completed. The fix is to explicitly call reset() before the freelist processing happens. (See the bug for more notes.) llvm-svn: 208438
* Fix broken buildJonathan Roelofs2014-05-091-1/+1
| | | | | | ARM64 backend was missing a required_library entry. llvm-svn: 208437
* ThreadSafetyAnalysis: Don't crash when trying to analyze objc methods.Benjamin Kramer2014-05-093-7/+28
| | | | | | | | | | | The thread safety analysis isn't very useful in ObjC (you can't annotate ObjC classes or methods) but we can still analyze the actual code and show violations in usage of C/C++ functions. Fixes PR19541, which does not use thread safety attributes but crashes with -Weverything. llvm-svn: 208436
* Add custom lowering for add/sub with overflow intrinsics to ARMLouis Gerbarg2014-05-093-0/+154
| | | | | | | | | | | | | This patch adds support to ARM for custom lowering of the llvm.{u|s}add.with.overflow.i32 intrinsics for i32/i64. This is particularly useful for handling idiomatic saturating math functions as generated by InstCombineCompare. Test cases included. rdar://14853450 llvm-svn: 208435
* Add ExtractValue instruction to SimplifyCFG's ComputeSpeculationCostLouis Gerbarg2014-05-092-0/+23
| | | | | | | | | | | | | Since ExtractValue is not included in ComputeSpeculationCost CFGs containing ExtractValueInsts cannot be simplified. In particular this interacts with InstCombineCompare's tendency to insert add.with.overflow intrinsics for certain idiomatic math operations, preventing optimization. This patch adds ExtractValue to the ComputeSpeculationCost. Test case included rdar://14853450 llvm-svn: 208434
* Revert "temporary commit."Rui Ueyama2014-05-096-110/+3
| | | | | | This reverts accidental commit r208427. llvm-svn: 208433
* R600/SI: Teach SIInstrInfo::moveToVALU() how to move S_LOAD_*_IMM instructionsTom Stellard2014-05-092-4/+49
| | | | llvm-svn: 208432
* R600/SI: Fix SMRD pattern for offsets > 32 bitsTom Stellard2014-05-093-7/+24
| | | | | | We were dropping the high bits of 64-bit immediate offsets. llvm-svn: 208431
* R600: Expand i64 SELECT_CCTom Stellard2014-05-092-0/+21
| | | | llvm-svn: 208430
* R600: Move MIN/MAX matching from LowerOperation() to PerformDAGCombine()Tom Stellard2014-05-095-24/+20
| | | | llvm-svn: 208429
* [PECOFF] DLL extension can be omitted in .def file.Rui Ueyama2014-05-092-1/+3
| | | | llvm-svn: 208428
* temporary commit.Rui Ueyama2014-05-096-3/+110
| | | | llvm-svn: 208427
* Pacify bots again - turns out my checkout was slightly polluted when I was ↵James Molloy2014-05-091-1/+1
| | | | | | reverting a olista01s change, and this pollution made it upstream during the revert checkin :/ Sorryemacs -nw lib/CodeGen/CodeGenModule.cpp llvm-svn: 208426
* Reapply r208417 (olista01 'ARM: HFAs must be passed in consecutive ↵James Molloy2014-05-094-53/+66
| | | | | | registers'). Bots are now pacified. llvm-svn: 208425
* Attempt to pacify the bots - this commit requires asserts.James Molloy2014-05-091-0/+1
| | | | llvm-svn: 208424
* Documented our "attach" extension packets.Jim Ingham2014-05-091-0/+55
| | | | llvm-svn: 208423
OpenPOWER on IntegriCloud