summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Replace one-element SmallVectors inside DenseMaps with TinyPtrVector.Benjamin Kramer2014-05-032-5/+4
| | | | | | That's exactly what TinyPtrVector was designed for. No functionality change. llvm-svn: 207919
* [leaks] The PDFileEntry nodes in the FilesMade FoldingSet containChandler Carruth2014-05-031-0/+5
| | | | | | | | a std::vector that allocates on the heap. As a consequence, we have to run all of their destructors when tearing down the set, not just deallocate the memory blobs. llvm-svn: 207902
* [leaks] Re-shuffle code such that we don't create a basic block forChandler Carruth2014-05-031-9/+11
| | | | | | | | | | initializing an array unless we need it. Specifically, position the creation of a new basic block after we've checked all of the cases that bypass the need for it. Fixes another leak in test/CodeGen* found by LSan. llvm-svn: 207900
* [leaks] Don't leak the fake arguments we synthesize for LLVM optionChandler Carruth2014-05-031-2/+2
| | | | | | parsing. llvm-svn: 207899
* Eliminate ASTContext's DelayInitialization flagAlp Toker2014-05-033-22/+8
| | | | | | | | | Having various possible states of initialization following construction doesn't add value here. Also remove the unused size_reserve parameter. llvm-svn: 207897
* Fix a bunch of mislayered clang/Lex includes from SemaAlp Toker2014-05-0321-108/+91
| | | | llvm-svn: 207896
* Revert "Sema: Implement DR244"David Majnemer2014-05-031-3/+3
| | | | | | | | This was accidentally committed. This reverts commit r207892. llvm-svn: 207893
* Sema: Implement DR244David Majnemer2014-05-031-3/+3
| | | | | | | | | Naming the destructor using a typedef-name for the class-name is well-formed. This fixes PR19620. llvm-svn: 207892
* Rewrite NRVO determination. Track NRVO candidates on the parser Scope and ↵Nick Lewycky2014-05-038-65/+111
| | | | | | | | apply the NRVO candidate flag to all possible NRVO candidates here, and remove the flags in computeNRVO or upon template instantiation. A variable now has NRVO applied if and only if every return statement in that scope returns that variable. This is nearly optimal. Performs NRVO roughly 7% more often in a bootstrap build of clang. Patch co-authored by Richard Smith. llvm-svn: 207890
* MS ABI x64: Pass small objects with dtors but no copy ctors directlyReid Kleckner2014-05-032-16/+38
| | | | | | | | | | | | | | | Passing objects directly (in registers or memory) creates a second copy of the object in the callee. The callee always destroys its copy, but we also have to destroy any temporary created in the caller. In other words, copy elision of these kinds of objects is impossible. Objects larger than 8 bytes with non-trivial dtors and trivial copy ctors are still passed indirectly, and we can still elide copies of them. Fixes PR19640. llvm-svn: 207889
* [leaks] Fix a leak of a basic block when we successfully fold a switchChandler Carruth2014-05-031-7/+10
| | | | | | | | | | | condition to a constant and emit only the relevant statement. In that case, we were previously creating the epilog jump destination, a cleanup scope, and emitting any condition variable into it. Instead, we can emit the condition variable (if we have one) into the cleanup scope used for the entire folded case sequence. We avoid creating a jump dest, a basic block, and an extra cleanup scope. Win! llvm-svn: 207888
* Fix PR 19630, don't crash when file ends with whitespace.Richard Trieu2014-05-021-1/+2
| | | | llvm-svn: 207883
* Fix clang-cl Driver leakHans Wennborg2014-05-021-2/+3
| | | | | | | We were synthesizing new arguments from e.g. '/Tcfile.c' arguments, but didn't handle ownership correctly. llvm-svn: 207880
* [leaks] Fix a leak recently introduced to the pragma handling. ThisChandler Carruth2014-05-021-0/+1
| | | | | | | | | whole code would be better with std::unique_ptr managing the lifetimes of the handlers, but I wanted to make a targeted fix to the leaks first. With this change, all of the Clang preprocessor tests are leak free with LSan. llvm-svn: 207872
* Remove unused typedef found by gcc's -Wunused-local-typedefs.Nico Weber2014-05-021-2/+0
| | | | llvm-svn: 207870
* Fix null pointer segfault when calling dump() on a DeclStmt containing a ↵Alex McCarthy2014-05-021-0/+3
| | | | | | VarDecl. llvm-svn: 207867
* [driver] Enable the slp vectorizer at -Oz.Chad Rosier2014-05-021-6/+8
| | | | | | PR19568 llvm-svn: 207858
* Fix bad comment from r207573.Hans Wennborg2014-05-021-1/+1
| | | | llvm-svn: 207854
* Small formatting change.Eric Christopher2014-05-021-1/+1
| | | | llvm-svn: 207852
* Fixes issue with Allman BreakBeforeBraces for Objective C @interfaceDinesh Dwivedi2014-05-021-2/+5
| | | | | | | | | | | | | | | | | | | Before: @interface BSApplicationController () { @private id _extraIvar; } @end After: @interface BSApplicationController () { @private id _extraIvar; } @end llvm-svn: 207849
* Add support for -march=bdver4.Benjamin Kramer2014-05-021-0/+10
| | | | llvm-svn: 207848
* [ARM64/AArch64] Define the correct value for __ARM_NEON_FPBradley Smith2014-05-021-2/+2
| | | | llvm-svn: 207842
* [ARM64/AArch64] Hook up CRC32 subtarget feature to the driverBradley Smith2014-05-022-0/+23
| | | | llvm-svn: 207841
* Updated the attribute tablegen emitter for variadic arguments to emit a ↵Aaron Ballman2014-05-024-33/+20
| | | | | | range accessor in addition to the iterators. Updated code using iterators to use range-based for loops. llvm-svn: 207837
* Renaming the CallableState variadic attribute argument to be CallableStates. ↵Aaron Ballman2014-05-021-2/+2
| | | | | | No functional changes intended. llvm-svn: 207836
* XCore target: fix bug in dereferencing null pointer.Robert Lytton2014-05-021-6/+7
| | | | | | Also add basic cpp ABI tests where they differ from C ABI output. llvm-svn: 207834
* XCore target: fix handling of -g0 flagRobert Lytton2014-05-021-2/+3
| | | | llvm-svn: 207833
* XCore target: Add TypeString meta data to IR output.Robert Lytton2014-05-023-0/+551
| | | | | | | This includes the addition of the virtual function: TargetCodeGenInfo::EmitTargetMD() llvm-svn: 207832
* CodeGen: rename __builtin_arm_sevl to __sevlSaleem Abdulrasool2014-05-021-5/+5
| | | | | | | ACLE adds the __sevl() extension. Rename the hint from a custom name to the ACLE specified name. llvm-svn: 207829
* Reformat code following Preprocessor constructor updatesAlp Toker2014-05-023-16/+12
| | | | | | Landing this separately to make the previous commits easy to follow at home. llvm-svn: 207826
* Factor TargetInfo pointer/DelayInitialization bool pair out of Preprocessor ctorAlp Toker2014-05-023-13/+7
| | | | | | | | The Preprocessor::Initialize() function already offers a clear interface to achieve this, further reducing the confusing number of states a newly constructed preprocessor can have. llvm-svn: 207825
* Remove unused IncrProcessing parameter from Preprocessor ctorAlp Toker2014-05-022-4/+2
| | | | | | | Preprocessor::enableIncrementalProcessing() provides a consistent interface to enable the feature. llvm-svn: 207824
* Cut off parsing early during code completionAlp Toker2014-05-022-5/+4
| | | | | | | | | These calls to ConsumeCodeCompletionToken() caused parsing to continue needlessly when an immediate cutOffParsing() would do. Document the function to clarify its correct usage. llvm-svn: 207823
* Handle -fdelayed-template-parsing of out-of-line definitions ofHans Wennborg2014-05-022-64/+51
| | | | | | | | | | | class template member classes (PR19613) Also improve this code in general by implementing suggestions from Richard. Differential Revision: http://reviews.llvm.org/D3555?id=9020 llvm-svn: 207822
* Remove unused variable that I missed in my rush to fix the botsReid Kleckner2014-05-021-1/+1
| | | | llvm-svn: 207820
* Win64: Use ConvertType instead of checking the MS inheritanceReid Kleckner2014-05-021-12/+5
| | | | | | | | dependent-type-member-pointer.cpp is failing on a win64 bot because -fms-extensions is not enabled. Use ConvertType rather than relying on the inheritance attributes. It's less code, but probably slower. llvm-svn: 207819
* Win64: Pass member pointers larger than 8 bytes by referenceReid Kleckner2014-05-021-6/+23
| | | | | | | | | | | | | The Win64 ABI docs on MSDN say that arguments bigger than 8 bytes are passed by reference. Prior to this change, we were only applying this logic to RecordType arguments. This affects both the Itanium and Microsoft C++ ABIs. Reviewers: majnemer Differential Revision: http://reviews.llvm.org/D3587 llvm-svn: 207817
* MS ABI: Fix logic bug in member pointer null test codeReid Kleckner2014-05-021-1/+1
| | | | | | | | | This code is trying to test if the pointer is *not* null. Therefore we should use 'or' instead of 'and' to combine the results of 'icmp ne'. This logic is consistent with the general member pointer comparison code in EmitMemberPointerComparison. llvm-svn: 207815
* Bitrig's standard C++ standard library changed from libstdc++ to libc++.Richard Smith2014-05-012-4/+19
| | | | | | | Also, it uses libc++abi and needs pthread. While there, fix the libc++ include path. Patch by Patrick Wildt! llvm-svn: 207813
* Bitrig now supports TLS, so enable TLS support when targeting it. Patch by ↵Richard Smith2014-05-011-1/+0
| | | | | | Patrick Wildt! llvm-svn: 207812
* Use std::abs(int) portably.David Blaikie2014-05-011-2/+3
| | | | | | Code review feedback from Reid Kleckner on r207806. llvm-svn: 207811
* Fix some -Wabsolute-value warnings introduced in r207796.David Blaikie2014-05-011-2/+2
| | | | llvm-svn: 207806
* When sorting overload candidates, sort arity mismatches in ascendingKaelyn Takata2014-05-011-3/+16
| | | | | | | | order by the number of missing or extra parameters. This is useful if there are more than a few overload candidates with arity mismatches, particularly in the presence of -fshow-overloads=best. llvm-svn: 207796
* write a line marker right before adding included fileLubos Lunak2014-05-011-0/+2
| | | | | | | | Enclosing the original #include directive inside #if 0 adds lines, so warning/errors messages would have the line number off in "In file included from <file>:<line>:", so add line marker to fix this. llvm-svn: 207795
* do not use "1" for line marker for the predefines "file" eitherLubos Lunak2014-05-011-1/+5
| | | | | | Similar to r207764. llvm-svn: 207794
* PR19623: Support typedefs (and alias templates) of void.David Blaikie2014-05-011-3/+0
| | | | llvm-svn: 207781
* AST: Mangle reference temporaries reliablyDavid Majnemer2014-05-019-60/+93
| | | | | | | | | | | | | | | Summary: Previously, we would generate a single name for all reference temporaries and allow LLVM to rename them for us. Instead, number the reference temporaries as we build them in Sema. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3554 llvm-svn: 207776
* Fix typo (first commit to test commit access).Dinesh Dwivedi2014-05-011-1/+1
| | | | llvm-svn: 207775
* MSVCCompat: Don't produce an invalid AST when accepting void pseudo-dtorsReid Kleckner2014-05-011-2/+3
| | | | | | | | | | | | | We accept 'void *p; p->~void();' for MSVC compatibility since r148682. However, we were returning ExprError, rather than producing an AST, despite only diagnosing it with a warning. CodeGen noticed that the template function specialization had an invalid AST, and therefore didn't generate code for it. This change makes us produce an AST with a void pseudo-dtor call. Part of PR18256. llvm-svn: 207771
* Support 'remark' in VerifyDiagnosticConsumerTobias Grosser2014-05-012-0/+12
| | | | | | | After Diego added support for -Rpass=inliner we have now in-tree remarks which we can use to properly test this feature. llvm-svn: 207765
OpenPOWER on IntegriCloud