]> granicus.if.org Git - clang/log
clang
16 years agoupdate documentation
Nico Weber [Tue, 26 Aug 2008 21:23:32 +0000 (21:23 +0000)]
update documentation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55386 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdate VS project.
Cedric Venet [Tue, 26 Aug 2008 19:46:30 +0000 (19:46 +0000)]
Update VS project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55379 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoObjective-C @synthesize support.
Daniel Dunbar [Tue, 26 Aug 2008 08:29:31 +0000 (08:29 +0000)]
Objective-C @synthesize support.
 - Only supports simple assignment and atomic semantics are ignored.
 - Not quite usable yet because the methods do not actually get added
   to the class metadata.
 - Added ObjCPropertyDecl::getSetterKind (one of Assign, Copy, Retain).
 - Rearrange CodeGenFunction so synthesis can reuse function prolog /
   epilog code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55365 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd ObjCPropertyDecl::isReadOnly.
Daniel Dunbar [Tue, 26 Aug 2008 07:16:44 +0000 (07:16 +0000)]
Add ObjCPropertyDecl::isReadOnly.

Respect isReadOnly when generating synthesized method decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55364 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoconstify ObjC*::getClassMethod,getInstanceMethod
Daniel Dunbar [Tue, 26 Aug 2008 06:53:45 +0000 (06:53 +0000)]
constify ObjC*::getClassMethod,getInstanceMethod

No (intended) functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55362 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMissed a file; part of:
Daniel Dunbar [Tue, 26 Aug 2008 06:08:30 +0000 (06:08 +0000)]
Missed a file; part of:

Move implicit Obj-C param creation into ObjCMethodDecl.
 - Add ObjCMethodDecl::createImplicitParams.
 - Remove ObjCMethodDecl::set{Self,Cmd}Decl
 - Remove Sema::CreateImplicitParameter

No (intended) functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55357 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove implicit Obj-C param creation into ObjCMethodDecl.
Daniel Dunbar [Tue, 26 Aug 2008 06:07:48 +0000 (06:07 +0000)]
Move implicit Obj-C param creation into ObjCMethodDecl.
 - Add ObjCMethodDecl::createImplicitParams.
 - Remove ObjCMethodDecl::set{Self,Cmd}Decl
 - Remove Sema::CreateImplicitParameter

No (intended) functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55356 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRename ObjCPropertyImplDecl::PropertyImplKind (consistency)
Daniel Dunbar [Tue, 26 Aug 2008 04:47:31 +0000 (04:47 +0000)]
Rename ObjCPropertyImplDecl::PropertyImplKind (consistency)
 - Change enum name to Kind.
 - Change enum constants to English strings.

Also, fix getPropertyImplementation (which probably should be renamed)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55354 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix return type for setter method.
Daniel Dunbar [Tue, 26 Aug 2008 02:53:23 +0000 (02:53 +0000)]
Fix return type for setter method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55353 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSynthesize property setter method as we do for getter.
Daniel Dunbar [Tue, 26 Aug 2008 02:32:45 +0000 (02:32 +0000)]
Synthesize property setter method as we do for getter.
 - Also, fix Parser to construct proper SetterName selector (should be
   lifted out of parser though).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55352 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoIn incompatible pointer-typed ?: expressions, add implicit conversion
Daniel Dunbar [Tue, 26 Aug 2008 00:41:39 +0000 (00:41 +0000)]
In incompatible pointer-typed ?: expressions, add implicit conversion
of RHSs to id type instead of void* if either has Objective-C object
type.
 - This ensures the result can still be used in normal places an
   object can be used, like a message send.

Add implicit conversions for ?: applied to qualified id types to
ensure that the RHSs are compatible.
 - This prevents a codegen crash (creating invalid PHI nodes).
 - Again, this relates to the fact that qualified id types have no
   canonical types.
 - Note that the implicit type casted to is incorrect, however this
   doesn't currently cause problems because of the flexibility of the
   id type.

Test cases for above.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55346 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDo typechecking and codegen for K&R-style function declarations
Eli Friedman [Mon, 25 Aug 2008 21:31:01 +0000 (21:31 +0000)]
Do typechecking and codegen for K&R-style function declarations
correctly.  Not a regression, but made more obvious by my recent fix
which made function type compatibility checking a bit more strict.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55339 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdate checker build.
Ted Kremenek [Mon, 25 Aug 2008 21:27:06 +0000 (21:27 +0000)]
Update checker build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55337 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix for PR2720; be a little bit more permissive in initializers for
Eli Friedman [Mon, 25 Aug 2008 20:46:57 +0000 (20:46 +0000)]
Fix for PR2720; be a little bit more permissive in initializers for
casting pointers to integers.

Eventually, we should check whether we can evaluate an expression
using Expr::tryEvaluate, and this codepath should be tightened to only
handle standard-compliant cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55331 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSupport __PRETTY_FUNCTION__ and friends in Obj-C methods.
Daniel Dunbar [Mon, 25 Aug 2008 20:45:57 +0000 (20:45 +0000)]
Support __PRETTY_FUNCTION__ and friends in Obj-C methods.

Add CodeGenFunction::EmitUnsupportedLValue
 - Gives error and returns undef value.

Swap some asserts() over to using EmitUnsupportedLValue
 - Rumor has it users (and even some developers) prefer carat
   diagnostics to backtraces.
 - Works better in Release-Asserts to boot.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55328 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse path information from .info files when computing common prefix information.
Ted Kremenek [Mon, 25 Aug 2008 20:45:07 +0000 (20:45 +0000)]
Use path information from .info files when computing common prefix information.
This partially implements PR 2705: http://llvm.org/bugs/show_bug.cgi?id=2705

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55327 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse the same 'cc' for generated preprocessed crash files as we do for compilation.
Ted Kremenek [Mon, 25 Aug 2008 20:44:31 +0000 (20:44 +0000)]
Use the same 'cc' for generated preprocessed crash files as we do for compilation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55326 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoccc-analyzer now correctly reports the exit code from 'cc'.
Ted Kremenek [Mon, 25 Aug 2008 20:10:45 +0000 (20:10 +0000)]
ccc-analyzer now correctly reports the exit code from 'cc'.
scan-build now correctly reports the exit code from the build command.
Fixes: <rdar://problem/6172224>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55324 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd test case for function-pointer-cast-of-global as constant
Daniel Dunbar [Mon, 25 Aug 2008 20:08:27 +0000 (20:08 +0000)]
Add test case for function-pointer-cast-of-global as constant
expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55323 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdate Xcode project.
Ted Kremenek [Mon, 25 Aug 2008 19:33:19 +0000 (19:33 +0000)]
Update Xcode project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55322 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded 'extents' for Regions.
Ted Kremenek [Mon, 25 Aug 2008 19:33:03 +0000 (19:33 +0000)]
Added 'extents' for Regions.
Added 'getExtent()' to StoreManager.
Implemented 'getExtent()' for BasicStoreManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55321 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoObjective-C foreach selector elements must be lvalues.
Anders Carlsson [Mon, 25 Aug 2008 18:16:36 +0000 (18:16 +0000)]
Objective-C foreach selector elements must be lvalues.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55316 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoChange another is-a-pointer check to check in terms of LLVM type.
Daniel Dunbar [Mon, 25 Aug 2008 10:38:11 +0000 (10:38 +0000)]
Change another is-a-pointer check to check in terms of LLVM type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55312 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDo is-a-pointer checks in terms of LLVM types in
Daniel Dunbar [Mon, 25 Aug 2008 09:51:32 +0000 (09:51 +0000)]
Do is-a-pointer checks in terms of LLVM types in
EmitScalarConversion().
 - Important for allowing Obj-C void * to id<X> casts and so on.
 - Not sure about this fix however, perhaps Type should understand
   that id is effectively a pointer type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55311 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoStop asserting in TargetInfo::validateInputConstraint
Daniel Dunbar [Mon, 25 Aug 2008 09:46:27 +0000 (09:46 +0000)]
Stop asserting in TargetInfo::validateInputConstraint
 - Sema gives a perfectively nice error message on invalid constraints.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55310 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix Obj-C super sends inside class methods.
Daniel Dunbar [Mon, 25 Aug 2008 08:19:24 +0000 (08:19 +0000)]
Fix Obj-C super sends inside class methods.
 - NeXT loads the super class at runtime; this required changing the
   runtime interface to pass more information down.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55307 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoName struct types generated for Obj-C classes.
Daniel Dunbar [Mon, 25 Aug 2008 06:28:15 +0000 (06:28 +0000)]
Name struct types generated for Obj-C classes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55304 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse DenseMap on IdentifierInfo instead of StringMap.
Daniel Dunbar [Mon, 25 Aug 2008 06:18:57 +0000 (06:18 +0000)]
Use DenseMap on IdentifierInfo instead of StringMap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55303 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoNeXT: Emit symbols used to manage linking of Obj-C classes.
Daniel Dunbar [Mon, 25 Aug 2008 06:02:07 +0000 (06:02 +0000)]
NeXT: Emit symbols used to manage linking of Obj-C classes.
 - This ensures that references to undefined classes cause link
   errors.
 - NOTE: This relies on platform specific asm directives currently,
   this should be factored out.

Also, don't emit a SYMBOLS metadata entry if there are no symbols.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55302 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoHandle emitting __builtin_huge_valf as a constant expr.
Anders Carlsson [Mon, 25 Aug 2008 03:27:15 +0000 (03:27 +0000)]
Handle emitting __builtin_huge_valf as a constant expr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55299 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake code generation of ivar ref exprs more like member exprs.
Anders Carlsson [Mon, 25 Aug 2008 01:53:23 +0000 (01:53 +0000)]
Make code generation of ivar ref exprs more like member exprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55298 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoHandle static variables inside obj-c methods.
Anders Carlsson [Mon, 25 Aug 2008 01:38:19 +0000 (01:38 +0000)]
Handle static variables inside obj-c methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55297 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoConvert qualified interface types correctly.
Anders Carlsson [Sun, 24 Aug 2008 18:05:19 +0000 (18:05 +0000)]
Convert qualified interface types correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55287 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix silly bug in objc_gc attribute parsing and add test case
Anders Carlsson [Sun, 24 Aug 2008 16:33:25 +0000 (16:33 +0000)]
Fix silly bug in objc_gc attribute parsing and add test case

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55286 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPass SourceRanges by reference to the various Diag methods.
Argyrios Kyrtzidis [Sun, 24 Aug 2008 13:14:02 +0000 (13:14 +0000)]
Pass SourceRanges by reference to the various Diag methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55284 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a Parser::Diag overload that can receive a custom string along with a SourceRange.
Argyrios Kyrtzidis [Sun, 24 Aug 2008 12:51:04 +0000 (12:51 +0000)]
Add a Parser::Diag overload that can receive a custom string along with a SourceRange.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55283 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRename Preprocessor::DisableBacktrack -> Preprocessor::CommitBacktrackedTokens.
Argyrios Kyrtzidis [Sun, 24 Aug 2008 12:29:43 +0000 (12:29 +0000)]
Rename Preprocessor::DisableBacktrack -> Preprocessor::CommitBacktrackedTokens.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55281 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdate VS projects.
Cedric Venet [Sun, 24 Aug 2008 11:59:26 +0000 (11:59 +0000)]
Update VS projects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55280 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoother updates
Chris Lattner [Sun, 24 Aug 2008 05:56:54 +0000 (05:56 +0000)]
other updates

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55278 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agolink to c++ status page
Chris Lattner [Sun, 24 Aug 2008 05:44:37 +0000 (05:44 +0000)]
link to c++ status page

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55277 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agocodegen is still not 'finished', but in a better state than before.
Chris Lattner [Sun, 24 Aug 2008 05:42:07 +0000 (05:42 +0000)]
codegen is still not 'finished', but in a better state than before.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55276 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMoved HTMLDiagnostics to lib/Driver.
Zhongxing Xu [Sun, 24 Aug 2008 02:33:36 +0000 (02:33 +0000)]
Moved HTMLDiagnostics to lib/Driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55274 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd svn:ignore for docs/{doxygen,doxygen.tar.gz}
Daniel Dunbar [Sun, 24 Aug 2008 00:24:17 +0000 (00:24 +0000)]
Add svn:ignore for docs/{doxygen,doxygen.tar.gz}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55273 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoComment tweak.
Chris Lattner [Sun, 24 Aug 2008 00:12:08 +0000 (00:12 +0000)]
Comment tweak.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55272 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd support for parsing the objc_gc attribute. Tests will come shortly.
Anders Carlsson [Sat, 23 Aug 2008 23:22:21 +0000 (23:22 +0000)]
Add support for parsing the objc_gc attribute. Tests will come shortly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55269 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadjust to changes in various APIs from LLVM. We can't print
Chris Lattner [Sat, 23 Aug 2008 22:23:37 +0000 (22:23 +0000)]
adjust to changes in various APIs from LLVM.  We can't print
an APInt directly to an ostream now, so add some hacks.  It would
be better to switch all of the bugreport (and friends) stuff over
to raw_ostream.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55264 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd carbon.cpp and cocoa.mm tests
Anders Carlsson [Sat, 23 Aug 2008 22:21:00 +0000 (22:21 +0000)]
Add carbon.cpp and cocoa.mm tests

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55262 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake sure to create CXX record decls for the implicit Obj-C type declarations. This...
Anders Carlsson [Sat, 23 Aug 2008 22:20:38 +0000 (22:20 +0000)]
Make sure to create CXX record decls for the implicit Obj-C type declarations. This lets us compile Cocoa.h as Objective-C++

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55261 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdate ccc driver
Daniel Dunbar [Sat, 23 Aug 2008 22:15:15 +0000 (22:15 +0000)]
Update ccc driver
 - Use CCC_ECHO to control echoing behavior (default is on, set to ''
   or unset to disable)
 - Get 'clang','llc','as','cc','ld' executables from environment. 'cc'
   and 'ld' are fetched through CCC_CC and CCC_LD respectively -- to
   support make CC=ccc -- the others are through their upcased
   versions.
 - Add CCC_NATIVE mode.
   o This uses llc and as to generate native object files; allowing
     more drop-in replacement of gcc.
   o Disabled by default, but should eventually be default.
   o Allow --emit-llvm in CCC_NATIVE mode to override. Essentially
     this makes ccc more like a drop in replacement for llvm-gcc.
 - Prevent explicit -x <language> options from annoying clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55260 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agotreat bool literals as constatnt expressions.
Anders Carlsson [Sat, 23 Aug 2008 21:12:35 +0000 (21:12 +0000)]
treat bool literals as constatnt expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55255 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoHandle Objective-C++ tests.
Anders Carlsson [Sat, 23 Aug 2008 21:03:10 +0000 (21:03 +0000)]
Handle Objective-C++ tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55254 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoReserved C++ words are valid selectors in Objective-C++
Anders Carlsson [Sat, 23 Aug 2008 21:00:01 +0000 (21:00 +0000)]
Reserved C++ words are valid selectors in Objective-C++

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55253 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoHandle static initializers in Objective-C++ methods.
Anders Carlsson [Sat, 23 Aug 2008 19:42:54 +0000 (19:42 +0000)]
Handle static initializers in Objective-C++ methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55250 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd CodeGen support for CXXZeroInitValueExpr.
Argyrios Kyrtzidis [Sat, 23 Aug 2008 19:35:47 +0000 (19:35 +0000)]
Add CodeGen support for CXXZeroInitValueExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55249 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a null pointer test in the type-convert-construct.cpp tests.
Argyrios Kyrtzidis [Sat, 23 Aug 2008 19:24:45 +0000 (19:24 +0000)]
Add a null pointer test in the type-convert-construct.cpp tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55247 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoHandle AddrLabelExprs in Expr::isConstantExpr
Anders Carlsson [Sat, 23 Aug 2008 18:49:32 +0000 (18:49 +0000)]
Handle AddrLabelExprs in Expr::isConstantExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55245 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDrop a dead call to isConstantExpr()
Daniel Dunbar [Sat, 23 Aug 2008 18:44:10 +0000 (18:44 +0000)]
Drop a dead call to isConstantExpr()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55244 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoNeXT: Clean up constant CFString handling.
Daniel Dunbar [Sat, 23 Aug 2008 18:37:06 +0000 (18:37 +0000)]
NeXT: Clean up constant CFString handling.
 - Use CodeGenModule::GetAddrOfConstantCFString

Some tweaks of CodeGenModule::GetAddrOfConstantCFString

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55243 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd header search paths for dragonfly, patch by Sascha Wildner!
Chris Lattner [Sat, 23 Aug 2008 18:25:07 +0000 (18:25 +0000)]
Add header search paths for dragonfly, patch by Sascha Wildner!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55242 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd dragonfly target support, patch by Sascha Wildner
Chris Lattner [Sat, 23 Aug 2008 18:23:14 +0000 (18:23 +0000)]
Add dragonfly target support, patch by Sascha Wildner

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55241 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTweak the indentation for a couple of files
Anders Carlsson [Sat, 23 Aug 2008 16:36:06 +0000 (16:36 +0000)]
Tweak the indentation for a couple of files

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55240 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCXXFunctionalCastExpr is a subclass of CastExpr. Make it known to isa/dyn_cast/cast.
Argyrios Kyrtzidis [Sat, 23 Aug 2008 15:36:01 +0000 (15:36 +0000)]
CXXFunctionalCastExpr is a subclass of CastExpr. Make it known to isa/dyn_cast/cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55237 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a safety check.
Argyrios Kyrtzidis [Sat, 23 Aug 2008 12:12:06 +0000 (12:12 +0000)]
Add a safety check.
Make sure there's no "dangling" backtrack position when Preprocessor is destroyed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55236 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoChange line endings: CRLF -> LF
Argyrios Kyrtzidis [Sat, 23 Aug 2008 12:05:53 +0000 (12:05 +0000)]
Change line endings: CRLF -> LF

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55235 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplement Obj-C ivar references to aggregates.
Daniel Dunbar [Sat, 23 Aug 2008 10:51:21 +0000 (10:51 +0000)]
Implement Obj-C ivar references to aggregates.

Implement Obj-C lvalue message sends (aggregate returns).

Update several places to emit more precise ErrorUnsupported warnings
  for currently unimplemented Obj-C features (main missing chunks are
  property references, Obj-C exception handling, and the for ... in
  syntax).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55234 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoNeXT: Fix message sends which return structures.
Daniel Dunbar [Sat, 23 Aug 2008 09:25:55 +0000 (09:25 +0000)]
NeXT: Fix message sends which return structures.
 - Simplify the sending code a bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55232 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd TargetInfo::useNeXTRuntimeAsDefault
Daniel Dunbar [Sat, 23 Aug 2008 08:43:39 +0000 (08:43 +0000)]
Add TargetInfo::useNeXTRuntimeAsDefault
 - Used to autoselect runtime when neither -fnext-runtime nor
   -fgnu-runtime is specified.
 - Default impl is false, all darwin targets set it to true.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55231 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoNeXT: Implement super message sends.
Daniel Dunbar [Sat, 23 Aug 2008 04:28:29 +0000 (04:28 +0000)]
NeXT: Implement super message sends.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55225 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTrim CGObjCRuntime::GenerateMessageSend[Super]
Daniel Dunbar [Sat, 23 Aug 2008 03:46:30 +0000 (03:46 +0000)]
Trim CGObjCRuntime::GenerateMessageSend[Super]
 - Returns an RValue.
 - Reduced to only taking the CodeGenFunction, Expr, and Receiver.
 - Becomes responsible for emitting the arguments.

Add CodeGenFunction::EmitCallExprExt
 - Takes optional extra arguments to insert at the head of the call.
 - This allows the Obj-C runtimes to call into this and isolates the
   argument and call instruction generation code to one place. Upshot
   is that we now pass structures (more) correctly.

Also, fix one aspect of generating methods which take structure
arguments (for NeXT). This probably needs to be merged with the
SetFunctionAttributes code in CodeGenModule.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55223 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agomake sure that ParseAST invokes the action for end of translation unit.
Chris Lattner [Sat, 23 Aug 2008 03:19:52 +0000 (03:19 +0000)]
make sure that ParseAST invokes the action for end of translation unit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55222 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove [LR]Value into CGValue.h
Daniel Dunbar [Sat, 23 Aug 2008 03:10:25 +0000 (03:10 +0000)]
Move [LR]Value into CGValue.h
 - No (intended) functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55221 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd action to know about end of translation unit.
Chris Lattner [Sat, 23 Aug 2008 02:06:50 +0000 (02:06 +0000)]
add action to know about end of translation unit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55218 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agowe already have a handle on the 'in' keyword, don't bother getting two.
Chris Lattner [Sat, 23 Aug 2008 02:02:23 +0000 (02:02 +0000)]
we already have a handle on the 'in' keyword, don't bother getting two.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55217 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agominor cleanup, remove finalize method.
Chris Lattner [Sat, 23 Aug 2008 02:00:52 +0000 (02:00 +0000)]
minor cleanup, remove finalize method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55216 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a FIXME by not creating an invalid AST on erroneous input. Also
Chris Lattner [Sat, 23 Aug 2008 01:48:03 +0000 (01:48 +0000)]
Fix a FIXME by not creating an invalid AST on erroneous input.  Also
make diagnostic output in some other malformed cases significantly
more useful.  This fixes PR2708

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55215 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSimplify interface to Store::AddDecl
Ted Kremenek [Sat, 23 Aug 2008 00:50:55 +0000 (00:50 +0000)]
Simplify interface to Store::AddDecl

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55213 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded Regions.h: Regions define abstract memory locations for the static analyzer.
Ted Kremenek [Sat, 23 Aug 2008 00:43:24 +0000 (00:43 +0000)]
Added Regions.h: Regions define abstract memory locations for the static analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55211 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoNeXT: Emit property metadata (classes, protocols, categories).
Daniel Dunbar [Sat, 23 Aug 2008 00:19:03 +0000 (00:19 +0000)]
NeXT: Emit property metadata (classes, protocols, categories).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55209 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse isa instead of dyn_cast.
Anders Carlsson [Fri, 22 Aug 2008 22:10:48 +0000 (22:10 +0000)]
Use isa instead of dyn_cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55207 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAllow nested backtracks.
Argyrios Kyrtzidis [Fri, 22 Aug 2008 21:27:50 +0000 (21:27 +0000)]
Allow nested backtracks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55204 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoNeXT: Emit category metadata.
Daniel Dunbar [Fri, 22 Aug 2008 20:34:54 +0000 (20:34 +0000)]
NeXT: Emit category metadata.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55197 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd some QA related example clang projects.
Daniel Dunbar [Fri, 22 Aug 2008 20:18:22 +0000 (20:18 +0000)]
Add some QA related example clang projects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55196 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdate Xcode project.
Ted Kremenek [Fri, 22 Aug 2008 18:03:50 +0000 (18:03 +0000)]
Update Xcode project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55188 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd preliminary (and probably broken) codegen support for C++ static initializers.
Anders Carlsson [Fri, 22 Aug 2008 16:00:37 +0000 (16:00 +0000)]
Add preliminary (and probably broken) codegen support for C++ static initializers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55180 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove the rest of the Sema C++ tests into the SemaCXX test directory.
Argyrios Kyrtzidis [Fri, 22 Aug 2008 15:43:49 +0000 (15:43 +0000)]
Move the rest of the Sema C++ tests into the SemaCXX test directory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55178 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd support for C++'s "type-specifier ( expression-list )" expression:
Argyrios Kyrtzidis [Fri, 22 Aug 2008 15:38:55 +0000 (15:38 +0000)]
Add support for C++'s "type-specifier ( expression-list )" expression:

-The Parser calls a new "ActOnCXXTypeConstructExpr" action.
-Sema, depending on the type and expressions number:
   -If the type is a class, it will treat it as a class constructor. [TODO]
   -If there's only one expression (i.e. "int(0.5)" ), creates a new "CXXFunctionalCastExpr" Expr node
   -If there are no expressions (i.e "int()" ), creates a new "CXXZeroInitValueExpr" Expr node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55177 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agomake test fails if llvm is checked out to llvm-svn of if there is a dash somewhere...
Nico Weber [Fri, 22 Aug 2008 09:33:51 +0000 (09:33 +0000)]
make test fails if llvm is checked out to llvm-svn of if there is a dash somewhere else in the path. fix that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55175 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove most of HeaderSearch initialization to libDriver.
Nico Weber [Fri, 22 Aug 2008 09:25:22 +0000 (09:25 +0000)]
Move most of HeaderSearch initialization to libDriver.

For example, adding the default system include paths in clients is now as
simple as

  InitHeaderSearch init(headers);
  init.AddDefaultSystemIncludePaths(langopts);
  init.Realize();

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55174 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoimprove pretty printing of objc method declaration,
Chris Lattner [Fri, 22 Aug 2008 06:59:15 +0000 (06:59 +0000)]
improve pretty printing of objc method declaration,
patch contributed by Benjamin Stiglitz!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55170 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdated checker build.
Ted Kremenek [Fri, 22 Aug 2008 05:14:28 +0000 (05:14 +0000)]
Updated checker build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55169 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoInitial sema support for C++ static initializers.
Anders Carlsson [Fri, 22 Aug 2008 05:00:02 +0000 (05:00 +0000)]
Initial sema support for C++ static initializers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55166 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdated latest checker build.
Ted Kremenek [Fri, 22 Aug 2008 03:06:47 +0000 (03:06 +0000)]
Updated latest checker build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55162 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix some issues with array type merging. (No visible difference,
Eli Friedman [Fri, 22 Aug 2008 01:48:21 +0000 (01:48 +0000)]
Fix some issues with array type merging. (No visible difference,
because nothing uses the merged types yet.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55161 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMinor const cleanup.
Eli Friedman [Fri, 22 Aug 2008 00:59:49 +0000 (00:59 +0000)]
Minor const cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55160 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRewrite type compatibility testing to do type merging rather than just
Eli Friedman [Fri, 22 Aug 2008 00:56:42 +0000 (00:56 +0000)]
Rewrite type compatibility testing to do type merging rather than just
testing compatibility.  This is necessary for some constructs, like merging
redeclarations.

Also, there are some ObjC changes to make sure that
typesAreCompatible(a,b) == typesAreCompatible(b,a).  I don't have any
ObjC code beyond the testsuite, so please tell me if there are any cases
where this doesn't behave as expected.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55158 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoInitial implementation of floats in Expr::tryEvaluate; this doesn't
Eli Friedman [Fri, 22 Aug 2008 00:06:13 +0000 (00:06 +0000)]
Initial implementation of floats in Expr::tryEvaluate; this doesn't
implement some things, like unary operators and casts, but it's enough
to fix PR2703 as filed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55155 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoModify comments.
Zhongxing Xu [Thu, 21 Aug 2008 23:00:21 +0000 (23:00 +0000)]
Modify comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55150 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove the handling of DeclStmt from GRExprEngine to BasicStoreManager.
Zhongxing Xu [Thu, 21 Aug 2008 22:34:01 +0000 (22:34 +0000)]
Move the handling of DeclStmt from GRExprEngine to BasicStoreManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55144 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoNeXT: Emit [meta]class protocol references.
Daniel Dunbar [Thu, 21 Aug 2008 21:57:41 +0000 (21:57 +0000)]
NeXT: Emit [meta]class protocol references.

Updated ObjCProtocolDecl::protocol_iterator to match that of
ObjCInterfaceDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55143 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded --use-cc option to scan-build to allow the user to specify what compiler they...
Ted Kremenek [Thu, 21 Aug 2008 21:47:09 +0000 (21:47 +0000)]
Added --use-cc option to scan-build to allow the user to specify what compiler they want to use for code compilation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55142 91177308-0d34-0410-b5e6-96231b3b80d8