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

1235 Коммитов

Автор SHA1 Сообщение Дата
Chris Lattner 770951b5bb add support for vector type compatibility checking. Patch by Nate Begeman.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43604 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-01 05:03:41 +00:00
Steve Naroff 6c6a2dbb4d Tweak RewriteInterfaceDecl() to generate a typedef (if one hasn't already been generated).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43600 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-01 03:35:41 +00:00
Chris Lattner 4ef8dd6e87 Implement test/Sema/init.c by treating functions as constants.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43599 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-01 02:45:17 +00:00
Anders Carlsson 0c67829763 Put constant CFStrings in the __DATA,__cfstring section.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43593 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-01 00:41:52 +00:00
Anders Carlsson d6a275f9a2 Stub out codegen for __builtin_constant_p. Remove any implicit cast exprs in the call to __builtin___CFStringMakeConstantString.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43592 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-01 00:39:26 +00:00
Devang Patel c2527d1664 Remove unnecessary method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43591 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-01 00:11:37 +00:00
Devang Patel f9fef92564 start adding pading fields.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43590 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-01 00:07:12 +00:00
Fariborz Jahanian f1de0ca05e 1) More additions for objective-c's qualifier type.
2) Fixed a test failure (which should have failed all along!).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43589 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 23:53:01 +00:00
Anders Carlsson 50b5a30db4 Fix a typo that prevented pointer-to-int conversions from working.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43588 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 23:18:02 +00:00
Devang Patel 0bd41f2cea Refactor code into a separate method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43587 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 23:17:19 +00:00
Fariborz Jahanian 212b768a4b Fixed a bug exposed by fixing the assert in previous patch (one of the tests asserted).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43586 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 23:08:24 +00:00
Fariborz Jahanian aff56d0bff Changed direction of assert. Added more comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43585 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 22:57:04 +00:00
Ted Kremenek fee0452973 Implemented more of serialization/deserialization for ASTContext. We now
(hypothetically) read in/write out most of the types.  Bugs likely exist.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43584 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 22:44:07 +00:00
Steve Naroff 8749be53f5 Fix two rewriter bugs:
- For @class, don't generate multiple typedefs.
- Handle the following edge case interface...

@interface NSMiddleSpecifier : NSObject {}

@end

...which was incorrectly being rewritten to...

struct _interface_NSMiddleSpecifier {
        struct _interface_NSObject _NSObject;
};
{}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43582 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 22:11:35 +00:00
Anders Carlsson 148fe67727 Handle function calls that return aggregate expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43581 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 22:04:46 +00:00
Fariborz Jahanian 19d74e1494 More infrastructure to recognize objective-c's type qualifiers (in,inout, etc.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43580 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 21:59:43 +00:00
Devang Patel 9544ff2d96 New test to verify llvm struct layout.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43577 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 21:02:10 +00:00
Devang Patel 9e124d96ab Check whether next slot meets field type's alignment requirements.
If it does not then assert at the moment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43576 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 21:01:37 +00:00
Steve Naroff b4292f221f Implement ObjC built-in types in MinimalAction.
This fixes the recent regression with selector-1.m and -parse-noop.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43575 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 20:55:39 +00:00
Ted Kremenek 9b181b3eec Implemented short-circuited version of Builtin::Info::operator!=.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43574 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 20:55:27 +00:00
Devang Patel d9e9ede6b1 Keep track of field offsets during structure layout.
Take 2.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43573 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 20:08:22 +00:00
Devang Patel 7a4718e813 Take 2.
Make target info available to clang code generator.  This is far from complete but this helps clang codegen module make progress.

At the moment target triplet and target description strings are hard coded in clang::TargetInfo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43572 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 20:01:01 +00:00
Ted Kremenek 5451350ea6 Adjusted QualType deserialization to reflect updated deserialization API.
We now serialize ivar references inside of ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43571 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 20:00:03 +00:00
Devang Patel 61bb9cac04 Initialize MemCpyFn
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43569 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 19:54:57 +00:00
Fariborz Jahanian 3a3ca1b35a Fixed problem with rewriting stand-alone @implementation (with no matching @interface).
A new test case added.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43568 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 18:48:14 +00:00
Steve Naroff 8ee529b567 Implement a more sensible strategy for ObjC built-in types (addressing a long standing FIXME in Sema::GetObjcIdType()).
This removes several gross hacks to work around the previous "lazy" behavior.

Two notes:
- MinimalActions still needs to be taught about the built-in types (This breaks one of the -noop test cases). I started this, then added a FIXME.
- I didn't convert Sema::GetObjcProtoType() yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43567 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 18:42:27 +00:00
Ted Kremenek e522d85ffc Preliminary support for serializing statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43566 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 18:41:19 +00:00
Ted Kremenek 3cf47465af Updated path to clang.cpp in build documentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43564 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 17:58:51 +00:00
Ted Kremenek 2d8a83066f Updated build instructions to not include an absolute line number in clang.cpp to add hard-coded paths.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43563 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 17:57:30 +00:00
Ted Kremenek d1c0eee9aa Updated a comment to hopefully silence a Lattner warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43562 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 17:53:38 +00:00
Ted Kremenek 2e7d352dbe Implemented serialization of Variable Array Types (VLAs).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43561 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 17:50:23 +00:00
Fariborz Jahanian fdc08a0682 Rewriteing of ivars changed to just copy directly from the source.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43560 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 17:29:28 +00:00
Ted Kremenek 7192f8e959 Renamed ivar "ArrayTypes" in ASTContext to "ComplexArrayTypes".
Added skeleton code for serialization of ASTContext.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43558 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 17:10:13 +00:00
Steve Naroff 498856cb30 Checking in some code that is still under construction.
I need to (finally) change the way Class/id/SEL/IMP are built-in...the current approach of doing it in the preprocessor is "broken". The other problem is Sema::GetObjcIdType/GetObjcSelType/GetObjcClassType, the hooks that initialize ASTContext lazily. These built-in types need to be done up front...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43557 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 16:03:04 +00:00
Fariborz Jahanian dea84f82b2 After Anders check-in, we can now encode 'Class' type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43556 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 16:00:13 +00:00
Ted Kremenek 2722622bac Added a few clarifying steps the the "building clang" section.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43555 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 15:31:24 +00:00
Chris Lattner e03cd7b7c8 temporarily revert devang's patch to link in the llvm codegen etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43544 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 04:53:03 +00:00
Steve Naroff 9165ad378f Add some plumbing to help cope with rewriting "id<p>", "Class<p>*".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43543 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 04:38:33 +00:00
Anders Carlsson 8baaca50f0 Encode Class, SEL and Objective-C objects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43540 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 02:53:19 +00:00
Devang Patel 8967e9e6c3 Keep track of field offsets during structure layout.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43539 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 01:23:10 +00:00
Devang Patel f767e218ee Make target info available to clang code generator.
This is far from complete but this helps clang codegen module
make progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43536 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 00:59:29 +00:00
Fariborz Jahanian 8be9d0a9cd Added new type and bitfield fields in some decl types in preparation for objective-c's type qualifiers.
Added initialization of Class/SEMA types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43534 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-31 00:12:35 +00:00
Devang Patel 47c87b4b16 Avoid unnecessary PATypeHolder copy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43530 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-30 23:22:14 +00:00
Steve Naroff 09b266eb2a Stop pre-defining objc_msgSend/objc_getClass in the preprocessor. Instead, I generate these declaration on the fly when rewriting a message expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43529 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-30 23:14:51 +00:00
Ted Kremenek 0d892d8bfd Updated some comments.
Disabled assignments for ContentCache.
Copy-ctor for ContentCache now has an assertion preventing it to
be copied from an object that already has an allocated buffer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43526 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-30 22:57:35 +00:00
Chris Lattner 7da36f642e __real__ and __imag__ can be lvalues. Add support to ast and codegen for them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43525 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-30 22:53:42 +00:00
Ted Kremenek 8f54c1faaa Refactored CFG construction code that processes DeclStmts to use StmtIterator.
Now CFG construction transparently supports Variable Length Array declarations
with expressions for their sizes, and typedefs that include VLAs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43520 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-30 21:48:34 +00:00
Devang Patel 9e32d4b4a7 Refactor code into a separate method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43519 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-30 21:27:20 +00:00
Ted Kremenek 78d85f53b0 Removed SrcMgr::FileInfo and SrcMgr::InfoRec and replaced them with a
single class: ContentCache.  This simplifies the logic in
SourceManager and makes the ownership of MemoryBuffers clearer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43518 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-30 21:08:08 +00:00
Ted Kremenek 59092d0b93 Tightened IgnoreParen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43517 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-30 21:03:09 +00:00