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

4732 Коммитов

Автор SHA1 Сообщение Дата
Ted Kremenek 7ba378a928 Update Xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54759 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 20:59:32 +00:00
Ted Kremenek aae2b101c4 Update Xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54755 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 20:43:54 +00:00
Steve Naroff f11b5088ec Sema::ActOnStartProtocolInterface(): Make sure the protocol decl has a valid start location.
The following case resulted in an invalid start location:

// start location not being set for ObjCProtocolDecl AST (when a forward reference is in scope).
@protocol Buggy;

@protocol Buggy 
@optional
- whatever;
@end



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54740 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 16:39:22 +00:00
Ted Kremenek 298419aad5 Update VS project file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54723 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 04:45:09 +00:00
Ted Kremenek 62e1dcca86 Rename ValueState.h -> GRState.h
Rename ValueState.cpp -> GRState.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54722 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 04:28:02 +00:00
Ted Kremenek 4adc81e540 Rename ValueState -> GRState.
Rename ValueStateManager -> GRStateManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54721 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 04:27:00 +00:00
Ted Kremenek 70ecb9b883 Updated latest checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54720 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 04:12:49 +00:00
Ted Kremenek 595c7ab8a4 Added test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54717 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 03:55:18 +00:00
Ted Kremenek 72c59d07a3 Initialize tracked local variables to undefined.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54716 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 03:28:04 +00:00
Daniel Dunbar 6efc0c559b Implement Obj-C protocol metadata generation for NeXT.
- Near complete, only properties are missing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54715 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 03:21:16 +00:00
Ted Kremenek 5c135b47d0 Fix memory leak found by Sam Bishop: delete WList in the dstor of GRCoreEngineImpl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54714 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 03:10:52 +00:00
Daniel Dunbar af2f62ce32 Change ObjCRuntime GenerateProtocol[Ref] methods to take
ObjCProtocolDecl directly.

Implement CodeGen support for forward protocol decls (no-ops are so
    nice to implement).

Also moved CGObjCRuntime.h out of CodeGenModule.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54709 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-13 00:59:25 +00:00
Ted Kremenek 450202284e Added GenericDataMap as a component of ValueState.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54704 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 21:49:24 +00:00
Ted Kremenek 2aa7095baf Update VS project files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54701 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 21:05:43 +00:00
Ted Kremenek 9853045b50 More cleanups. Add missing #include.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54699 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 20:41:56 +00:00
Ted Kremenek af9dc27b1c More summary generation refactoring.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54696 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 18:48:50 +00:00
Ted Kremenek 9e476ded1d Add variadic addInstMethSummary() and refactored addPanicSummary() to use this method. (code reduction).
Misc. cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54694 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 18:30:56 +00:00
Ted Kremenek 1fb57688d9 Update Xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54693 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 18:29:20 +00:00
Daniel Dunbar 4e2d7d03b2 Emit OBJC_MODULE_INFO and OBJC_SYMBOLS metadata
- Matches llvm-gcc and seem to be expected by otool.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54669 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 06:48:42 +00:00
Daniel Dunbar 22711185f2 Drop Sender from GenerateMessageSend*
- Was unused and generated a unnecessary load of self
(missed file)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54668 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 05:40:10 +00:00
Daniel Dunbar 2bedbf8549 Drop Sender from GenerateMessageSend*
- Was unused and generated a unnecessary load of self

Update NeXT runtime to get proper object & selector types from
       ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54667 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 05:28:47 +00:00
Daniel Dunbar 98c5ead87d Protocol related tweaks
- Implement type conversion of ObjCQualifiedIdType
 - Wire @protocol(...) to GenerateProtocolRef in ScalarExprEmitter


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54666 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 05:08:18 +00:00
Daniel Dunbar a008db15ee Add @selector(...) codegen support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54665 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 03:55:34 +00:00
Daniel Dunbar 259d93d1e1 Add NeXT support for (simple) message sends.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54664 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 03:39:23 +00:00
Mike Stump c7856761ce Unbreak clang install.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54663 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 00:32:59 +00:00
Daniel Dunbar fba5cb12ad Move some ObjC preprocessor definitions into
InitializePredefinedMacros().
 - Also now properly wired to -fobjc-gc, -fnext-runtime.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54661 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 00:21:46 +00:00
Daniel Dunbar bbce49b9e5 Add ObjC constant string support for NeXT.
Changed CGObjCRuntime::GenerateConstantString interface to take
       std::string instead of char* and size.

Change ObjC functions which call on GenerateConstantString to bitcast
       result to appropriate type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54659 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-12 00:12:39 +00:00
Mike Stump 0d8a13d823 Fix compilation warning with help from David Chisnall.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54654 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 23:16:18 +00:00
Chris Lattner de9d55a0db remove obsolete comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54652 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 22:03:07 +00:00
Daniel Dunbar f77ac86f4e Add LangOptions::NeXTRuntime.
- Wired to -fnext-runtime and -fgnu-runtime options.
 - Defaults to GNU, no autoselection for NeXT.

Emit NeXT OBJC_IMAGE_INFO marker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54651 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 21:35:06 +00:00
Daniel Dunbar 709c00cf6e Add test case for -fexceptions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54647 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 18:40:47 +00:00
Daniel Dunbar 208ff5e8a0 Change CodeGenModule to only create ObjC runtime for ObjC files
- Changed CodeGenModule::getObjCRuntime to return reference.
 - Added CodeGenModule::hasObjCRuntime predicate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54645 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 18:12:00 +00:00
Daniel Dunbar 6379a7a153 Add -fexceptions to Driver
- Maps to LangOptions.Exceptions
 - Currently always off, should autoselect based on language.

Update CodeGen to set unwind attribute on functions definitions based
       on LangOptions.Exceptions.
 - Still need to set attributes appropriately on calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54643 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 17:36:14 +00:00
Daniel Dunbar 58bf610106 Update for IRBuilder template change (update LLVM!)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54642 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 16:50:21 +00:00
Daniel Dunbar acc5f3e423 More #include cleaning
- Kill unnecessary #includes in .cpp files. This is an automatic
   sweep so some things removed are actually used, but happen to be
   included by a previous header. I tried to get rid of the obvious
   examples and this was the easiest way to trim the #includes in one
   fell swoop.
 - We now return to regularly scheduled development.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54632 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 06:23:49 +00:00
Daniel Dunbar c4a1dea2dc More #include cleaning
- Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h
 - Moved Sema::getCurMethodDecl() out of line (dependent on
   ObjCMethodDecl via dyn_cast).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54629 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 05:35:13 +00:00
Daniel Dunbar de7fb8413b More #include cleaning
- Remove internal uses of AST.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54628 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 05:00:27 +00:00
Daniel Dunbar e91593ef08 More #include cleaning
- Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and
   SourceLocation.h)
 - Move ASTContext constructor into implementation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54627 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 04:54:23 +00:00
Daniel Dunbar e4858a65a9 More #include cleaning
- Drop Diagnostic.h from DeclSpec.h, move utility Diag methods into
   implementation .cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54626 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 03:45:03 +00:00
Daniel Dunbar 12bc692a78 Minor #include cleaning
- Drop TokenKinds.h from Action.h
 - Move DeclSpec.h from Sema.h into individual Sema .cpp files


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54625 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 03:27:53 +00:00
Daniel Dunbar c17a4d3b16 Add dummy Mac Objective-C runtime interface.
- Not currently accessible and completely non-functional.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54624 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 02:45:11 +00:00
Nuno Lopes c46cf49229 fix linking with .so files specified in cmd line (this fixes some libtool usages)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54623 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-10 22:17:57 +00:00
Nuno Lopes 9a1844866b pass -R arg to linker
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54622 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-10 21:58:01 +00:00
Daniel Dunbar 1e04976fc2 Back out r54608 (inline string literals were getting an extra '\0')
temporarily, I assumed GetAddrForConstantString literal was being
  used consistently but it doesn't look like it is.

Factored out a CodeGenModule::getStringForStringLiteral which handles
  extracting a std::string for the bytes of a StringLiteral, padded to
  match the type.

Update EmitLValue to use getStringForStringLiteral, this was
  previously not padding strings correctly. Good thing we only emit
  strings in 4 different places!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54621 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-10 20:25:57 +00:00
Nico Weber 7bfaaaecb3 * Remove isInSystemHeader() from DiagClient, move it to SourceManager
* Move FormatError() from TextDiagnostic up to DiagClient, remove now  
  empty class TextDiagnostic
* Make DiagClient optional for Diagnostic

This fixes the following problems:

* -html-diags (and probably others) does now output the same set of  
  warnings as console clang does
* nothing crashes if one forgets to call setHeaderSearch() on  
  TextDiagnostic
* some code duplication is removed




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54620 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-10 19:59:06 +00:00
Steve Naroff 3ac5e9fc38 Forgot to modify LAST_EXPR (thanks Nuno).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54619 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-10 19:28:37 +00:00
Nico Weber be1eb5c919 Do not crash with -serialize.
This happened because seralization was done in the constructor, and at that time the TranslationUnit is no longer valid.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54618 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-10 19:20:05 +00:00
Steve Naroff 76de9d7a32 Cleanup ObjCSuperRefExpr (remove last usage and AST node:-).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54617 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-10 19:10:41 +00:00
Daniel Dunbar 425fa391dd Add svn:ignore properties for Release-Asserts dirs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54616 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-10 18:21:41 +00:00
Anders Carlsson 165a70fd0b Remove the old evaluator code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54615 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-10 17:03:01 +00:00