Граф коммитов

2051 Коммитов

Автор SHA1 Сообщение Дата
John McCall a180529e3d Fix an infinite loop arising when trying to generate debug information
for a ObjC class with an ivar of weak self type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82745 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-25 01:40:47 +00:00
Fariborz Jahanian 76368e843c Fixed another code gen bug in objc's new write-barrier API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82735 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-25 00:00:20 +00:00
Mike Stump bb30419d81 Fix 80-col violation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82725 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 22:31:14 +00:00
Fariborz Jahanian 6c7a1f3647 Patch fixes a code gen. bug in generation of objc_assign_ivar
(objc GC's API).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82724 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 22:25:38 +00:00
John McCall 0953e767ff Refactor the representation of qualifiers to bring ExtQualType out of the
Type hierarchy.  Demote 'volatile' to extended-qualifier status.  Audit our
use of qualifiers and fix a few places that weren't dealing with qualifiers
quite right;  many more remain.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82705 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 19:53:00 +00:00
Daniel Dunbar 55e59e139d Darwin/x86-32: Enumerated types and block pointer types in structures were not
handled correctly.
 - <rdar://problem/7247671> Function arguments incorrect when function returns a
   struct on i386 w/ llvm-g++ and clang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82681 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 05:12:36 +00:00
Anders Carlsson 018837b081 Handle namespace aliases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82644 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 19:19:16 +00:00
Anders Carlsson 6ac5fc49ee Emit new[] cookie when needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82642 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 18:59:48 +00:00
Anders Carlsson a4d4c019bf Basic support for new[].
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82628 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 16:07:23 +00:00
Anders Carlsson 569c1f4a6c Add a new variant of EmitCXXAggrConstructorCall that takes a Value that holds the number of elements to construct, to be used when implementing new[].
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82602 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 02:45:36 +00:00
Anders Carlsson 16d81b8db3 Move codegen of new and delete to CGCXXExpr.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82585 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 22:53:17 +00:00
Mike Stump 45504e568c Remove now fixed FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82584 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 22:31:44 +00:00
Anders Carlsson 592a2bbc19 No need to null check implicit lvalue cast exprs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82580 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 22:00:46 +00:00
Anders Carlsson dfd0330267 When doing a derived-to-base class and the class offset is 0 we can just do a simple bitcast.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82579 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 21:58:22 +00:00
Anders Carlsson add28829c7 CXXMethodDecls should always be mangled, even if they are inside an extern "C" block. Fixes PR5017.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82567 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 20:33:31 +00:00
Anders Carlsson 5cc58c6cfe Don't assert that linkage decls are always C++, it's not true. Fixes PR5019.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82557 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 17:23:30 +00:00
Daniel Dunbar f015b03415 Revert "Switch a few clients over to StringLiteral::getString.", this is breaking some projects, but I don't have a test case yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82539 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 10:03:52 +00:00
Daniel Dunbar df4eee9b03 Switch a few clients over to StringLiteral::getString.
- Switching all of them out-of-my-current-scope-of-interest, sorry.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82515 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 03:27:52 +00:00
Mike Stump fd47b31be0 Fix some typos. WIP. Large alignments don't work yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82512 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 02:44:17 +00:00
Mike Stump 39605b4eab Improve debug info generation for __block variables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82508 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 02:12:52 +00:00
John McCall 183700f494 Change all the Type::getAsFoo() methods to specializations of Type::getAs().
Several of the existing methods were identical to their respective
specializations, and so have been removed entirely.  Several more 'leaf'
optimizations were introduced.

The getAsFoo() methods which imposed extra conditions, like
getAsObjCInterfacePointerType(), have been left in place.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82501 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-21 23:43:11 +00:00
Fariborz Jahanian b924259cc5 Removed -fobjc-newgc-api option. clang now conforms to
gcc-style write-barrier api only.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82493 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-21 23:03:37 +00:00
Fariborz Jahanian fd02ed702e Miscellanous fixes in generatation of objc gc's write-barriers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82472 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-21 18:54:29 +00:00
Chris Lattner 21190d5463 Implement __builtin_unreachable(), a GCC 4.5 extension.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82433 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-21 03:09:59 +00:00
Anders Carlsson d553f8c57f Start mangling expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82423 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-21 01:21:10 +00:00
Daniel Dunbar 65f13c3381 Ok, an AssertingVH definitely doesn't work for now because we free our cache after the optimizer may have hacked on the module. Use a WeakVH instead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82324 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-19 20:17:48 +00:00
Nick Lewycky 0d36dd28bb Make clang stop relying on ConstantStruct::get's default value for isPacked
which will be going away (ie. it's becoming a required parameter) later today.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82323 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-19 20:00:52 +00:00
Daniel Dunbar 23e81bae8c Switch CGDebugInfo type cache to using an AssertingVH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82321 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-19 19:27:24 +00:00
Daniel Dunbar 03faac3b8c Factor out CGDebugInfo::CreateTypeNode method.
- No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82320 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-19 19:27:14 +00:00
Anders Carlsson 2ee3fca27a More mangling work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82265 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-18 20:11:09 +00:00
Anders Carlsson eafc6dcf67 Make the mangler conform even better to the grammar.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82262 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-18 19:44:50 +00:00
Mike Stump 97f4d46e2f Generate more of the vbase virtual offset for covariant thunks. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82253 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-18 19:06:35 +00:00
Anders Carlsson 2744a063f1 More mangler mangling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82250 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-18 19:00:18 +00:00
Anders Carlsson aa73ab1bd0 Call mangleTemplatePrefix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82247 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-18 18:47:07 +00:00
Anders Carlsson 9263e91e2e Change manglePrefix to return early if the DC is the translation unit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82246 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-18 18:39:58 +00:00
Anders Carlsson 7482e24716 More mangling goodness.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82193 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-18 04:29:09 +00:00
Anders Carlsson 7624f21938 Handle mangling of TemplateSpecializationType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82189 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-18 02:42:01 +00:00
Fariborz Jahanian 1c1afc4ed3 Fixed a bug in generation of the new write-barriers when
array syntax is used to derefernce and assign to ivar pointee.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82183 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-18 00:04:00 +00:00
Anders Carlsson d58d6f778d Ignore extern "C++" { } when mangling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82146 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-17 16:12:20 +00:00
Anders Carlsson 068f347772 Revert r82123 for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82125 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-17 05:31:47 +00:00
Anders Carlsson 657094b1ad Treat an unqualified RecordType as a RecordDecl when substituting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82123 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-17 04:38:23 +00:00
Anders Carlsson 6862fc720b Substitution for prefixes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82122 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-17 04:16:28 +00:00
Anders Carlsson 03c9d530db Substitute unscoped template names.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82119 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-17 04:02:31 +00:00
Daniel Dunbar 6793966aa2 IRgen/ObjC: Correctly construct the function info for variadic message sends.
This fixes some bad -O0 codegen and the unnecessary clearing of al on entry to objc_msgSend for most message sends.

<rdar://problem/7102824> [irgen] unnecessary xorb on calls to objc_msgSend on x86_64

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82118 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-17 04:01:40 +00:00
Daniel Dunbar d6c93d7035 IRgen/ObjC: Make the target method decl available to GenerateMessageSendSuper.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82117 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-17 04:01:22 +00:00
Anders Carlsson d3a932a298 Add mangleSubstitution/addSubstitution variants that take a NamedDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82116 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-17 03:53:28 +00:00
Anders Carlsson 9234b7ff2b When mangling function template specialization, mangle the type encoding of the original function template. Also, port mangle.cpp and function-template-specialization.cpp over to using FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82114 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-17 03:46:43 +00:00
Anders Carlsson 201ce7485c Add new functions to the mangler for the <unscoped-name> and <unscoped-template-name> productions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82113 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-17 03:17:01 +00:00
Anders Carlsson 7696737d41 Add basic substitution to the C++ mangler. It currently only looks at types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82102 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-17 00:43:46 +00:00
Fariborz Jahanian dbf3cfd39d patch for generating objc'2 objc_assign_ivar. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82090 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-16 23:11:23 +00:00