]> granicus.if.org Git - clang/log
clang
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

16 years agoadd a simple check to warn people who type "=+" when they probably meant
Chris Lattner [Thu, 21 Aug 2008 18:04:13 +0000 (18:04 +0000)]
add a simple check to warn people who type "=+" when they probably meant
"+=".

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

16 years agoRewriteObjC::RewriteObjCSynchronizedStmt(): Make sure the sync expr is cast to "id".
Steve Naroff [Thu, 21 Aug 2008 13:03:03 +0000 (13:03 +0000)]
RewriteObjC::RewriteObjCSynchronizedStmt(): Make sure the sync expr is cast to "id".
This fixes <rdar://problem/6163088> clang ObjC rewriter: @synchronized ([foo class]) {} does not cast properly.

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

16 years agoUse full path to count script, and don't treat files with missing RUN
Daniel Dunbar [Thu, 21 Aug 2008 04:43:28 +0000 (04:43 +0000)]
Use full path to count script, and don't treat files with missing RUN
lines as errors.

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

16 years agoPreliminary support for Obj-C classes in NeXT runtime.
Daniel Dunbar [Thu, 21 Aug 2008 04:36:09 +0000 (04:36 +0000)]
Preliminary support for Obj-C classes in NeXT runtime.
 - Functional for simple cases but there are some glaring omissions
   (protocols, properties, and other language extensions).
 - The code needs a fair bit of cleaning.

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

16 years agoMissed a test case writing a .ll file.
Daniel Dunbar [Thu, 21 Aug 2008 04:30:23 +0000 (04:30 +0000)]
Missed a test case writing a .ll file.

Suppress count output from 'make test' on errors (used to generate
result code).

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

16 years agoReorder the PATH used during testing so $(ToolDir) and the LLVM
Daniel Dunbar [Thu, 21 Aug 2008 03:03:44 +0000 (03:03 +0000)]
Reorder the PATH used during testing so $(ToolDir) and the LLVM
scripts dir appear before the user path.
 - This is an attempt to pick up the right executables. We should
   probably be substituting the exact things we want for clang a la
   the LLVM test script.

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

16 years agoUpdate a number of CodeGen tests to not create .ll files in the test
Daniel Dunbar [Thu, 21 Aug 2008 02:51:29 +0000 (02:51 +0000)]
Update a number of CodeGen tests to not create .ll files in the test
directory.
 - Removed .ll from the svn:ignore lists to try and prevent this.
 - Added svn:ignore on test/Misc/Output

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

16 years agoUpdate test/Makefile to allow testing when using a separate obj
Daniel Dunbar [Thu, 21 Aug 2008 02:48:23 +0000 (02:48 +0000)]
Update test/Makefile to allow testing when using a separate obj
directory.
 - Also, return proper error code if testing fails.

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

16 years agoRemove duplicate define from Windows-x86 target.
Eli Friedman [Thu, 21 Aug 2008 01:56:54 +0000 (01:56 +0000)]
Remove duplicate define from Windows-x86 target.

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

16 years agoInitial implementation of Windows x86 target; at the moment, the only
Eli Friedman [Thu, 21 Aug 2008 01:40:19 +0000 (01:40 +0000)]
Initial implementation of Windows x86 target; at the moment, the only
difference from generic x86 is the defines.  The rest is non-trivial to
implement.

I'm not planning on adding any more targets myself; if there are any
targets anyone is currently using that are missing, feel free to add
them, or ask me to add them.

This concludes the work I'm planning for the TargetInfo
implementations at the moment; all the other issues with TargetInfo require
some API changes, and I haven't really thought it through.  Some of the
remaining issues: allowing targets to define size_t and wchar_t properly,
adding some sort of __builtin_type_info intrinsic so we can finish clang's
limits.h and float.h and get rid of a massive number of macro
definitions, allowing target-specific command-line options, allowing
target-specific defaults for certain command-line options like
-fms-extensions, exposing vector alignment outside of the description
string, exposing endianness outside of the description string, allowing
targets to expose special bit-field layout requirements, exposing some
sort of custom hook for call generation in CodeGen, and adding CPU
selection to control defines like __SSE__.

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

16 years agoAdd Linux x86-32 target.
Eli Friedman [Thu, 21 Aug 2008 00:24:02 +0000 (00:24 +0000)]
Add Linux x86-32 target.

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

16 years agoFirst cut at OS detection, taking advantage of the new generic targets.
Eli Friedman [Thu, 21 Aug 2008 00:13:15 +0000 (00:13 +0000)]
First cut at OS detection, taking advantage of the new generic targets.
This approach allows adding OS-specific targets/defines/etc. without
completely breaking unknown subtargets.  No new subtargets yet, although
I plan to add x86-Linux soon.  Others can add targets that they use as
needed; adding a new subtarget takes very little code.

Also does some fixups for description strings; a lot of them were
unspecified.  I think all the ones I added are correct, but
they're unverified; corrections are welcome.

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

16 years agoClass reorg for PPC; shouldn't be any visible changes unless I messed
Eli Friedman [Wed, 20 Aug 2008 23:11:40 +0000 (23:11 +0000)]
Class reorg for PPC; shouldn't be any visible changes unless I messed
up somehow.

This concludes the series of reorg patches for the target
implementations.

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

16 years agoFix a regression from my fix to PR2631. Fixes PR2692.
Eli Friedman [Wed, 20 Aug 2008 22:17:17 +0000 (22:17 +0000)]
Fix a regression from my fix to PR2631. Fixes PR2692.

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

16 years agoFix a minor crash-on-invalid.
Eli Friedman [Wed, 20 Aug 2008 22:07:34 +0000 (22:07 +0000)]
Fix a minor crash-on-invalid.

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

16 years agoFix attributes on Obj-C interfaces & methods.
Daniel Dunbar [Wed, 20 Aug 2008 18:02:42 +0000 (18:02 +0000)]
Fix attributes on Obj-C interfaces & methods.
 - Drop MethodAttrs parameter to ObjCMethodDecl
 - Call ProcessDeclAttributeList for interface & method decls.

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

16 years agoFix URL typo.
Ted Kremenek [Wed, 20 Aug 2008 17:20:54 +0000 (17:20 +0000)]
Fix URL typo.

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

16 years agoUpdated checker build.
Ted Kremenek [Wed, 20 Aug 2008 17:19:58 +0000 (17:19 +0000)]
Updated checker build.

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

16 years agoPatch by Zhongxing Xu:
Ted Kremenek [Wed, 20 Aug 2008 17:08:29 +0000 (17:08 +0000)]
Patch by Zhongxing Xu:

This patch moves some code in GRStateManager::RemoveDeadBindings() to EnvironmentManager::RemoveDeadBindings().

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

16 years agoPatch by Zhongxing Xu: We should set back the modified ConstEq map.
Ted Kremenek [Wed, 20 Aug 2008 16:59:15 +0000 (16:59 +0000)]
Patch by Zhongxing Xu: We should set back the modified ConstEq map.

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

16 years agoClass reorg for ARM. Shouldn't be any visible changes.
Eli Friedman [Wed, 20 Aug 2008 07:44:10 +0000 (07:44 +0000)]
Class reorg for ARM.  Shouldn't be any visible changes.

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

16 years agoClass hierarchy reorg for Sparc architecture. While I was there, I
Eli Friedman [Wed, 20 Aug 2008 07:28:14 +0000 (07:28 +0000)]
Class hierarchy reorg for Sparc architecture.  While I was there, I
cleaned it up a bit, including fixing the definition of va_list; this
shouldn't break anything, but anyone using Sparc should watch for
regressions.

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

16 years agoFix subtle bug introduced in r54852.
Daniel Dunbar [Wed, 20 Aug 2008 03:55:42 +0000 (03:55 +0000)]
Fix subtle bug introduced in r54852.
 - UsualUnaryConversions takes an Expr *& and may modify its argument,
   this broke when it was refactored into Sema::CheckCastTypes. This
   meant that we were missing implicit casts in some places.
 - Seems pretty sad that this got through our tests.

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

16 years agoRe-enable deletion of AST nodes upon completion of ParseAST.
Ted Kremenek [Wed, 20 Aug 2008 03:27:00 +0000 (03:27 +0000)]
Re-enable deletion of AST nodes upon completion of ParseAST.

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

16 years agoAdded ObjCAtDefsFieldDecl to represent FieldDecls created by @defs.
Ted Kremenek [Wed, 20 Aug 2008 03:26:33 +0000 (03:26 +0000)]
Added ObjCAtDefsFieldDecl to represent FieldDecls created by @defs.
This fixes an ownership issue where FieldDecls could be owned both by an ObjCInterfaceDecl and a RecordDecl.

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

16 years agoReorganize the class hierarchy for x86 targets; shouldn't have any
Eli Friedman [Wed, 20 Aug 2008 02:34:37 +0000 (02:34 +0000)]
Reorganize the class hierarchy for x86 targets; shouldn't have any
visible effects, but this will significantly reduce the amount of
boilerplate code necessary to add subtargets.

If this looks okay, I'll do the rest of the processors (PPC, Sparc, ARM)
soon.

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

16 years agoFix test failure on Linux.
Eli Friedman [Wed, 20 Aug 2008 01:05:41 +0000 (01:05 +0000)]
Fix test failure on Linux.

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

16 years agoFix some spam from make I accidentally introduced.
Eli Friedman [Wed, 20 Aug 2008 00:38:03 +0000 (00:38 +0000)]
Fix some spam from make I accidentally introduced.

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

16 years agoMove all Obj-C runtime interaction into CodeGenFunction.
Daniel Dunbar [Wed, 20 Aug 2008 00:28:19 +0000 (00:28 +0000)]
Move all Obj-C runtime interaction into CodeGenFunction.
 - Drop duplicate (and broken) code for sending messages.
 - Add EmitObjCProtocolExpr to CodeGenFunction.

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

16 years agoGet rid of the bogus -depth +0 argument; I really have no clue what the
Eli Friedman [Wed, 20 Aug 2008 00:02:01 +0000 (00:02 +0000)]
Get rid of the bogus -depth +0 argument; I really have no clue what the
heck it does on Darwin, but it's not part of POSIX, and the GNU version
of find errors out on it.

On a side note, there are a couple of new failures due to tests
including OS X specific headers.

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

16 years agoMove store pretty-printing logic inside of StoreManager (previously in GRState).
Ted Kremenek [Tue, 19 Aug 2008 22:24:03 +0000 (22:24 +0000)]
Move store pretty-printing logic inside of StoreManager (previously in GRState).

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

16 years agoPatch by Zhongxing Xu!
Ted Kremenek [Tue, 19 Aug 2008 16:51:45 +0000 (16:51 +0000)]
Patch by Zhongxing Xu!

This patch extends BasicStoreManager::getInitialStore() to include code that symbolicates input variables.
It also removes redundant handling of ImplicitParamDecl, since it is a subclass of VarDecl.

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

16 years agoFix crasher in RewriteObjC::RewriteObjCSynchronizedStmt(). Can't depend on the source...
Steve Naroff [Tue, 19 Aug 2008 13:04:19 +0000 (13:04 +0000)]
Fix crasher in RewriteObjC::RewriteObjCSynchronizedStmt(). Can't depend on the source locations of the sync expression (since it may have been rewritten.
Fixes <rdar://problem/6156363> clang ObjC rewriter: rewriting attached file causes assertion failure: invalid FileID

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

16 years agoUse raw_ostream to output an unsigned.
Chris Lattner [Tue, 19 Aug 2008 04:23:15 +0000 (04:23 +0000)]
Use raw_ostream to output an unsigned.

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

16 years agoUpdate checker-78.
Ted Kremenek [Tue, 19 Aug 2008 01:17:30 +0000 (01:17 +0000)]
Update checker-78.

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

16 years agoadd testcase we already handle.
Chris Lattner [Tue, 19 Aug 2008 00:58:40 +0000 (00:58 +0000)]
add testcase we already handle.

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

16 years agoAdd ExplicitCastExpr to replace the current CastExpr, and have ImplicitCastExpr and...
Argyrios Kyrtzidis [Mon, 18 Aug 2008 23:01:59 +0000 (23:01 +0000)]
Add ExplicitCastExpr to replace the current CastExpr, and have ImplicitCastExpr and ExplicitCastExpr derive from a common base class (CastExpr):

Expr
  -> CastExpr
     -> ExplicitCastExpr
     -> ImplicitCastExpr

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

16 years agoproper grammar n stuph
Chris Lattner [Mon, 18 Aug 2008 22:51:28 +0000 (22:51 +0000)]
proper grammar n stuph

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

16 years agowarn when someone tries to make an array of ObjC interfaces instead of array
Chris Lattner [Mon, 18 Aug 2008 22:49:54 +0000 (22:49 +0000)]
warn when someone tries to make an array of ObjC interfaces instead of array
of pointers to them.  rdar://4304469

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

16 years ago"Remove the 'else' since the code is fallthrough after it." - suggestion by Chris.
Argyrios Kyrtzidis [Mon, 18 Aug 2008 22:49:40 +0000 (22:49 +0000)]
"Remove the 'else' since the code is fallthrough after it." - suggestion by Chris.

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

16 years agoRecord arguments in .info file.
Ted Kremenek [Mon, 18 Aug 2008 20:55:25 +0000 (20:55 +0000)]
Record arguments in .info file.

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

16 years agoSupport initialization of incomplete array with zero size (as
Daniel Dunbar [Mon, 18 Aug 2008 20:28:46 +0000 (20:28 +0000)]
Support initialization of incomplete array with zero size (as
  extension).

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

16 years agoFix PR2627, support for Q constraint.
Chris Lattner [Mon, 18 Aug 2008 20:05:00 +0000 (20:05 +0000)]
Fix PR2627, support for Q constraint.

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

16 years agoSeveral cleanups and tweaks to diagnostics in Sema::ActOnAsmStmt,
Chris Lattner [Mon, 18 Aug 2008 19:55:17 +0000 (19:55 +0000)]
Several cleanups and tweaks to diagnostics in Sema::ActOnAsmStmt,
no other functionality change.

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