Commit Graph

5907 Commits

Author SHA1 Message Date
Ted Kremenek 88f001c4e3 Updated latest checker build.
llvm-svn: 54720
2008-08-13 04:12:49 +00:00
Ted Kremenek ea6fa77ccc Added test case.
llvm-svn: 54717
2008-08-13 03:55:18 +00:00
Ted Kremenek dccd9883c4 Initialize tracked local variables to undefined.
llvm-svn: 54716
2008-08-13 03:28:04 +00:00
Daniel Dunbar b036db8e66 Implement Obj-C protocol metadata generation for NeXT.
- Near complete, only properties are missing.

llvm-svn: 54715
2008-08-13 03:21:16 +00:00
Ted Kremenek 3f91f037a7 Fix memory leak found by Sam Bishop: delete WList in the dstor of GRCoreEngineImpl.
llvm-svn: 54714
2008-08-13 03:10:52 +00:00
Daniel Dunbar 89da6ad1db 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

llvm-svn: 54709
2008-08-13 00:59:25 +00:00
Ted Kremenek 27fb019038 Added GenericDataMap as a component of ValueState.
llvm-svn: 54704
2008-08-12 21:49:24 +00:00
Ted Kremenek 4c088683c0 Update VS project files.
llvm-svn: 54701
2008-08-12 21:05:43 +00:00
Ted Kremenek 9551ab6c8c More cleanups. Add missing #include.
llvm-svn: 54699
2008-08-12 20:41:56 +00:00
Ted Kremenek 3f13f598ce More summary generation refactoring.
llvm-svn: 54696
2008-08-12 18:48:50 +00:00
Ted Kremenek 050b91cd28 Add variadic addInstMethSummary() and refactored addPanicSummary() to use this method. (code reduction).
Misc. cleanups.

llvm-svn: 54694
2008-08-12 18:30:56 +00:00
Ted Kremenek b49bb5a050 Update Xcode project.
llvm-svn: 54693
2008-08-12 18:29:20 +00:00
Daniel Dunbar 7bd00bda05 Emit OBJC_MODULE_INFO and OBJC_SYMBOLS metadata
- Matches llvm-gcc and seem to be expected by otool.

llvm-svn: 54669
2008-08-12 06:48:42 +00:00
Daniel Dunbar d627c85f43 Drop Sender from GenerateMessageSend*
- Was unused and generated a unnecessary load of self
(missed file)

llvm-svn: 54668
2008-08-12 05:40:10 +00:00
Daniel Dunbar 5d71559c01 Drop Sender from GenerateMessageSend*
- Was unused and generated a unnecessary load of self

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

llvm-svn: 54667
2008-08-12 05:28:47 +00:00
Daniel Dunbar 6630e10ccc Protocol related tweaks
- Implement type conversion of ObjCQualifiedIdType
 - Wire @protocol(...) to GenerateProtocolRef in ScalarExprEmitter

llvm-svn: 54666
2008-08-12 05:08:18 +00:00
Daniel Dunbar bceb904f91 Add @selector(...) codegen support.
llvm-svn: 54665
2008-08-12 03:55:34 +00:00
Daniel Dunbar cb515c8b0a Add NeXT support for (simple) message sends.
llvm-svn: 54664
2008-08-12 03:39:23 +00:00
Mike Stump b9d50b23a8 Unbreak clang install.
llvm-svn: 54663
2008-08-12 00:32:59 +00:00
Daniel Dunbar 2258aa0f27 Move some ObjC preprocessor definitions into
InitializePredefinedMacros().
 - Also now properly wired to -fobjc-gc, -fnext-runtime.

llvm-svn: 54661
2008-08-12 00:21:46 +00:00
Daniel Dunbar 8b8683f9f6 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.

llvm-svn: 54659
2008-08-12 00:12:39 +00:00
Mike Stump 52f0260582 Fix compilation warning with help from David Chisnall.
llvm-svn: 54654
2008-08-11 23:16:18 +00:00
Chris Lattner 7b18e35113 remove obsolete comment.
llvm-svn: 54652
2008-08-11 22:03:07 +00:00
Daniel Dunbar 3ad53483fb Add LangOptions::NeXTRuntime.
- Wired to -fnext-runtime and -fgnu-runtime options.
 - Defaults to GNU, no autoselection for NeXT.

Emit NeXT OBJC_IMAGE_INFO marker.

llvm-svn: 54651
2008-08-11 21:35:06 +00:00
Daniel Dunbar 2de4b5e2fc Add test case for -fexceptions
llvm-svn: 54647
2008-08-11 18:40:47 +00:00
Daniel Dunbar 8d480594cf Change CodeGenModule to only create ObjC runtime for ObjC files
- Changed CodeGenModule::getObjCRuntime to return reference.
 - Added CodeGenModule::hasObjCRuntime predicate.

llvm-svn: 54645
2008-08-11 18:12:00 +00:00
Daniel Dunbar fb3043d627 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.

llvm-svn: 54643
2008-08-11 17:36:14 +00:00
Daniel Dunbar 48595de697 Update for IRBuilder template change (update LLVM!)
llvm-svn: 54642
2008-08-11 16:50:21 +00:00
Daniel Dunbar 56fdb6ae69 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.

llvm-svn: 54632
2008-08-11 06:23:49 +00:00
Daniel Dunbar 6e8aa537f8 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).

llvm-svn: 54629
2008-08-11 05:35:13 +00:00
Daniel Dunbar ad319a73f2 More #include cleaning
- Remove internal uses of AST.h

llvm-svn: 54628
2008-08-11 05:00:27 +00:00
Daniel Dunbar 221fa94e40 More #include cleaning
- Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and
   SourceLocation.h)
 - Move ASTContext constructor into implementation

llvm-svn: 54627
2008-08-11 04:54:23 +00:00
Daniel Dunbar c74b5cc2bc More #include cleaning
- Drop Diagnostic.h from DeclSpec.h, move utility Diag methods into
   implementation .cpp

llvm-svn: 54626
2008-08-11 03:45:03 +00:00
Daniel Dunbar 34fb67272c Minor #include cleaning
- Drop TokenKinds.h from Action.h
 - Move DeclSpec.h from Sema.h into individual Sema .cpp files

llvm-svn: 54625
2008-08-11 03:27:53 +00:00
Daniel Dunbar 303e2c2f1f Add dummy Mac Objective-C runtime interface.
- Not currently accessible and completely non-functional.

llvm-svn: 54624
2008-08-11 02:45:11 +00:00
Nuno Lopes d83be33cc0 fix linking with .so files specified in cmd line (this fixes some libtool usages)
llvm-svn: 54623
2008-08-10 22:17:57 +00:00
Nuno Lopes c14bcffda6 pass -R arg to linker
llvm-svn: 54622
2008-08-10 21:58:01 +00:00
Daniel Dunbar 6dfdf8c97a 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!

llvm-svn: 54621
2008-08-10 20:25:57 +00:00
Nico Weber 4c3116437c * 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

llvm-svn: 54620
2008-08-10 19:59:06 +00:00
Steve Naroff cb1e06e8fd Forgot to modify LAST_EXPR (thanks Nuno).
llvm-svn: 54619
2008-08-10 19:28:37 +00:00
Nico Weber e4919cc2bf Do not crash with -serialize.
This happened because seralization was done in the constructor, and at that time the TranslationUnit is no longer valid.

llvm-svn: 54618
2008-08-10 19:20:05 +00:00
Steve Naroff 0d7c6dbae8 Cleanup ObjCSuperRefExpr (remove last usage and AST node:-).
llvm-svn: 54617
2008-08-10 19:10:41 +00:00
Anders Carlsson d361a7df78 Remove the old evaluator code.
llvm-svn: 54615
2008-08-10 17:03:01 +00:00
Steve Naroff eaf5853004 InitListChecker::CheckListElementTypes(): Check for function types and issue an appropriate diagnostic.
llvm-svn: 54614
2008-08-10 16:05:48 +00:00
Steve Naroff 63ebb3cd3e Cleanup from yesterday...make isTentativeDefinition() a static helper function (no need for it to be part of the Sema API).
llvm-svn: 54613
2008-08-10 15:28:06 +00:00
Steve Naroff 84e37356d6 Sema::CheckForFileScopedRedefinitions(): Make sure tentative decls of incomplete array types are completed (and diagnosed properly).
llvm-svn: 54612
2008-08-10 15:20:13 +00:00
Argyrios Kyrtzidis b3dd1e0889 Allow the preprocessor to cache the lexed tokens, so that we can do efficient lookahead and backtracking.
1) New public methods added:
  -EnableBacktrackAtThisPos
  -DisableBacktrack
  -Backtrack
  -isBacktrackEnabled

2) LookAhead() implementation is replaced with a more efficient one.
3) LookNext() is removed.

llvm-svn: 54611
2008-08-10 13:15:22 +00:00
Daniel Dunbar 07bb087ac1 Fix crash during initialization of a bitfield which followed a zero
length element.

Fix some 80-col violations.

llvm-svn: 54610
2008-08-10 07:00:24 +00:00
Daniel Dunbar 63fed4f35e Update ShuffeVectorExpr::getShuffleMaskIdx to use
getIntegerConstantExprValue.

Tweak getIntegerConstantExprValue to suppress warning in
  Release-Asserts mode.

llvm-svn: 54609
2008-08-10 06:58:01 +00:00
Daniel Dunbar 9a8d07321a Bug fix, inline string literals were getting an extra '\0'.
llvm-svn: 54608
2008-08-10 06:27:44 +00:00