summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* [PCH] When chaining a PCH and serializing HeaderSearch, make sure the ↵Argyrios Kyrtzidis2011-11-131-4/+6
| | | | | | | | | HeaderFileInfos from the primary PCH is deserialized, otherwise we lose info that headers were already #imported/#included. llvm-svn: 144510
* Don't crash when a duplicate interface/protocol is inside an extern "C" context.Argyrios Kyrtzidis2011-11-131-19/+32
| | | | llvm-svn: 144508
* Fix the signature of the getcontext builtin. Patch by Dimitry Andric.Rafael Espindola2011-11-134-2/+39
| | | | llvm-svn: 144505
* Silence unused variable warning.Benjamin Kramer2011-11-131-2/+2
| | | | llvm-svn: 144500
* When reference binding array rvalues, such as those created by compoundPeter Collingbourne2011-11-131-1/+1
| | | | | | literals of array type, materialise a temporary. llvm-svn: 144483
* Represent an APValue based on a Decl as that Decl, rather than a DeclRefExprRichard Smith2011-11-124-117/+102
| | | | | | | | or MemberExpr which refers to it. As a side-effect, MemberExprs which refer to static member functions and static data members are now emitted as constant expressions. llvm-svn: 144468
* Add a method in ASTMutationListener for the last use of Decl's ↵Argyrios Kyrtzidis2011-11-122-10/+13
| | | | | | | | [is/set]ChangedSinceDeserialization and remove them. llvm-svn: 144466
* [PCH] When completing an objc forward reference, do not serialize the chain ↵Argyrios Kyrtzidis2011-11-125-31/+42
| | | | | | | | | | | | | | | of its categories because it is going to be rewritten (and the chain will be serialized again), otherwise we may form a cycle in its categories list when deserializing. Also introduce ASTMutationListener::CompletedObjCForwardRef to notify that a forward reference was completed; using Decl's isChangedSinceDeserialization/setChangedSinceDeserialization is bug inducing and kinda gross, we should phase it out. Fixes infinite loop in rdar://10418538. llvm-svn: 144465
* Remove unnecessary 'else's after 'return's.David Blaikie2011-11-121-1/+2
| | | | llvm-svn: 144464
* Add missing casts to AST.Eli Friedman2011-11-121-1/+8
| | | | llvm-svn: 144455
* Implement a minor optimization when loading module maps to satisfy aDouglas Gregor2011-11-121-14/+22
| | | | | | | | module import: don't re-check for a loaded module unless we've actually loaded a new module map file. Already-loaded module map files aren't interesting. llvm-svn: 144435
* When searching for a module, speculatively load module maps to see ifDouglas Gregor2011-11-121-40/+75
| | | | | | | | the module is described in one of the module maps in a search path or in a subdirectory off the search path that has the same name as the module we're looking for. llvm-svn: 144433
* Teach the search for modules to consider modules described by a moduleDouglas Gregor2011-11-112-1/+19
| | | | | | | | | | | | | | map, so long as they have an umbrella header. This makes it possible to introduce a module map + umbrella header for a given set of headers, to turn it into a module. There are two major deficiencies here: first, we don't go hunting for module map files when we just see a module import (so we won't know about the modules described therein). Second, we don't yet have a way to build modules that don't have umbrella headers, or have incomplete umbrella headers. llvm-svn: 144424
* Wire up the mapping from header files mentioned in module maps over toDouglas Gregor2011-11-112-3/+22
| | | | | | | the corresponding (top-level) modules. This isn't actually useful yet, because we don't yet have a way to build modules out of module maps. llvm-svn: 144410
* Resolve the header files named in module map "header" and "umbrella"Douglas Gregor2011-11-111-6/+70
| | | | | | declarations to actual files. llvm-svn: 144408
* Rename SPECIAL_TYPE_jmp_buf and SPECIAL_TYPE_sigjmp_buf to follow theDouglas Gregor2011-11-111-2/+2
| | | | | | convention of SPECIAL_TYPE*. llvm-svn: 144403
* Introduce basic support for parsing module map files.Douglas Gregor2011-11-113-1/+598
| | | | | | | | | | | | | | Module map files provide a way to map between headers and modules, so that we can layer a module system on top of existing headers without changing those headers at all. This commit introduces the module map file parser and the module map that it generates, and wires up the module map file parser so that we'll automatically find module map files as part of header search. Note that we don't yet use the information stored in the module map. llvm-svn: 144402
* When importing an ObjCInterfaceDecl, ensure thatSean Callanan2011-11-111-0/+11
| | | | | | | | superclass information is imported before validating it. This fixes spurious "incompatible superclasses" errors in LLDB. llvm-svn: 144393
* Constant expression evalation: const_cast support.Richard Smith2011-11-111-6/+1
| | | | llvm-svn: 144382
* Search for libstdc++.dylib in llvm-gcc's files on darwin10. rdar://10419079Bob Wilson2011-11-111-0/+5
| | | | llvm-svn: 144381
* Reduce the constexpr stack pressure somewhat. Hopefully this will be enough toRichard Smith2011-11-111-1/+1
| | | | | | please the buildbots. llvm-svn: 144375
* Constant expression evaluation: support for constexpr member functions. ThisRichard Smith2011-11-111-46/+118
| | | | | | | | | | | reinstates r144273; a combination of r144333's fix for NoOp rvalue-to-lvalue casts and some corresponding changes here resolve the regression which that caused. This patch also adds support for some additional forms of member function call, along with additional testing. llvm-svn: 144369
* Don't apply NRVO to over-aligned variables. The caller onlyJohn McCall2011-11-111-7/+23
| | | | | | guarantees alignment up to the ABI alignment of the return type. llvm-svn: 144364
* Be sure to insulate block literals from any cleanups in theirJohn McCall2011-11-111-0/+12
| | | | | | | enclosing full-expressions. It is somewhat amazing that this hasn't come up as a problem before. llvm-svn: 144362
* Add Linux multiarch include directories for mips/mipsel. Patch from Simon ↵Eli Friedman2011-11-111-0/+10
| | | | | | Atanasyan. llvm-svn: 144358
* Make sure that restrict-qualifying an array actually adds a restrict ↵Eli Friedman2011-11-111-2/+1
| | | | | | qualifier. PR11354. (operator bool() is evil!) llvm-svn: 144355
* I predict that HeaderSearch will need the ability to generateDouglas Gregor2011-11-113-4/+7
| | | | | | diagnostics in the future. Make it so. llvm-svn: 144347
* Move "Unqualified lookup into dependent bases of class templates" Microsoft ↵Francois Pichet2011-11-111-1/+1
| | | | | | specific behavior from -fms-extensions to -fms-compatibility. llvm-svn: 144341
* [static analyzer] be more specific when running removeDeadBindings. Instead ↵Ted Kremenek2011-11-111-1/+1
| | | | | | of seeing if the predecessor node was a non-StmtPoint, check if it is specifically a BlockEntrance node. llvm-svn: 144340
* Add top-level driver option '--serialize-diagnostics' for serialize compiler ↵Ted Kremenek2011-11-111-0/+6
| | | | | | diagnostics to a file. llvm-svn: 144339
* Implicit casts from rvalue to lvalue are not meaningful. Don't accidentally addRichard Smith2011-11-102-1/+2
| | | | | | | | | | them when performing a const conversion on the implicit object argument for a member operator call on an rvalue. No change to the testsuite: the test for this change is that the added assertion does not fire any more. llvm-svn: 144333
* [static analyzer]: only call RemoveDeadBindings() when analyzing non-Expr ↵Ted Kremenek2011-11-101-1/+24
| | | | | | stmts, entering a basic block, or analyzing non-consumed expressions. This sigificantly speeds up analysis time, and reduces analysis time down to 27% less than before we linearized the CFG. llvm-svn: 144332
* Add invariant.load metadata to loads from selector references. Allows these ↵Pete Cooper2011-11-101-1/+6
| | | | | | loads to later be moved/combined in the optimizer. Fixes <rdar://problem/6027699> llvm-svn: 144318
* Add missing dependency for shared library build to CMakeLists. Patch by ↵Eli Friedman2011-11-101-0/+1
| | | | | | Johannes Obermayr. llvm-svn: 144310
* Revert r144273. It causes clang self-host build failure.Devang Patel2011-11-101-56/+31
| | | | llvm-svn: 144296
* serialized diagnostics: simplify code.Benjamin Kramer2011-11-101-5/+1
| | | | llvm-svn: 144277
* Whenever explicitly activating or deactivating a cleanup, weJohn McCall2011-11-107-32/+93
| | | | | | | | | | need to provide a 'dominating IP' which is guaranteed to dominate the (de)activation point but which cannot be avoided along any execution path from the (de)activation point to the push-point of the cleanup. Using the entry block is bad mojo. llvm-svn: 144276
* Constant expression evaluation: support for constexpr member functions.Richard Smith2011-11-101-31/+56
| | | | llvm-svn: 144273
* Fix a subtle bug with cleanups: when activatingJohn McCall2011-11-101-9/+14
| | | | | | | | | | | | a previously-inactive cleanup, not only do we need a flag variable, but we should also force the cleanup to query the flag variable. However, we only need to do this when we're activating in a context that's conditionally executed; otherwise, we may safely assume that the cleanup is dominated by the activation point. llvm-svn: 144271
* PR11148: Fix crash-on-invalid if an invalid member declaration is marked asRichard Smith2011-11-101-0/+5
| | | | | | defaulted or deleted. llvm-svn: 144270
* serialized diagnostics: implement full deserialization of clang diagnostics ↵Ted Kremenek2011-11-101-9/+26
| | | | | | | | via the libclang API. I've tested it on simple cases and it works. Test cases to follow as well as a few tweaks. llvm-svn: 144269
* Enter the cleanups for a block outside the enclosingJohn McCall2011-11-1011-76/+223
| | | | | | | | | | | | full-expression. Naturally they're inactive before we enter the block literal expression. This restores the intended behavior that blocks belong to their enclosing scope. There's a useful -O0 / compile-time optimization that we're missing here with activating cleanups following straight-line code from their inactive beginnings. llvm-svn: 144268
* Constant expression evaluation: support for evaluation of structs and unions ofRichard Smith2011-11-107-186/+730
| | | | | | | literal types, as well as derived-to-base casts for lvalues and derived-to-virtual-base casts. llvm-svn: 144265
* Removing unused initialization.David Blaikie2011-11-101-2/+1
| | | | llvm-svn: 144264
* There's no good reason to track temporaries in ExprWithCleanups,John McCall2011-11-1010-82/+95
| | | | | | | but it is sometimes useful to track blocks. Do so. Also optimize the storage of these expressions. llvm-svn: 144263
* Temporary fix for a performance problem Eli spotted. The APValue representationRichard Smith2011-11-101-0/+6
| | | | | | | is currently too inefficient to allow us to use it for array initializers, but fortunately we usually don't yet need to evaluate such initializers. llvm-svn: 144260
* Reflow lines, remove else-if after returns, rename variable "TydefContext" toNick Lewycky2011-11-101-14/+9
| | | | | | "TypedefContext". No functionality change. llvm-svn: 144248
* Fix some additional x86 intrinsics to use "I" (ICE) markings. Fix ↵Eli Friedman2011-11-102-30/+24
| | | | | | | | *mmintrin.h to take them into account. <rdar://problem/10341145> llvm-svn: 144246
* Remove unnecessary include.Devang Patel2011-11-091-1/+0
| | | | llvm-svn: 144210
* objc rewriter: use a more specific name for local variable usedFariborz Jahanian2011-11-091-10/+10
| | | | | | in fast enumeration rewrite. // rdar://10415026 llvm-svn: 144191
OpenPOWER on IntegriCloud