]> granicus.if.org Git - clang/log
clang
16 years agoAdd accessors + iterator interface.
Chris Lattner [Fri, 28 Dec 2007 05:25:02 +0000 (05:25 +0000)]
Add accessors + iterator interface.

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

16 years agoFrom Lucas Newman:
Chris Lattner [Fri, 28 Dec 2007 00:38:23 +0000 (00:38 +0000)]
From Lucas Newman:
"Here's a tiny patch that lets the clang Xcode project build in any
location, so llvm doesn't have to be checked out in your home folder."

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

16 years agoadd a file I forgot to svn add.
Chris Lattner [Thu, 27 Dec 2007 21:46:27 +0000 (21:46 +0000)]
add a file I forgot to svn add.

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

16 years agoalphabetize in project.
Chris Lattner [Thu, 27 Dec 2007 20:59:50 +0000 (20:59 +0000)]
alphabetize in project.

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

16 years agouse -emit-llvm-bc
Chris Lattner [Thu, 27 Dec 2007 20:35:58 +0000 (20:35 +0000)]
use -emit-llvm-bc

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

16 years agono need to verify this, no errors/warnings are expected.
Chris Lattner [Thu, 27 Dec 2007 20:31:56 +0000 (20:31 +0000)]
no need to verify this, no errors/warnings are expected.

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

16 years agoFix a crash on a top-level objc string, patch by Nico Weber
Chris Lattner [Thu, 27 Dec 2007 20:29:42 +0000 (20:29 +0000)]
Fix a crash on a top-level objc string, patch by Nico Weber

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

16 years ago - Use Tok.isObjCAtKeyword instead of Tok.getIdentifierInfo()->getObjCKeywordID().
Chris Lattner [Thu, 27 Dec 2007 19:57:00 +0000 (19:57 +0000)]
 - Use Tok.isObjCAtKeyword instead of Tok.getIdentifierInfo()->getObjCKeywordID().
   The later fails if the token is not an identifier.
 - Replace tabs with spaces.
 - Various other cleanups.

Patch by Nico Weber!

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

16 years agoNo need to do work that the folding builder does for us.
Anders Carlsson [Wed, 26 Dec 2007 18:20:19 +0000 (18:20 +0000)]
No need to do work that the folding builder does for us.

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

16 years agoRemove broken assert from CodeGen. Better check is done in Sema.
Seo Sanghyeon [Wed, 26 Dec 2007 05:21:37 +0000 (05:21 +0000)]
Remove broken assert from CodeGen. Better check is done in Sema.

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

16 years agoMake output files binary mode for -emit-llvm-bc
Christopher Lamb [Mon, 24 Dec 2007 23:49:33 +0000 (23:49 +0000)]
Make output files binary mode for -emit-llvm-bc

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

16 years agoAlmost the best possible handling of stdin/stdout for llvm-emit-bc!
Christopher Lamb [Mon, 24 Dec 2007 20:59:36 +0000 (20:59 +0000)]
Almost the best possible handling of stdin/stdout for llvm-emit-bc!

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

16 years agoBetter handing of stdin/stdout for -emit-llvm-bc
Christopher Lamb [Mon, 24 Dec 2007 20:56:07 +0000 (20:56 +0000)]
Better handing of stdin/stdout for -emit-llvm-bc

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

16 years agoAllow bitcode output to be redirected to stdout.
Christopher Lamb [Mon, 24 Dec 2007 03:23:55 +0000 (03:23 +0000)]
Allow bitcode output to be redirected to stdout.

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

16 years agoImplement -emit-llvm-bc option
Seo Sanghyeon [Mon, 24 Dec 2007 01:52:34 +0000 (01:52 +0000)]
Implement -emit-llvm-bc option

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

16 years agoString literal in aggregate expression
Seo Sanghyeon [Sun, 23 Dec 2007 03:11:58 +0000 (03:11 +0000)]
String literal in aggregate expression

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

16 years agoremove use of alloca.
Chris Lattner [Sun, 23 Dec 2007 01:40:15 +0000 (01:40 +0000)]
remove use of alloca.

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

16 years agoUnbreak mingw build
Anton Korobeynikov [Sun, 23 Dec 2007 01:19:32 +0000 (01:19 +0000)]
Unbreak mingw build

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

16 years agoAdded (incomplete) implementation of SimulEngine, a worklist-based dataflow
Ted Kremenek [Sat, 22 Dec 2007 01:43:37 +0000 (01:43 +0000)]
Added (incomplete) implementation of SimulEngine, a worklist-based dataflow
solver for path-sensitive, intra-procedural analysis.

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

16 years agoAnother test case, testing a variety of objective-c type comparisons.
Fariborz Jahanian [Sat, 22 Dec 2007 00:17:49 +0000 (00:17 +0000)]
Another test case, testing a variety of objective-c type comparisons.

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

16 years agoAnother test for objective-c's type comparison.
Fariborz Jahanian [Fri, 21 Dec 2007 23:48:59 +0000 (23:48 +0000)]
Another test for objective-c's type comparison.

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

16 years agoConverted Loc back to being of type ProgramEdge. Ultimately I believe we want
Ted Kremenek [Fri, 21 Dec 2007 23:23:12 +0000 (23:23 +0000)]
Converted Loc back to being of type ProgramEdge. Ultimately I believe we want
the ability to refer to the vertex set for all the vertices associated with an
edge. This will allow some nice queries over the graph, and (hopefully) will
reduce the memory footprint of SimulVertex.

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

16 years agoAdded preliminary implementation of SimulGraph, which represents the
Ted Kremenek [Fri, 21 Dec 2007 23:21:58 +0000 (23:21 +0000)]
Added preliminary implementation of SimulGraph, which represents the
intra-procedural supergraph of a path-sensitive dataflow analysis.

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

16 years agoChanged "Location" from "ProgramEdge" to "ProgramEdge&" (slightly more svelt
Ted Kremenek [Fri, 21 Dec 2007 22:57:10 +0000 (22:57 +0000)]
Changed "Location" from "ProgramEdge" to "ProgramEdge&" (slightly more svelt
memory representation).

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

16 years agoSimulVertex now subclasses FoldingSetNode.
Ted Kremenek [Fri, 21 Dec 2007 22:41:58 +0000 (22:41 +0000)]
SimulVertex now subclasses FoldingSetNode.

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

16 years agoAdded Profile method to SimulVertex.
Ted Kremenek [Fri, 21 Dec 2007 22:40:41 +0000 (22:40 +0000)]
Added Profile method to SimulVertex.

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

16 years agoThis patch implements some of the more obscure type-checking involving
Fariborz Jahanian [Fri, 21 Dec 2007 22:22:33 +0000 (22:22 +0000)]
This patch implements some of the more obscure type-checking involving
'id' quallified with protocols and static types which have categories and
inheritance which implement these protocols.

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

16 years agoUpdated Xcode project to be in sync with recent changes in file locations
Ted Kremenek [Fri, 21 Dec 2007 21:48:31 +0000 (21:48 +0000)]
Updated Xcode project to be in sync with recent changes in file locations
introduced in r45292 (http://llvm.org/viewvc/llvm-project?rev=45292&view=rev)

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

16 years agoDirectory restructing of Analysis files.
Ted Kremenek [Fri, 21 Dec 2007 21:42:19 +0000 (21:42 +0000)]
Directory restructing of Analysis files.

Created include/clang/Analysis/Analyses directory.
  - Moved LiveVariables.h and UninitializedValues.h into this dir.

Moved ExprDeclBitVector.h into Analysis/Support.

Updated all clients who use these headers to reflect the new paths.

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

16 years agoRenamed file AnalysisVertex.h to SimulVertex.h
Ted Kremenek [Fri, 21 Dec 2007 21:17:22 +0000 (21:17 +0000)]
Renamed file AnalysisVertex.h to SimulVertex.h

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

16 years agoRenamed class AnalysisVertex to SimulVertex
Ted Kremenek [Fri, 21 Dec 2007 21:16:58 +0000 (21:16 +0000)]
Renamed class AnalysisVertex to SimulVertex

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

16 years agoFixed successor order for CFG basic blocks when handling: x && y. The bug
Ted Kremenek [Fri, 21 Dec 2007 19:49:00 +0000 (19:49 +0000)]
Fixed successor order for CFG basic blocks when handling: x && y.  The bug
is best explained by illustration:

[ B2 ]
     1: x
     T: [B2.1] && ...
   Predecessors (1): B4
   Successors (2): B3 B1

Block "B3" should be the block where we evaluate "y" when "x" evaluates to
true. Previously we had the successor list reversed. Now this behavior matches
with how we handle other conditional branches.

Thanks to Nuno Lopes for reporting this problem.

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

16 years agoConvert opaque type when struct definition is seen.
Devang Patel [Fri, 21 Dec 2007 19:35:28 +0000 (19:35 +0000)]
Convert opaque type when struct definition is seen.

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

16 years agoKeep track of llvm struct size while adding fields.
Devang Patel [Fri, 21 Dec 2007 18:43:53 +0000 (18:43 +0000)]
Keep track of llvm struct size while adding fields.
Update addPaddingFields() interface.

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

16 years agoPatch to compare to objective-c static types where one or the other
Fariborz Jahanian [Fri, 21 Dec 2007 17:34:43 +0000 (17:34 +0000)]
Patch to compare to objective-c static types where one or the other
(but not both) may be a protocol qualified static type.

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

16 years agoTest case for my last patch.
Fariborz Jahanian [Fri, 21 Dec 2007 00:35:35 +0000 (00:35 +0000)]
Test case for my last patch.

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

16 years agoMore objective-c type analysis. This time involving objective types
Fariborz Jahanian [Fri, 21 Dec 2007 00:33:59 +0000 (00:33 +0000)]
More objective-c type analysis. This time involving objective types
of conforming protocols (or not).

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

16 years agoAdded class "StateVariant", a template class which serves to wrap states that
Ted Kremenek [Fri, 21 Dec 2007 00:04:19 +0000 (00:04 +0000)]
Added class "StateVariant", a template class which serves to wrap states that
are generated by transfer functions used by the path-sensitive dataflow solver.

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

16 years agoAdded initial implementation of "AnalysisVertex", a class to represent a
Ted Kremenek [Thu, 20 Dec 2007 23:24:55 +0000 (23:24 +0000)]
Added initial implementation of "AnalysisVertex", a class to represent a
location*state vertex in an intra-procedural, path-sensitive dataflow
supergraph.

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

16 years agoAnother test for objective-c type comparison.
Fariborz Jahanian [Thu, 20 Dec 2007 22:53:29 +0000 (22:53 +0000)]
Another test for objective-c type comparison.

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

16 years agoMore objective-c type checking. This time comparing objective-c known objects.
Fariborz Jahanian [Thu, 20 Dec 2007 22:37:58 +0000 (22:37 +0000)]
More objective-c type checking. This time comparing objective-c known objects.

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

16 years agoConverted uses of scoped_ptr to OwningPtr.
Ted Kremenek [Thu, 20 Dec 2007 19:47:16 +0000 (19:47 +0000)]
Converted uses of scoped_ptr to OwningPtr.

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

16 years agoPatch to do type-checking for objctive-c's object types.
Fariborz Jahanian [Thu, 20 Dec 2007 19:24:10 +0000 (19:24 +0000)]
Patch to do type-checking for objctive-c's object types.
More is yet to come.

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

16 years agoadd accessor.
Chris Lattner [Thu, 20 Dec 2007 19:14:21 +0000 (19:14 +0000)]
add accessor.

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

16 years agoAdd newline
Seo Sanghyeon [Thu, 20 Dec 2007 07:22:20 +0000 (07:22 +0000)]
Add newline

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

16 years agoFix trivial self-infinite-recursion
Chris Lattner [Thu, 20 Dec 2007 01:38:17 +0000 (01:38 +0000)]
Fix trivial self-infinite-recursion

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

16 years agoMore objective-c typechecking stuff. This is work in progress and more patches
Fariborz Jahanian [Thu, 20 Dec 2007 01:06:58 +0000 (01:06 +0000)]
More objective-c typechecking stuff. This is work in progress and more patches
are due to arrive.

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

16 years agoImplement codegen for ordered comparison builtins.
Chris Lattner [Thu, 20 Dec 2007 00:44:32 +0000 (00:44 +0000)]
Implement codegen for ordered comparison builtins.

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

16 years agoCreated initial implementation of "BuildSerializer", and ASTConsumer
Ted Kremenek [Thu, 20 Dec 2007 00:34:58 +0000 (00:34 +0000)]
Created initial implementation of "BuildSerializer", and ASTConsumer
which serializes ASTs to a common output directory.  This ASTConsumer
is invoked using a combination of "-o" and "-serialize" from the driver.

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

16 years agoRenamed "FileEntry::getDev()" to "FileEntry::getDevice()"
Ted Kremenek [Thu, 20 Dec 2007 00:29:44 +0000 (00:29 +0000)]
Renamed "FileEntry::getDev()" to "FileEntry::getDevice()"

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

16 years agoimplement semantic analysis for __builtin_islessequal and friends.
Chris Lattner [Thu, 20 Dec 2007 00:26:33 +0000 (00:26 +0000)]
implement semantic analysis for __builtin_islessequal and friends.

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

16 years agoAdded method getFileEntryForID() to SourceManager.
Ted Kremenek [Thu, 20 Dec 2007 00:15:17 +0000 (00:15 +0000)]
Added method getFileEntryForID() to SourceManager.

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

16 years agosimplify some code.
Chris Lattner [Thu, 20 Dec 2007 00:05:45 +0000 (00:05 +0000)]
simplify some code.

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

16 years agorefactor some code that handles sema of direct function calls.
Chris Lattner [Wed, 19 Dec 2007 23:59:04 +0000 (23:59 +0000)]
refactor some code that handles sema of direct function calls.

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

16 years agoAdd iterator interface to function/method parameters.
Chris Lattner [Wed, 19 Dec 2007 23:58:25 +0000 (23:58 +0000)]
Add iterator interface to function/method parameters.

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

16 years agoSplit serialization ASTConsumers into two consumers: SingleFileSerializer and
Ted Kremenek [Wed, 19 Dec 2007 23:49:37 +0000 (23:49 +0000)]
Split serialization ASTConsumers into two consumers: SingleFileSerializer and
BuildSerializer. The former serializes a single translation unit to a
corresponding .ast file. The second serializes ASTs to a common emission
direction.  The latter is not fully implemented yet.

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

16 years agoAdded methods createMainFileID() and createMainFileIDForMemBuffer() to
Ted Kremenek [Wed, 19 Dec 2007 23:48:45 +0000 (23:48 +0000)]
Added methods createMainFileID() and createMainFileIDForMemBuffer() to
SourceManager to allow SourceManager to directly intern the MainFileID
when it is created.  Removed setMainFileID().

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

16 years agoInterned MainFileID within SourceManager. Since SourceManager is referenced by
Ted Kremenek [Wed, 19 Dec 2007 22:51:13 +0000 (22:51 +0000)]
Interned MainFileID within SourceManager. Since SourceManager is referenced by
both Preprocessor and ASTContext, we no longer need to explicitly pass
MainFileID around in function calls that also pass either Preprocessor or
ASTContext. This resulted in some nice cleanups in the ASTConsumers and the
driver.

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

16 years agoTypo fix.
Ted Kremenek [Wed, 19 Dec 2007 22:32:34 +0000 (22:32 +0000)]
Typo fix.

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

16 years agoAdded storage of the FileID of the the main source file of a translation unit
Ted Kremenek [Wed, 19 Dec 2007 22:29:55 +0000 (22:29 +0000)]
Added storage of the FileID of the the main source file of a translation unit
in SourceManager.

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

16 years agoVarious tweaks to the get/lookup instance/class method API's.
Steve Naroff [Wed, 19 Dec 2007 22:27:04 +0000 (22:27 +0000)]
Various tweaks to the get/lookup instance/class method API's.

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

16 years agoRemoved "SourceFile" from TranslationUnit. This same information will (soon)
Ted Kremenek [Wed, 19 Dec 2007 22:24:34 +0000 (22:24 +0000)]
Removed "SourceFile" from TranslationUnit. This same information will (soon)
be available by querying the SourceManager within the ASTContext referenced by
the TranslationUnit.

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

16 years agoDescribe Nico's script for gcc interception. Patch by Nico Weber.
Chris Lattner [Wed, 19 Dec 2007 22:17:19 +0000 (22:17 +0000)]
Describe Nico's script for gcc interception.  Patch by Nico Weber.

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

16 years agoCleaned up "-o" option to print "-o=<path>" instead of "-o=<string>" when
Ted Kremenek [Wed, 19 Dec 2007 19:50:41 +0000 (19:50 +0000)]
Cleaned up "-o" option to print "-o=<path>" instead of "-o=<string>" when
doing clang --help.

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

16 years agoAdded "-o" option to driver. ASTConsumers will need to be gradually
Ted Kremenek [Wed, 19 Dec 2007 19:47:59 +0000 (19:47 +0000)]
Added "-o" option to driver.  ASTConsumers will need to be gradually
rewired to utilize this option.

Renamed option --serialize-ast --serialize.

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

16 years agoAdd support for #pragma mark, which shouldn't warn about bogus tokens.
Chris Lattner [Wed, 19 Dec 2007 19:38:36 +0000 (19:38 +0000)]
Add support for #pragma mark, which shouldn't warn about bogus tokens.

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

16 years agoRemoved storing inode and device number in TranslationUnit.
Ted Kremenek [Wed, 19 Dec 2007 19:27:38 +0000 (19:27 +0000)]
Removed storing inode and device number in TranslationUnit.

Added "SourceFile" string to TranslationUnit to record corresponding
source file.

Updated serialization of TranslationUnits and logic in the driver to
correctly pass the source file information to the serializer.

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

16 years agofix some crazy indentation
Chris Lattner [Wed, 19 Dec 2007 19:23:28 +0000 (19:23 +0000)]
fix some crazy indentation

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

16 years agoSoften the macro rewrite error to a warning (and change the text).
Steve Naroff [Wed, 19 Dec 2007 19:16:49 +0000 (19:16 +0000)]
Soften the macro rewrite error to a warning (and change the text).

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

16 years agoMinor test twik.
Fariborz Jahanian [Wed, 19 Dec 2007 19:07:24 +0000 (19:07 +0000)]
Minor test twik.

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

16 years agoUpdated locations of TranslationUnit.[cpp,h] in XCode project.
Ted Kremenek [Wed, 19 Dec 2007 18:07:54 +0000 (18:07 +0000)]
Updated locations of TranslationUnit.[cpp,h] in XCode project.
Added AST/ASTConsumer.cpp to XCode project.

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

16 years agoreenable this code, fix the testcase.
Chris Lattner [Wed, 19 Dec 2007 18:01:43 +0000 (18:01 +0000)]
reenable this code, fix the testcase.

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

16 years agodisable my commit from yesterday, fixing a regression test failure.
Chris Lattner [Wed, 19 Dec 2007 17:49:45 +0000 (17:49 +0000)]
disable my commit from yesterday, fixing a regression test failure.

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

16 years agoThis patch concludes implementation of dynamic objective-c type qualified by
Fariborz Jahanian [Wed, 19 Dec 2007 17:45:58 +0000 (17:45 +0000)]
This patch concludes implementation of dynamic objective-c type qualified by
protocol list.

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

16 years agoFix the embarassing typo for real this time (- vs _), sorry about breaking the tests...
Anders Carlsson [Wed, 19 Dec 2007 17:43:24 +0000 (17:43 +0000)]
Fix the embarassing typo for real this time (- vs _), sorry about breaking the tests Steve.

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

16 years agoMoved generation of the name of the serialized AST file into
Ted Kremenek [Wed, 19 Dec 2007 17:25:59 +0000 (17:25 +0000)]
Moved generation of the name of the serialized AST file into
CreateASTSerializer.

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

16 years agoEmit errors when attempting to rewrite ObjC expressions that originate from a macro...
Steve Naroff [Wed, 19 Dec 2007 14:32:56 +0000 (14:32 +0000)]
Emit errors when attempting to rewrite ObjC expressions that originate from a macro expansion.

We plan on fixing this and removing this restriction after the break...

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

16 years agoRevert Anders r45191 commit...it broke several of the tests.
Steve Naroff [Wed, 19 Dec 2007 14:11:27 +0000 (14:11 +0000)]
Revert Anders r45191 commit...it broke several of the tests.

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

16 years agoFix an embarassing typo and add some very limited support for the aligned attribute.
Anders Carlsson [Wed, 19 Dec 2007 07:19:40 +0000 (07:19 +0000)]
Fix an embarassing typo and add some very limited support for the aligned attribute.

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

16 years agosvn:ignore configure.out at the root level
Christopher Lamb [Wed, 19 Dec 2007 06:43:23 +0000 (06:43 +0000)]
svn:ignore configure.out at the root level

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

16 years agoChange svn attributes to ignore build directories.
Christopher Lamb [Wed, 19 Dec 2007 06:41:17 +0000 (06:41 +0000)]
Change svn attributes to ignore build directories.

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

16 years agoNormalize attribute names if possible so we won't have to do two strcmps for every...
Anders Carlsson [Wed, 19 Dec 2007 06:16:30 +0000 (06:16 +0000)]
Normalize attribute names if possible so we won't have to do two strcmps for every attribute.

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

16 years agofix broken assert.
Chris Lattner [Wed, 19 Dec 2007 05:38:06 +0000 (05:38 +0000)]
fix broken assert.

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

16 years agoImplement C99 6.7.5.3p1
Chris Lattner [Wed, 19 Dec 2007 05:31:29 +0000 (05:31 +0000)]
Implement C99 6.7.5.3p1

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

16 years agoRefactored inode and device number into FileEntry, and changed the
Ted Kremenek [Tue, 18 Dec 2007 22:29:39 +0000 (22:29 +0000)]
Refactored inode and device number into FileEntry, and changed the
ADT storing FileEntry's in FileManager from a map to a set.

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

16 years agoWhen serializing SourceManager, we now serialize out absolute paths
Ted Kremenek [Tue, 18 Dec 2007 22:12:19 +0000 (22:12 +0000)]
When serializing SourceManager, we now serialize out absolute paths
to serialized source files.

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

16 years agoMoved ReadBitcodeFile and EmitBitcodeFile out of TranslationUnit and made them
Ted Kremenek [Tue, 18 Dec 2007 21:44:50 +0000 (21:44 +0000)]
Moved ReadBitcodeFile and EmitBitcodeFile out of TranslationUnit and made them
the standalone functions ReadASTBitcodeFile and EmitASTBitcodeFile
respectively.

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

16 years agoFix serious regression with ObjcInterfaceDecl. Now that we are storing -1 to mean...
Steve Naroff [Tue, 18 Dec 2007 21:41:31 +0000 (21:41 +0000)]
Fix serious regression with ObjcInterfaceDecl. Now that we are storing -1 to mean undefined, we need to change the respective getters from unsigned->int.

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

16 years agoFixed broken includes introduced by recent (incomplete) patch to
Ted Kremenek [Tue, 18 Dec 2007 21:36:21 +0000 (21:36 +0000)]
Fixed broken includes introduced by recent (incomplete) patch to
TranslationUnit.

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

16 years agoMoved TranslationUnit.h to include path.
Ted Kremenek [Tue, 18 Dec 2007 21:34:50 +0000 (21:34 +0000)]
Moved TranslationUnit.h to include path.

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

16 years agoMoved TranslationUnit from Driver to AST library.
Ted Kremenek [Tue, 18 Dec 2007 21:34:28 +0000 (21:34 +0000)]
Moved TranslationUnit from Driver to AST library.

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

16 years agoRefactoring work. ObjcQualifiedIdType is now derived from 'Type'.
Fariborz Jahanian [Tue, 18 Dec 2007 21:33:44 +0000 (21:33 +0000)]
Refactoring work. ObjcQualifiedIdType is now derived from 'Type'.

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

16 years agoAdded to FileEntry a pointer to the <dev_t,ino_t> pair for the file, and
Ted Kremenek [Tue, 18 Dec 2007 20:45:25 +0000 (20:45 +0000)]
Added to FileEntry a pointer to the <dev_t,ino_t> pair for the file, and
accessors to FileEntry to query these values.

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

16 years agolocal static vars are globals also. This fixes a testcase
Chris Lattner [Tue, 18 Dec 2007 08:16:44 +0000 (08:16 +0000)]
local static vars are globals also.  This fixes a testcase
reported by Seo.

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

16 years agoremove the loc argument to Type::isConstantSizeType, which isn't useful.
Chris Lattner [Tue, 18 Dec 2007 07:18:16 +0000 (07:18 +0000)]
remove the loc argument to Type::isConstantSizeType, which isn't useful.

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

16 years agoFix the location we emit the "not a constant" error for this:
Chris Lattner [Tue, 18 Dec 2007 07:15:40 +0000 (07:15 +0000)]
Fix the location we emit the "not a constant" error for this:

int foo() {
  typedef int x[foo()];
  static int y = sizeof(x);
}

previously we'd emit it on the typedef, which made not sense at all.

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

16 years agoFix PR1863: an assertion due to not setting a location on return from
Chris Lattner [Tue, 18 Dec 2007 07:03:30 +0000 (07:03 +0000)]
Fix PR1863: an assertion due to not setting a location on return from
this method.

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

16 years agoFix const propagation bug.
Chris Lattner [Tue, 18 Dec 2007 07:02:56 +0000 (07:02 +0000)]
Fix const propagation bug.

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

16 years agoFix an nice and subtle parser bug reported by Nico Weber.
Chris Lattner [Tue, 18 Dec 2007 06:06:23 +0000 (06:06 +0000)]
Fix an nice and subtle parser bug reported by Nico Weber.

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

16 years agoAdd DefaultFunctionArrayConversion() to the indirection operator in Sema::ActOnUnaryOp().
Steve Naroff [Tue, 18 Dec 2007 04:06:57 +0000 (04:06 +0000)]
Add DefaultFunctionArrayConversion() to the indirection operator in Sema::ActOnUnaryOp().

This fixes a bug Chris forwarded from Oliver Hunt...

typedef struct { char name[100]; } entry;
char f1(entry *e) { return *e->name; }

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