summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Update for LLVM API change to remove discriminator tracking from ↵David Blaikie2014-08-211-2/+1
| | | | | | DILexicalBlock (in favor of DILexicalBlockFile - where a default arg is used to avoid the need for API churn of those callers) llvm-svn: 216240
* Update Clang for LLVM API change to use unique_ptr in ↵David Blaikie2014-08-211-3/+3
| | | | | | SourceManager::AddNewSourceBuffer llvm-svn: 216226
* Return statements are initialization; don't forget to revert the initializer toRichard Smith2014-08-211-1/+2
| | | | | | its syntactic form before re-analyzing it during template instantiation. llvm-svn: 216224
* Simplify this logic now that -W can't be applied to remarks. No ↵Richard Smith2014-08-211-8/+1
| | | | | | functionality change. llvm-svn: 216222
* Pass expressions instead of argument ranges to EmitCall/EmitCXXConstructorCall.Alexey Samsonov2014-08-216-64/+41
| | | | | | | | | | | | | | | | | | | | | | | Summary: This is a first small step towards passing generic "Expr" instead of ArgBeg/ArgEnd pair into EmitCallArgs() family of methods. Having "Expr" will allow us to get the corresponding FunctionDecl and its ParmVarDecls, thus allowing us to alter CodeGen depending on the function/parameter attributes. No functionality change. Test Plan: regression test suite Reviewers: rnk Reviewed By: rnk Subscribers: aemerson, cfe-commits Differential Revision: http://reviews.llvm.org/D4915 llvm-svn: 216214
* Coverage Mapping: store function's hash in coverage function records.Alex Lorenz2014-08-213-5/+8
| | | | | | | | | | The profile data format was recently updated and the new indexing api requires the code coverage tool to know the function's hash as well as the function's name to get the execution counts for a function. Differential Revision: http://reviews.llvm.org/D4995 llvm-svn: 216208
* Refactor TLI creation. NFC.Rafael Espindola2014-08-211-7/+10
| | | | llvm-svn: 216198
* Objective-C. Recover from missing interface decl.Fariborz Jahanian2014-08-211-1/+2
| | | | | | | and checking on availability of method declaration instead of crashing. // rdar://18059669 llvm-svn: 216191
* Range'ify some for loops over RecordDecl::fields()Hans Wennborg2014-08-214-18/+16
| | | | | | No functionality change. llvm-svn: 216183
* R600: Implement getPointerWidthV()Tom Stellard2014-08-211-0/+17
| | | | | | | This fixes a crash in the OCL_ImgProc/Canny OpenCV test. NOTE: This is a candidate for the 3.5 branch. llvm-svn: 216181
* R600: Add processor type for hainanTom Stellard2014-08-211-0/+1
| | | | llvm-svn: 216180
* [analyzer] Don't warn on virtual calls in ctors to final methods.Benjamin Kramer2014-08-211-3/+10
| | | | | | | The call will never go to a more derived class, but that's intentional in those cases. llvm-svn: 216167
* MS ABI: Don't always instantiate all members of dllexported class templates ↵Hans Wennborg2014-08-211-1/+11
| | | | | | | | | | | | | | | | (PR20163) Normally we mark all members of exported classes referenced to get them emitted. However, MSVC doesn't do this for class templates that are implicitly specialized or just have an explicit instantiation declaration. For such specializations, the members are emitted when referenced. The exception is the case when the dllexport attribute is propagated from a base class to a base class template that doesn't have an explicit attribute: in this case all methods of the base class template do get instantiated. llvm-svn: 216145
* Coverage mapping: fix mapping for objective-c for statementAlex Lorenz2014-08-201-0/+1
| | | | llvm-svn: 216082
* Coverage mapping: fix mapping for objective-c message expressionAlex Lorenz2014-08-201-0/+10
| | | | llvm-svn: 216081
* [analyzer] UnixAPI: Check that the third argument to open(2) (if present) is ↵Jordan Rose2014-08-201-0/+9
| | | | | | | | an integer. Patch by Daniel Fahlgren. llvm-svn: 216079
* [analyzer] UnixAPI: Check when open(2) is called with more than three arguments.Jordan Rose2014-08-201-21/+36
| | | | | | Patch by Daniel Fahlgren. llvm-svn: 216078
* [analyzer] IdenticalExpr: don't try to compare integer literals with ↵Jordan Rose2014-08-201-1/+6
| | | | | | | | different widths. PR20659. Patch by Anders Rönnholm. llvm-svn: 216076
* [analyzer] IdenticalExpr: use getBytes rather than getString to compare ↵Jordan Rose2014-08-201-1/+1
| | | | | | | | string literals. PR20693. Patch by Anders Rönnholm. llvm-svn: 216075
* Objective-C [qoi]. Provide fix-it hint when sendingFariborz Jahanian2014-08-191-5/+13
| | | | | | class method to an object receiver. rdar://16263395 llvm-svn: 216038
* Handle SPARC float command line parameters for SPARCv9.Brad Smith2014-08-191-1/+2
| | | | llvm-svn: 216029
* ext_vector IRGen. Patch to allow indexing into Fariborz Jahanian2014-08-192-3/+37
| | | | | | | ext_vector_type's 'hi/lo' components when used as lvalue. rdar://18031917 pr20697 llvm-svn: 215991
* C++1y is now C++14!Aaron Ballman2014-08-1922-77/+77
| | | | | | Changes diagnostic options, language standard options, diagnostic identifiers, diagnostic wording to use c++14 instead of c++1y. It also modifies related test cases to use the updated diagnostic wording. llvm-svn: 215982
* Move the body out of line to try to fix a buildbot.Rafael Espindola2014-08-191-0/+4
| | | | llvm-svn: 215980
* [OPENMP] Extract common superclass from all the loop directives. No ↵Alexander Musman2014-08-193-27/+27
| | | | | | functional changes (having common superclass is convenient for future loop directives CodeGen implementation) llvm-svn: 215975
* MS ABI: Update alias template mangling for VC "14" CTP 3David Majnemer2014-08-191-3/+2
| | | | | | | | MSVC "14" CTP 3 has fixed it's mangling for alias templates when used as template-template arguments; update clang to be compatible with this mangling. llvm-svn: 215972
* Update for llvm api change.Rafael Espindola2014-08-191-2/+0
| | | | llvm-svn: 215968
* Update link strategy for sanitizer runtime libraries on Linux:Alexey Samsonov2014-08-181-26/+33
| | | | | | | | | | | | | | | | | | | 1. Always put static sanitizer runtimes to the front of the linker invocation line. This was already done for all sanitizers except UBSan: in case user provides static libstdc++ we need to make sure that new/delete operator definitions are picked from sanitizer runtimes instead of libstdc++. We have to put UBSan runtime first for similar reasons: it depends on some libstdc++ parts (e.g. __dynamic_cast function), and has to go first in link line to ensure these functions will be picked up from libstdc++. 2. Put sanitizer libraries system dependencies (-ldl, -lpthread etc.) right after sanitizer runtimes. This will ensure these libraries participate in the link even if user provided -Wl,-as-needed flag. This should fix PR15823. 3. In case we link in several sanitizer runtimes (e.g. "ubsan", "ubsan_cxx" and "san"), add system dependencies (-ldl, -lpthread, ...) only once. llvm-svn: 215940
* Fix the rececl chain for redeclarations of predefined declsBen Langmuir2014-08-181-0/+2
| | | | | | | | | Predefined decls like 'Protocol' in objc are not loaded from AST files, so we cannot rely on loading the canonical decl to complete the redecl chain for redeclarations of these decls. The broken redecl chain was non-circular, so looping over redecls() would hang. llvm-svn: 215929
* Store std::unique_ptr in InMemoryBuffers. NFC.Rafael Espindola2014-08-182-23/+27
| | | | llvm-svn: 215928
* return a std::unique_ptr from getMainBufferWithPrecompiledPreamble. NFC.Rafael Espindola2014-08-181-19/+22
| | | | llvm-svn: 215927
* Use std::unique_ptr to simplify this code a bit.Rafael Espindola2014-08-181-11/+7
| | | | llvm-svn: 215926
* Inline function into only use.Rafael Espindola2014-08-181-6/+2
| | | | llvm-svn: 215925
* Simplify ASTUnit::Parse a bit by passing a std::unique_ptr to it.Rafael Espindola2014-08-181-28/+19
| | | | llvm-svn: 215900
* [x32] Handle -m64/-m32 switches by Driver in x32 modePavel Chupin2014-08-181-4/+8
| | | | | | | | | | | | | | | | | Summary: Adding remaining 2 cases handling: * from x32 to 32 via -m32 * from x32 to 64 via -m64 Test Plan: linux-ld test updated Reviewers: chandlerc, atanasyan Subscribers: cfe-commits, zinovy.nis Differential Revision: http://reviews.llvm.org/D4930 llvm-svn: 215899
* Add the break in the switch case (even if there is llvm_unreachable. It will ↵Sylvestre Ledru2014-08-181-1/+1
| | | | | | silent coverity warning CID 1231654 llvm-svn: 215897
* Update the call to llvm::sys::fs::UniqueID to match the definition: ↵Sylvestre Ledru2014-08-181-1/+1
| | | | | | | | UniqueID(uint64_t Device, uint64_t File) Fixes CID 1095247 llvm-svn: 215896
* Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid ↵Craig Topper2014-08-178-24/+24
| | | | | | needing to mention the size. llvm-svn: 215869
* Use the pointer-like API of ErrorOr.Rafael Espindola2014-08-171-1/+1
| | | | | | Thanks to David Blaikie for the suggestion. llvm-svn: 215866
* Use std::unique_ptr in a few methods that take ownership.Rafael Espindola2014-08-173-10/+14
| | | | llvm-svn: 215864
* Update for llvm api changes.Rafael Espindola2014-08-172-2/+2
| | | | llvm-svn: 215856
* Convert a few ownership comments with std::unique_ptr.Rafael Espindola2014-08-172-9/+8
| | | | llvm-svn: 215853
* Fix assertion on asm register that are "%"Olivier Goffart2014-08-171-0/+2
| | | | | | | | | | | Name might be empty again after we removed the '%' prefix and Name[0] would assert. Found on code like register int foo asm("%" MACRO); where MACRO was supposed to be defined in a header file that was not found. llvm-svn: 215834
* Uniformed parsing of GNU attributes at line beginnning and added GNU ↵Abramo Bagnara2014-08-161-0/+3
| | | | | | attributes parsing FIXMEs. llvm-svn: 215814
* When loading a module with no local entities, still bump the size of theBen Langmuir2014-08-162-16/+28
| | | | | | | | | | | | | | | | | tables that correspond to ContinuousRangeMaps, since the keys to those maps need to be unique, or we may map to the wrong offset. This fixes a crash + malformed AST file seen when loading some modules that import Cocoa on Darwin, which is a module with no contents except imports of other modules. Unfortunately I have not been able to find a reduced test case that reproduces this problem. Also add an assert that we aren't mapping one key to multiple values in CRM. We ought to be able to say there are no duplicate keys at all, but there are a bunch of 0 -> 0 mappings that are showing up, probably coming from the source location table. llvm-svn: 215810
* Make sure that vtables referenced from delay-parsed templates get referenced.Nico Weber2014-08-151-12/+15
| | | | | | | | | | | | | | This fixes PR20671, see the bug for details. In short, ActOnTranslationUnit() calls DefineUsedVTables() and only then PerformPendingInstantiations(). But PerformPendingInstantiations() is what does delayed template parsing, so vtables only references from late-parsed templates weren't marked used. As a fix, move the SavePendingInstantiationsAndVTableUsesRAII in PerformPendingInstantiations() up above the delayed template parsing code. That way, vtables referenced from templates end up in the RAII object, and the call to DefineUsedVTables() in PerformPendingInstantiations() marks them used. llvm-svn: 215786
* Add a RAII class for saving and restoring instantiations and uses. No ↵Nico Weber2014-08-151-39/+18
| | | | | | behavior change. llvm-svn: 215780
* Wrap to 80 columns, no behavior change.Nico Weber2014-08-151-1/+2
| | | | llvm-svn: 215776
* DebugInfo: While loop backedge should be attribute to the start of the while ↵David Blaikie2014-08-151-0/+1
| | | | | | | | | | | | | statement. A little test case simplification - this could be simplified further, though there are certainly interesting connections to the if/else construct so I'm hesitant to remove that entirely though it does appear somewhat unrelated. (similar fix to r215766, related to PR19864) llvm-svn: 215768
* DebugInfo: Fix PR19864 better - attribute the jump at the end of a range-for ↵David Blaikie2014-08-151-0/+1
| | | | | | | | | | | | | | | loop, to the start of the loop. This avoids debuggers stepping to strange places (like the last statement in the loop body, or the first statement in the if). This is not the whole answer, though - similar bugs no doubt exist in other loops (patches to follow) and attributing exception handling code to the correct line is also tricky (based on the previous fix to PR19864, exception handling is still erroneously attributed to the 'if' line). llvm-svn: 215766
OpenPOWER on IntegriCloud