summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Mangle template template parameters. Fixes PR5861.Anders Carlsson2009-12-231-9/+12
| | | | llvm-svn: 92030
* Update for the intrinsic changes in llvm: the object size intrinsicEric Christopher2009-12-231-1/+10
| | | | | | | only takes a boolean second argument now. Update tests accordingly. Currently the builtin still accepts the full range for compatibility. llvm-svn: 91983
* Move the implementation of ASTContext::getTypeSizeInChars() to the .cpp file toKen Dyck2009-12-221-0/+1
| | | | | | avoid #including CharUnits.h in ASTContext.h. llvm-svn: 91903
* Make sure that we mangle overloaded operators that are member functions ↵Anders Carlsson2009-12-221-7/+22
| | | | | | | | correctly, giving them the correct arity. With this seemingly insignificant fix, we are now able to build and link clang using clang itself! (LLVM still has to be built with gcc for the time being). llvm-svn: 91893
* x86_64: Structures with no fields but which have padding should be classified asDaniel Dunbar2009-12-221-0/+4
| | | | | | | | integer. - This is consistent, but may not be correct. I will revisit x86_64 ABI handling for C++ as a whole at some point. - PR5831. llvm-svn: 91874
* Eliminate the ASTContext argument to CXXConstructorDecl::isCopyConstructor, ↵Douglas Gregor2009-12-222-3/+3
| | | | | | since the context is available in the Decl llvm-svn: 91862
* Improve on my previous fix for debug information. Rather thanDouglas Gregor2009-12-211-51/+42
| | | | | | | | | recursing in CGDebugInfo::CreateTypeNode, teach CanonicalizeTypeForDebugInfo---now called UnwrapTypeForDebugInfo---to keep unwrapping the type until we hit something that can be represented by debug information. Thanks to Anders for pointing this out! llvm-svn: 91840
* Teach debug info generation to handle TemplateSpecializationType,Douglas Gregor2009-12-211-3/+50
| | | | | | | | ElaboratedType, QualifiedNameType, and SubstTemplateTypeParmType type nodes. Also, produce an "unsupported" diagnostic for C++0x type nodes and "typeof" nodes, rather than asserting nondescriptly. llvm-svn: 91837
* Incomplete structs should also have internal linkage.Anders Carlsson2009-12-211-9/+76
| | | | llvm-svn: 91805
* Correcly handle pointers to member pointer types where the class or the ↵Anders Carlsson2009-12-201-42/+48
| | | | | | pointee is incomplete. llvm-svn: 91804
* Rework the way pointer types are handled by the RTTI builder. We now get the ↵Anders Carlsson2009-12-201-101/+354
| | | | | | right linkage for indirect pointers to incomplete structs. llvm-svn: 91799
* Remove ';' after method definition. Noticed by clang++, which one would thinkDaniel Dunbar2009-12-193-18/+18
| | | | | | | would have a higher respect for its own code. This is getting old, is this warning really adding value? llvm-svn: 91779
* Fix for PR5524: make reference binding in default argument work correctly.Eli Friedman2009-12-191-1/+4
| | | | llvm-svn: 91733
* Work in progress for setting the vtable pointers for all bases correctly inEli Friedman2009-12-183-13/+63
| | | | | | | the constructor. This doesn't handle cases requiring the VTT at the moment, and generates unnecessary stores, but I think it's essentially correct. llvm-svn: 91731
* Cleanup switch so it doesn't have a default case.Eli Friedman2009-12-181-1/+7
| | | | llvm-svn: 91725
* Fix for PR5830: fix the computation of the offset to a virtual base.Eli Friedman2009-12-181-3/+36
| | | | llvm-svn: 91724
* Fix a few MSVC warnings.Daniel Dunbar2009-12-181-3/+1
| | | | llvm-svn: 91714
* CK_UserDefinedConversion is a valid kind when doing copy ctor elision.Anders Carlsson2009-12-181-1/+2
| | | | llvm-svn: 91695
* Change the return type of ASTContext::getTypeSizeInChars() from uint64_t to theKen Dyck2009-12-181-1/+2
| | | | | | | new opaque value type, CharUnits. This will help us avoid accidentally mixing quantities that are in bit and character units. llvm-svn: 91689
* Rename getByteSize() and getTypeSizeInBytes() in ASTContext to getCharWidth()Ken Dyck2009-12-181-1/+1
| | | | | | | and getTypeSizeInChars() to reflect their basis in character type units, not that of a possibly independent architecture-specific byte. llvm-svn: 91688
* Fix regression I introduced when dynamic_cast-ing to a reference type.Anders Carlsson2009-12-181-1/+1
| | | | llvm-svn: 91687
* It's perfectly fine to see UserDefinedConversion casts when emitting scalar ↵Anders Carlsson2009-12-181-1/+1
| | | | | | expressions. llvm-svn: 91686
* Address some of Anders commentsDouglas Gregor2009-12-181-4/+8
| | | | llvm-svn: 91670
* Switch the initialization required by return statements over to theDouglas Gregor2009-12-181-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | new InitializationSequence. This fixes some bugs (e.g., PR5808), changed some diagnostics, and caused more churn than expected. What's new: - InitializationSequence now has a "C conversion sequence" category and step kind, which falls back to - Changed the diagnostics for returns to always have the result type of the function first and the type of the expression second. CheckSingleAssignmentConstraints to peform checking in C. - Improved ASTs for initialization of return values. The ASTs now capture all of the temporaries we need to create, but intentionally do not bind the tempoary that is actually returned, so that it won't get destroyed twice. - Make sure to perform an (elidable!) copy of the class object that is returned from a class. - Fix copy elision in CodeGen to properly see through the subexpressions that occur with elidable copies. - Give "new" its own entity kind; as with return values and thrown objects, we don't bind the expression so we don't call a destructor for it. Note that, with this patch, I've broken returning move-only types in C++0x. We'll fix it later, when we tackle NRVO. llvm-svn: 91669
* Add -dwarf-debug-flags, which provides a way to embed the cc1 level options usedDaniel Dunbar2009-12-181-7/+3
| | | | | | | | to compile a translation unit into the debug info for that file. - Used by parts of Darwin build process to check compiler flags, etc. - <rdar://problem/7256886> clang does not emit AT_APPLE_flags llvm-svn: 91661
* Handle case when DestPtr is 0.Mike Stump2009-12-181-3/+22
| | | | llvm-svn: 91658
* Rename GetAddrOfRTTI to GetAddrOfRTTIDescriptor. Remove the overload that ↵Anders Carlsson2009-12-175-81/+69
| | | | | | takes a CXXRecordDecl since we were just creating a QualType from it anyway. llvm-svn: 91590
* Ensure we run cleanups for CXXTemporaries on the exceptional edge. WIP.Mike Stump2009-12-172-1/+48
| | | | llvm-svn: 91588
* Simplify RTTIBuilder::finish.Anders Carlsson2009-12-171-11/+9
| | | | llvm-svn: 91585
* Move the Info vector into the RTTIBuilder struct. No functionality change.Anders Carlsson2009-12-171-18/+19
| | | | llvm-svn: 91583
* Fix for PR5801: codegen memcpy, memmove, memset directly to LLVM intrinsics.Eli Friedman2009-12-171-0/+3
| | | | llvm-svn: 91573
* When value-initializing a class with no user-defined constructors butDouglas Gregor2009-12-162-1/+7
| | | | | | | with a non-trivial default constructor, zero-initialize the storage and then call the default constructor. Fixes PR5800. llvm-svn: 91548
* Baby steps towards fixing PR5589. If a class needs a vtable pointer, add one.Anders Carlsson2009-12-162-0/+21
| | | | llvm-svn: 91545
* Use GetAddrOfRTTI everywhere and remove GenerateRTTI and GenerateRTTIRef. ↵Anders Carlsson2009-12-164-38/+8
| | | | | | With this change, we can now compile and link TableGen. llvm-svn: 91520
* Handle ImplicitValueInitExpr in AggExprEmitter.Anders Carlsson2009-12-161-2/+8
| | | | llvm-svn: 91519
* Mangle CXXOperatorCallExprs, fixes PR5796.Anders Carlsson2009-12-161-0/+10
| | | | llvm-svn: 91507
* Add an addition check for undefined behavior for when we hit aMike Stump2009-12-161-0/+2
| | | | | | __builtin_unreachable. WIP. llvm-svn: 91499
* Implement additional undefined checks for additional loads and stores. WIP.Mike Stump2009-12-163-4/+49
| | | | llvm-svn: 91498
* Fixes a code gen bug related to accessing a nowFariborz Jahanian2009-12-151-0/+1
| | | | | | | | | non-existing 'isa' field of a non-existing struct type all related to legacy type definition for 'id' which we have dropped in clang in favor of a built-in type. (fixes radar 7470820). llvm-svn: 91455
* ShouldDestroyTemporaries? I don't think so.Anders Carlsson2009-12-152-15/+3
| | | | llvm-svn: 91450
* update to match LLVM API change:Chris Lattner2009-12-151-8/+7
| | | | | | | | | Remove isPod() from DenseMapInfo, splitting it out to its own isPodLike type trait. This is a generally useful type trait for more than just DenseMap, and we really care about whether something acts like a pod, not whether it really is a pod. llvm-svn: 91422
* Fix a small bug in ComputeMethodVtableIndices.Eli Friedman2009-12-151-2/+10
| | | | llvm-svn: 91411
* Don't force the emission of destructor definitions.Eli Friedman2009-12-151-3/+3
| | | | llvm-svn: 91394
* Fix spacing.Mike Stump2009-12-151-1/+1
| | | | llvm-svn: 91386
* Ensure we preserve line information for each trap forMike Stump2009-12-151-1/+9
| | | | | | -fcatch-undefined-behavior if we aren't optimizing. WIP. llvm-svn: 91382
* Switch codegen for -fcatch-undefined-bahavior over to __builtin_trapMike Stump2009-12-154-26/+20
| | | | | | instead of abort to improve codesize and codegen. llvm-svn: 91374
* We have to allow one to form an address for one past the end. WIP.Mike Stump2009-12-141-1/+1
| | | | llvm-svn: 91347
* Add support for detecting undefined shift behavior. WIP.Mike Stump2009-12-143-7/+27
| | | | llvm-svn: 91341
* Patch to fix 32-bit @try failure with internal assertion when compiling Fariborz Jahanian2009-12-141-2/+5
| | | | | | an Objective-C rethrow nested inside another try/catch block. (fixes radar 7466728). llvm-svn: 91335
* Simplifiy.Mike Stump2009-12-141-16/+3
| | | | llvm-svn: 91324
OpenPOWER on IntegriCloud