Seo Sanghyeon
3d072bea09
Ignore typedefs in pointer arithmetic codegen.
...
llvm-svn: 44529
2007-12-03 06:23:43 +00:00
Chris Lattner
f0780fae43
convert the rest of the stderr users in codegen to use diagnostics.
...
llvm-svn: 44503
2007-12-02 01:49:16 +00:00
Chris Lattner
b6a7b582ee
Fix a codegen crash on void ?: reported by Oliver
...
llvm-svn: 44454
2007-11-30 17:56:23 +00:00
Chris Lattner
2ab40a6207
Fix sema support for the gnu ?: expression with a
...
missing middle expression, and fix a codegen bug where
we didn't correctly promote the condition to the right
result type. This fixes PR1824.
llvm-svn: 44322
2007-11-26 01:40:58 +00:00
Nate Begeman
4c18c23eb3
Implement codegen of CXX Bool
...
llvm-svn: 44160
2007-11-15 05:40:03 +00:00
Anders Carlsson
e89b84ab29
Fix a typo that prevented pointer-to-int conversions from working.
...
llvm-svn: 43588
2007-10-31 23:18:02 +00:00
Devang Patel
ffe1e218f2
Fix 80 col violations.
...
llvm-svn: 43516
2007-10-30 20:59:40 +00:00
Devang Patel
fa0cb1ef3a
Remove commented out line.
...
llvm-svn: 43508
2007-10-30 18:31:12 +00:00
Anders Carlsson
d849982e84
Add (partial) support for @encode.
...
llvm-svn: 43439
2007-10-29 05:01:08 +00:00
Devang Patel
b989c9e65c
Fix "strbuf += stufflen;" crash.
...
llvm-svn: 43365
2007-10-25 22:19:13 +00:00
Chris Lattner
35e564ed09
Add a new ChooseExpr::isConditionTrue method to unify
...
some code.
llvm-svn: 43322
2007-10-25 00:29:32 +00:00
Devang Patel
b67e596d86
Handle non-constant initializers.
...
llvm-svn: 43301
2007-10-24 18:05:48 +00:00
Devang Patel
43fc86d0f2
Visit CompoundLiteralExpr and InitListExpr
...
llvm-svn: 43300
2007-10-24 17:18:43 +00:00
Hartmut Kaiser
7078da8e58
Updated VC++ build system.
...
Silenced some VC++ warnings.
Had to rephrase a partial specialization of the IntrospectionTrait struct in SerializationTest.cpp, please review.
Added a compiler specific workaround in IdentifierTable.h. Is that the way to fix this kind of issues?
llvm-svn: 43074
2007-10-17 15:00:17 +00:00
Steve Naroff
32e44c0032
Move type compatibility predicates from Type to ASTContext. In addition, the predicates are now instance methods (they were previously static class methods on Type).
...
This allowed me to fix the following hack from this weekend...
// FIXME: Devise a way to do this without using strcmp.
// Would like to say..."return getAsStructureType() == IdStructType;", but
// we don't have a pointer to ASTContext.
bool Type::isObjcIdType() const {
if (const RecordType *RT = getAsStructureType())
return !strcmp(RT->getDecl()->getName(), "objc_object");
return false;
}
...which is now...
bool isObjcIdType(QualType T) const {
return T->getAsStructureType() == IdStructType;
}
Side notes:
- I had to remove a convenience function from the TypesCompatibleExpr class.
int typesAreCompatible() const {return Type::typesAreCompatible(Type1,Type2);}
Which required a couple clients get a little more verbose...
- Result = TCE->typesAreCompatible();
+ Result = Ctx.typesAreCompatible(TCE->getArgType1(), TCE->getArgType2());
Overall, I think this change also makes sense for a couple reasons...
1) Since ASTContext vends types, it makes sense for the type compatibility API to be there.
2) This allows the type compatibility predeciates to refer to data not strictly present in the AST (which I have found problematic on several occasions).
llvm-svn: 43009
2007-10-15 20:41:53 +00:00
Anders Carlsson
7e13ab88a2
Add code generation and sema checking for __builtin_va_arg.
...
llvm-svn: 43006
2007-10-15 20:28:48 +00:00
Anders Carlsson
d5f857f2e5
Fix an incorrect assertion.
...
llvm-svn: 42951
2007-10-13 05:52:34 +00:00
Anders Carlsson
24ebce6fca
Generate code for va_start and va_end.
...
llvm-svn: 42939
2007-10-12 23:56:29 +00:00
Devang Patel
7ad0c2f1f9
Use LLVMFoldingBuilder
...
llvm-svn: 42807
2007-10-09 19:49:58 +00:00
Chris Lattner
2dd003e807
further apfloat'ize the front-end, allowing codegen to pass
...
APFloat straight through to LLVM now.
llvm-svn: 42236
2007-09-22 18:47:25 +00:00
Chris Lattner
d3d8aca074
update to match llvm mainline api
...
llvm-svn: 41926
2007-09-13 06:19:18 +00:00
Chris Lattner
6fb276d433
adjust to a change in the LLVM APIs, this is still very hackish until
...
the front-end adopts APFloat though. This fixes test/CodeGen/mandel.c
llvm-svn: 41908
2007-09-13 01:26:11 +00:00
Chris Lattner
69de3f4af6
When dumping out errors about unsupported stuff, emit loc info.
...
llvm-svn: 41907
2007-09-13 01:17:29 +00:00
Hartmut Kaiser
ec7531c9f6
Fixed compilation on Windows.
...
Silenced a couple of warnings.
Added *.vcproj file for new clangAnalysis library.
Renamed Basic to clangBasic projects.
llvm-svn: 41767
2007-09-07 14:34:20 +00:00
Ted Kremenek
c81587d240
Updated calls to CreateGEP to new interface in LLVM mainline.
...
llvm-svn: 41704
2007-09-04 17:20:08 +00:00
Chris Lattner
fb2eb6941a
eliminate some VC++ warnings, patch contributed by Hartmut Kaiser
...
llvm-svn: 41692
2007-09-04 02:34:27 +00:00
Chris Lattner
4647a21825
Generalize RValue to handle complex better, generalize EmitCompoundStmt to
...
support any sort of expr, add a new EmitAnyExpr routine.
llvm-svn: 41660
2007-08-31 22:49:20 +00:00
Chris Lattner
04a913b958
implement code generation for scalar stmt expressions.
...
llvm-svn: 41656
2007-08-31 22:09:40 +00:00
Chris Lattner
e56d3e1a23
Implement compound assignment operators whose LHS is scalar but RHS is complex.
...
llvm-svn: 41464
2007-08-26 22:37:40 +00:00
Chris Lattner
b633469e02
compound assignment operators are of type CompoundAssignOperator
...
llvm-svn: 41460
2007-08-26 21:41:21 +00:00
Chris Lattner
2e928885b2
fix a typo noticed by Gordon Henriksen
...
llvm-svn: 41451
2007-08-26 17:25:57 +00:00
Chris Lattner
c3b3707536
llvmgcc is right :)
...
llvm-svn: 41450
2007-08-26 16:54:05 +00:00
Chris Lattner
183c231cf9
compound assignmetns work for scalars.
...
llvm-svn: 41449
2007-08-26 16:52:57 +00:00
Chris Lattner
c141c1b390
implement conversions of complex to bool.
...
llvm-svn: 41448
2007-08-26 16:52:28 +00:00
Chris Lattner
e004438f4a
reimplement ConvertScalarValueToBool in CGExprScalar.cpp
...
llvm-svn: 41446
2007-08-26 16:42:57 +00:00
Chris Lattner
42e6b8150a
refactor some code to expose compex->scalar conversion to CGF
...
llvm-svn: 41445
2007-08-26 16:34:22 +00:00
Chris Lattner
5de3b174c8
there are no conversions from aggregates to scalars.
...
llvm-svn: 41440
2007-08-26 07:26:12 +00:00
Chris Lattner
08c611e4dc
implement conversions from complex to scalar types.
...
llvm-svn: 41439
2007-08-26 07:21:11 +00:00
Chris Lattner
46c7161311
Omit EmitConversion
...
llvm-svn: 41438
2007-08-26 07:16:41 +00:00
Chris Lattner
cf3da8495a
remove uses of EmitConversion
...
llvm-svn: 41435
2007-08-26 07:08:39 +00:00
Chris Lattner
3474c202ab
refactor scalar conversions out into CGExprScalar.cpp
...
llvm-svn: 41433
2007-08-26 06:48:56 +00:00
Chris Lattner
b5e1262437
implement codegen of __imag of a scalar. Our impl doesn't suffer from
...
GCC bug PR33192.
llvm-svn: 41427
2007-08-26 05:29:21 +00:00
Chris Lattner
a01d898ff5
fix codegen of pre/post inc/dec of a pointer.
...
llvm-svn: 41425
2007-08-26 05:10:16 +00:00
Chris Lattner
27f00282e9
The new correct compound assignment operators exposed a bug in codegen.
...
llvm-svn: 41405
2007-08-25 21:56:20 +00:00
Chris Lattner
9f0ad96b3e
implement codegen for real/imag. TODO: imag of non-complex.
...
llvm-svn: 41376
2007-08-24 21:20:17 +00:00
Chris Lattner
3d966d6556
Teach emit-llvm for scalars to properly handle compound assignment
...
operators in all their glory :)
llvm-svn: 41373
2007-08-24 21:00:35 +00:00
Chris Lattner
100198f3f7
print the computation type for compound assignment operators in dumps.
...
llvm-svn: 41361
2007-08-24 16:24:49 +00:00
Chris Lattner
2da04b3322
completely refactor codegen of scalar expressions out into its own CGExprScalar.cpp file.
...
This patch temporarily breaks compound assignment operators, but greatly simplifies many
things.
llvm-svn: 41355
2007-08-24 05:35:26 +00:00