]>
granicus.if.org Git - clang/log
Ted Kremenek [Thu, 7 Feb 2008 01:08:27 +0000 (01:08 +0000)]
Added transfer function logic for ReturnStmts.
Fixed insidious bug in handling dereferences.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46835
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 6 Feb 2008 23:03:14 +0000 (23:03 +0000)]
Minor reordering of the serialization of the fields of MemberExpr to result
in a smaller encoding on disk.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46832
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 6 Feb 2008 22:50:25 +0000 (22:50 +0000)]
Major code refactoring/cleanup with transfer function logic. Now the
code structure is more suitable for additional symbolic analysis.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46831
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 6 Feb 2008 22:48:16 +0000 (22:48 +0000)]
Make sure to propagate qualifiers through the member operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46830
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 6 Feb 2008 21:20:34 +0000 (21:20 +0000)]
explicitly document that return statement argument does not necessarily follow the result type of the function. Add testcase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46823
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 6 Feb 2008 19:03:27 +0000 (19:03 +0000)]
Use the subprocess module instead of os.system. Patch by Sam Bishop.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46819
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 6 Feb 2008 17:56:00 +0000 (17:56 +0000)]
Added main transfer function support for unary operator "!".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46815
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 6 Feb 2008 17:32:17 +0000 (17:32 +0000)]
Added assumption logic for symbolic non-lvalues when used in conditions such as
"if(x)". On the true branch we know the value is != 0, and on the false branch
we know it is 0.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46814
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 6 Feb 2008 07:23:14 +0000 (07:23 +0000)]
Add pointer + int (and vice versa) to the constant emitter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46812
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 6 Feb 2008 07:19:27 +0000 (07:19 +0000)]
Generate code for the various __builtin_ctz functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46811
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 6 Feb 2008 06:06:49 +0000 (06:06 +0000)]
now that ConvertTagDeclType is nice and simple, use it from UpdateCompletedType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46809
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 6 Feb 2008 06:03:51 +0000 (06:03 +0000)]
simplify and speed up type refinement logic. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46808
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 6 Feb 2008 05:48:29 +0000 (05:48 +0000)]
only convert the type name once, not each type it is refined.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46807
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 6 Feb 2008 05:33:51 +0000 (05:33 +0000)]
Fix the codegen of structs with flexible array members.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46806
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 6 Feb 2008 05:29:46 +0000 (05:29 +0000)]
simplify a bunch of code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46805
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 6 Feb 2008 05:21:55 +0000 (05:21 +0000)]
rename TypeHolderMap to TypeCache, which more aptly describes what it is.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46804
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 6 Feb 2008 05:18:32 +0000 (05:18 +0000)]
split tagged decl layout into its own method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46803
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 6 Feb 2008 05:12:09 +0000 (05:12 +0000)]
only update the llvm type for a struct when we used the struct
previously in an opaque context. If we didn't do this,
computing its layout could be wasted: just be lazy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46802
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 6 Feb 2008 05:08:19 +0000 (05:08 +0000)]
sink more of the type related code into CodeGenTypes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46801
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 6 Feb 2008 04:54:32 +0000 (04:54 +0000)]
codegen static variables in a function into a different namespace from
static variables outside functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46800
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 6 Feb 2008 04:53:22 +0000 (04:53 +0000)]
Be a bit stricter about array type compatibility.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46799
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 6 Feb 2008 04:51:19 +0000 (04:51 +0000)]
Finish off the refactoring of type handling stuff. Now we recompile every
tag decl after it has been completed
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46798
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 6 Feb 2008 04:41:14 +0000 (04:41 +0000)]
Fixed bug in '=' transfer function: RHS does not have to be a non-LValue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46797
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 6 Feb 2008 04:31:33 +0000 (04:31 +0000)]
Fixed signedness bug in cast transfer function when casting integers to pointers.
Removed lval::SymIntConstraintVal; wrappers for symbolic constraints are not lvalues (only integers that evaluate to !0 or 0).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46796
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 6 Feb 2008 03:56:15 +0000 (03:56 +0000)]
Modified state pretty-printing to include the '!=' and '==' constraints on
symbols (for constant integers).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46795
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 6 Feb 2008 02:50:36 +0000 (02:50 +0000)]
Disabled operator= for ValueStateImpl.
ValueState no longer inherits FoldingSetNode (not needed).
Removed redundant operator= implementation for ValueState (it simply did the default behavior).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46794
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 6 Feb 2008 02:45:20 +0000 (02:45 +0000)]
Fixed bug when allocating a ValueStateImpl object in getPersistentState()
using the bump-pointer allocator and a placed new; we accidentally allocated
a ValueStateImpl* instead, causing an overrun when we did a placed new().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46793
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 6 Feb 2008 02:01:47 +0000 (02:01 +0000)]
move the codegen ASTConsumer out of the driver into libcodegen,
eliminating a bunch of forwarding methods and generally
simplifying things.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46792
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 6 Feb 2008 01:42:25 +0000 (01:42 +0000)]
pull .ll and .bc writing out of the ASTConsumer destructors into some top
level code in clang. This is a cleanup, but does implement "-o" for
-emit-llvm. One effect of this is that "clang foo.c -emit-llvm" will now
emit into foo.ll instead of stdout. Use "clang foo.c -emit-llvm -o -" or
"clang < foo.c -emit-llvm" to get the old behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46791
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 6 Feb 2008 00:54:14 +0000 (00:54 +0000)]
Added some skeleton code for performing "assume" on symbols: e.g. assume($0 != 0).
This action will add constraints to the possible values of a symbol.
Still needs to be debugged.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46789
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 6 Feb 2008 00:51:33 +0000 (00:51 +0000)]
inform astconsumer about tagdecls as they are defined.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46788
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 6 Feb 2008 00:46:58 +0000 (00:46 +0000)]
pass the astconsumer into Sema's ctor, clean up some stuff in
Sema::ActOnTranslationUnitScope. The various ObjC pieces at the top
of Sema.cpp should be moved into SemaObjC or something.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46787
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 6 Feb 2008 00:23:21 +0000 (00:23 +0000)]
rename ASTSTreamer.{h|cpp} -> ParseAST.{h|cpp}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46786
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 6 Feb 2008 00:15:02 +0000 (00:15 +0000)]
kill the ASTStreamer class, inlining it into its only client: clang::ParseAST
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46785
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 6 Feb 2008 00:11:32 +0000 (00:11 +0000)]
Even more inline asm codegen fixes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46784
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 6 Feb 2008 00:02:50 +0000 (00:02 +0000)]
simple implementation of __builtin_alloca
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46783
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 5 Feb 2008 23:59:27 +0000 (23:59 +0000)]
Add a FIXME to clarify previous commit/experiment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46782
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 5 Feb 2008 23:30:20 +0000 (23:30 +0000)]
Handle the memory clobber.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46780
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 5 Feb 2008 23:18:57 +0000 (23:18 +0000)]
Improvements to inline asm code generation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46779
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 23:08:41 +0000 (23:08 +0000)]
Added pretty-printing support for lval::SymIntConstraintVal and
nonlval::SymIntConstraintVal.
Reworked transfer function for '==' and '!=' for LValues to return
SymIntConstraintVal when comparing a symbol with a constant.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46778
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 5 Feb 2008 23:03:50 +0000 (23:03 +0000)]
Handle simple asm statements correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46777
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 5 Feb 2008 22:40:55 +0000 (22:40 +0000)]
simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46774
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 22:21:54 +0000 (22:21 +0000)]
Moved implementation of cast<> for SymbolData closer to SymbolData's definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46772
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 22:10:48 +0000 (22:10 +0000)]
Added new "NonLValue" class: SymIntConstraintVal. This class represents a binary
contraint between a symbol and an integer constant.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46771
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 21:52:21 +0000 (21:52 +0000)]
Moved subclasses of LValue and NonLValue into their own namespaces.
This noticeably cleans up the naming of these classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46770
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 21:32:43 +0000 (21:32 +0000)]
Added "SymIntConstraint", a utility class to represent intermediate values for
transfer function evaluation that represent constraints between symbolic values
and constant integers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46769
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 5 Feb 2008 21:27:35 +0000 (21:27 +0000)]
Fix Parser::ParseObjCTryStmt() to allow for trailing @-keyword statements/expressions.
This bug fix is the result of not having 2-token lookahead to recognize specific @-keywords.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46768
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 5 Feb 2008 20:54:21 +0000 (20:54 +0000)]
Add some binops.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46766
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 5 Feb 2008 20:01:53 +0000 (20:01 +0000)]
More improvements to inline asm CG.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46762
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 19:35:18 +0000 (19:35 +0000)]
Added "batch" processing versions of Nodify and SetValue. Created typedefs
for buffers for RValues and States.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46759
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 18:51:06 +0000 (18:51 +0000)]
Added a "ConstantNotEq" map to ValueState (and added necessary typedefs and factory objects to ValueStateManager).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46758
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 18:24:17 +0000 (18:24 +0000)]
Added some comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46756
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 18:19:15 +0000 (18:19 +0000)]
Renamed typedef "iterator" in ValueState to "vb_iterator" (for "VariableBindings").
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46755
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 18:17:58 +0000 (18:17 +0000)]
Reordered fields/methods in ValueState to make it more aesthetically pleasing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46754
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 5 Feb 2008 17:26:36 +0000 (17:26 +0000)]
Use correct flag value.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46752
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 5 Feb 2008 16:57:38 +0000 (16:57 +0000)]
Append input argument to args vector.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46751
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 5 Feb 2008 16:35:33 +0000 (16:35 +0000)]
Add code generation for inline asm statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46750
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 5 Feb 2008 08:06:13 +0000 (08:06 +0000)]
rewrite some of the type refinement code to eliminate dangling pointers
simplify the code and generally make it more robust.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46745
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 07:17:49 +0000 (07:17 +0000)]
Overhauling of "ValueState" so that it represents its own functional data
structure that can contain several maps, not just one.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46744
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 5 Feb 2008 06:55:31 +0000 (06:55 +0000)]
Change the key of CGRecordLayouts from being an llvm type* to being a decl*. LLVM
Type*'s can change as types are refined, so we can't use them as a stable key in
the map. Decls don't change, so use them instead.
This patch was written by Anders, but he's too shy to commit it himself :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46743
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 5 Feb 2008 06:37:34 +0000 (06:37 +0000)]
Relax an assertion, fixing PR1968
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46742
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 05:15:51 +0000 (05:15 +0000)]
ValueManager now uses the BumpPtrAllocator owned by the ExplodedGraph.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46740
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 5 Feb 2008 03:17:42 +0000 (03:17 +0000)]
Update outdated comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46737
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 5 Feb 2008 02:39:50 +0000 (02:39 +0000)]
Cleanup InitListExpr code generation code.
Handle padding fields while initializing struct (fix PR 1962)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46736
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 5 Feb 2008 02:18:07 +0000 (02:18 +0000)]
Fix memory corruption from the type map being modified while a reference
to a cell is being held.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46735
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 5 Feb 2008 01:40:48 +0000 (01:40 +0000)]
Keep track of padding fields.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46734
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 00:43:43 +0000 (00:43 +0000)]
Simplified transfer functions for '++' and '--'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46732
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Feb 2008 00:26:40 +0000 (00:26 +0000)]
Implemented initial transfer function support for '&&', '||', '?', and
__builtin_choose.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46731
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 4 Feb 2008 21:59:22 +0000 (21:59 +0000)]
Added file that should have been in my previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46722
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 4 Feb 2008 21:59:01 +0000 (21:59 +0000)]
Created ValueStateManager, a full-blown class to manage the states
created for GRConstants. Moved instances of ValueManager and SymbolManager
inside this class. The goal is to gradually separate more of the state
management from the state transformation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46721
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 4 Feb 2008 16:58:30 +0000 (16:58 +0000)]
Implemented transfer function for unary '~'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46708
91177308 -0d34-0410-b5e6-
96231b3b80d8
Christopher Lamb [Mon, 4 Feb 2008 02:35:11 +0000 (02:35 +0000)]
Add ending newline to test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46692
91177308 -0d34-0410-b5e6-
96231b3b80d8
Christopher Lamb [Mon, 4 Feb 2008 02:31:56 +0000 (02:31 +0000)]
Add experimental support for address space qualified types. Address space
qualifiers use the __attribute__((address_space(id))) syntax.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46691
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 3 Feb 2008 21:27:46 +0000 (21:27 +0000)]
- ccc creates output objects in same directory as the source file, and
not in the current directory. This doesn't work with VPATH builds in
autotooled builds.
- ccc now creates object files without an extension.
- Return exit code 1 if code > 255.
Patch by Torok!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46689
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 3 Feb 2008 09:00:04 +0000 (09:00 +0000)]
Fix PR1966 by ignoring non-error diagnostics from system headers even if they are
*mapped* onto errors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46686
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 3 Feb 2008 08:24:13 +0000 (08:24 +0000)]
the macro start and macro end bits in source location are dead, remove them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46685
91177308 -0d34-0410-b5e6-
96231b3b80d8
Seo Sanghyeon [Sun, 3 Feb 2008 03:40:41 +0000 (03:40 +0000)]
Make ccc work with older Python versions. Patch by Sam Bishop.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46675
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 2 Feb 2008 20:20:10 +0000 (20:20 +0000)]
Implement support for __extension__ which silences extwarnings in its
scope. This is part of the fix for PR1966
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46669
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 2 Feb 2008 04:51:41 +0000 (04:51 +0000)]
minor tweak to anders patch: (only) ocu vectors support splatting, but
ocu vectors should not treat bitcasts from int <-> vector as a splat
unless it is of the element type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46664
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 2 Feb 2008 04:49:12 +0000 (04:49 +0000)]
Add RUN line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46663
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 2 Feb 2008 04:45:42 +0000 (04:45 +0000)]
testcase for previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46662
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 2 Feb 2008 04:43:11 +0000 (04:43 +0000)]
fix codegen on static variables which have multiple decl nodes. These
should be merged just like normal globals. This fixes this testcase
that Anders provided:
static struct s a;
static struct s *ap1 = &a;
static struct s a = { 10 };
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46661
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sat, 2 Feb 2008 00:10:46 +0000 (00:10 +0000)]
Cleanup previous patch (based on feedback from Ted).
Since this behavior is useful for most classes, we might consider adding a simple 3 method class that implements the behavior. Ted said that Boost has such a class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46654
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 1 Feb 2008 23:31:13 +0000 (23:31 +0000)]
Make sure SourceManager/HeaderSearch don't support default copy constructors (since they result in bad runtime behavior).
I'm sure there are other classes that might need this "guard", however I was bitten by these 2 recently (so I thought I'd fix them).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46653
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 1 Feb 2008 23:27:51 +0000 (23:27 +0000)]
Add trailing newline.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46652
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 1 Feb 2008 23:17:55 +0000 (23:17 +0000)]
Only OCU vectors can be splatted.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46651
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 1 Feb 2008 22:44:48 +0000 (22:44 +0000)]
Rename diagnostic to reflect it's role...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46650
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 1 Feb 2008 22:08:12 +0000 (22:08 +0000)]
Minor API cleanup...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46649
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 1 Feb 2008 21:51:39 +0000 (21:51 +0000)]
Remove temporary workaround (thanks to Ted for fixing ObjCAtCatchStmt so quickly:-).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46648
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 1 Feb 2008 21:28:59 +0000 (21:28 +0000)]
For ObjCAtCatchStmt, removed field 'NextAtCatchStmt' (which referenced the next @catch)
and put the the next ObjcAtCatchStmt* as part of SubExprs. This fixes a bug with
iterating over the children of ObjcAtCatch, where the next @catch was not
properly being iterated over as a child.
Altered serialization of ObjCAtCatchStmt to reflect this new layout of
its subexpressions, and fixed an ownership issue with the next @catch not
being serialized as an owned pointer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46647
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 1 Feb 2008 20:02:07 +0000 (20:02 +0000)]
Fix two rewriter bugs with @catch.
- Support @catch(...), rather than crash:-)
- Make sure all catch bodies get rewritten. This "fix" is really a workaround until the iterator for the "try" AST is fixed. Will fix this in a separate commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46644
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 1 Feb 2008 17:05:54 +0000 (17:05 +0000)]
Moved "Rewriter" tests from test/Sema to test/Rewriter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46640
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 1 Feb 2008 16:06:34 +0000 (16:06 +0000)]
Generate correct code for __builtin_huge_val
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46639
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 1 Feb 2008 16:01:31 +0000 (16:01 +0000)]
getPrimaryDecl can return null.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46638
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 1 Feb 2008 07:15:58 +0000 (07:15 +0000)]
It is allowed to get the address of an array subscript, even if the array has the register qualifier, if the array is really a pointer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46634
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 1 Feb 2008 06:57:39 +0000 (06:57 +0000)]
make some diagnostics more terse, update testcases.
Fix Sema::ActOnInstanceMessage to correctly do things in terms of canonical
types, fixing bogus errors like:
NSDistantObject.m:10383:120: error: bad receiver type 'typeof((id<NSMutableCopying>)self)'
id mess = ({ id __inv__ = ((void *)0); id __mb__ = _NSMessageBuilder((id <NSMutableCopying>)self, &__inv__); (void)[(__typeof__((id <NSMutableCopying>)self))__mb__ mutableCopyWithZone:((void *)0)]; if (!objc_collecting_enabled()) object_dispose(__mb__); __inv__; });
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46633
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 1 Feb 2008 06:43:02 +0000 (06:43 +0000)]
Sema::ActOnInstanceMessage is generally doing bad things with typedefs, but
here I fix just one. The loop that rips through pointers should use
getAsPointerType() not static_cast<PointerType*> to get the pointee. This
fixes a crash on a large testcase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46632
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 1 Feb 2008 06:37:46 +0000 (06:37 +0000)]
Added back 'CodeGen' to test suite (accidentally removed in my last patch).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46631
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 1 Feb 2008 06:36:40 +0000 (06:36 +0000)]
Implemented casts for ConcreteInt and ConcreteIntLValue.
Implemented '==' and '!=' for ConcreteIntLValue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46630
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 1 Feb 2008 05:34:02 +0000 (05:34 +0000)]
Fix PR1969. stdin has no FileEntry.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46629
91177308 -0d34-0410-b5e6-
96231b3b80d8