Chris Lattner
65079bd9be
fix codegen support for functions that are nothrow and noreturn.
...
llvm-svn: 47838
2008-03-03 03:45:26 +00:00
Chris Lattner
8496639787
Add a bunch of attributes, patch by Nuno Lopes.
...
llvm-svn: 47837
2008-03-03 03:28:21 +00:00
Chris Lattner
b7256cd1d6
Add codegen support for ObjC message expressions with the GNU runtime.
...
Patch by David Chisnall!
llvm-svn: 47790
2008-03-01 08:50:34 +00:00
Chris Lattner
a087ff9a66
Add codegen support for ObjC message expressions with the GNU runtime.
...
Patch by David Chisnall!
llvm-svn: 47789
2008-03-01 08:45:05 +00:00
Chris Lattner
c18bfbb6a6
make include guards more unique.
...
llvm-svn: 47754
2008-02-29 17:10:38 +00:00
Lauro Ramos Venancio
01a72ff5d3
Implement codegen for the following static var init.
...
void g() {
static char a[10];
static char *b = a;
}
Now we can compile wget!
llvm-svn: 47627
2008-02-26 21:41:45 +00:00
Lauro Ramos Venancio
8af648ac55
Fix a bug in ConvertAsmString function.
...
llvm-svn: 47618
2008-02-26 19:19:58 +00:00
Lauro Ramos Venancio
c9fbd7301a
Convert x86 target specific inline asm constraints to LLVM.
...
llvm-svn: 47609
2008-02-26 18:33:46 +00:00
Eli Friedman
a243311f1d
Clean up constant implicit cast emission; fixes a few edge cases
...
invlolving implicit casts that cause both a decay to pointer type and a
type conversion.
llvm-svn: 47440
2008-02-21 17:57:49 +00:00
Eli Friedman
115e989985
Fix brace-enclosed string initializers for char arrays. From pr2079,
...
ahtough I had the fix in my tree previously.
llvm-svn: 47439
2008-02-21 17:45:41 +00:00
Chris Lattner
3b418d8446
implement codegen support for sizeof(void), fixing PR2080.
...
llvm-svn: 47429
2008-02-21 05:45:29 +00:00
Nate Begeman
7dd8e72de9
Tabs are the enemy
...
llvm-svn: 47410
2008-02-20 22:57:40 +00:00
Chris Lattner
445fcabff7
Alternate address spaces work:
...
rename QualType::getQualifiers to getCVRQualifiers.
Add some fixme's and clean up some code relevant to qualifiers.
Change ASQualType to contain a Type* instead of a QualType.
Any CVR qualifiers should be on the outer qual type.
llvm-svn: 47398
2008-02-20 20:55:12 +00:00
Lauro Ramos Venancio
ca0fd02cdd
Improve non-const initializer implementation.
...
llvm-svn: 47347
2008-02-19 22:04:22 +00:00
Lauro Ramos Venancio
91fdb9ec43
Implement CodeGenModule::getMemSetFn method.
...
llvm-svn: 47346
2008-02-19 22:01:01 +00:00
Lauro Ramos Venancio
e2162c6549
Simplify aggregate initilizer implementation. Use the CodeGenModule::EmitConstantExpr method when
...
possible.
Fix mediabench/mpeg2/mpeg2dec test.
llvm-svn: 47336
2008-02-19 19:27:31 +00:00
Lauro Ramos Venancio
c58fc4052e
A global without initializer must be emitted as weak.
...
Fix Olden/bh test.
llvm-svn: 47292
2008-02-19 00:04:15 +00:00
Lauro Ramos Venancio
dec89733a7
Implement multi-dimension array initalizer.
...
Fix McCat/08-main test.
llvm-svn: 47286
2008-02-18 22:44:02 +00:00
Chris Lattner
df53e20f2d
implement codegen support for aggregates casted to void.
...
llvm-svn: 47226
2008-02-16 23:55:16 +00:00
Lauro Ramos Venancio
bada8d4b5b
Implement extern block var.
...
llvm-svn: 47223
2008-02-16 22:30:38 +00:00
Eli Friedman
bd258284e0
Split out incomplete arrays from VariableArrayType into
...
IncompleteArrayType. This should make code dealing with both incomplete
and variable length arrays much more readable, plus it allows properly
making the distinction between isVariableArrayType() and
isVariablyModifiedType(). The patch is a little big, but it's
strightforward. so I don't think there should be any issues.
llvm-svn: 47165
2008-02-15 18:16:39 +00:00
Eli Friedman
a682d39639
Remove useless parameter from isConstantSizeType.
...
llvm-svn: 47156
2008-02-15 12:20:59 +00:00
Dan Gohman
922096cc5e
Adjust for the API change to APInt::getBitsSet.
...
People more familiar with clang than me, please review this.
llvm-svn: 47033
2008-02-12 21:49:34 +00:00
Chris Lattner
c9b96ae832
strings are arrays too
...
llvm-svn: 46945
2008-02-11 01:35:07 +00:00
Eli Friedman
f54c4e5fea
A couple of minor fixes to aggregate codegen, to stop asserting on some
...
edge cases.
llvm-svn: 46944
2008-02-11 01:09:17 +00:00
Eli Friedman
a5b2023810
Make unsupported constant exprs fail with a warning instead of crashing
...
codegen.
llvm-svn: 46943
2008-02-11 00:23:10 +00:00
Chris Lattner
36fc8790b7
Fix PR1992 by computing the right type for string literals, which
...
is an array type not a pointer type. This requires updating some
diags that change and updating the code generator to handle the
proper form of strings.
llvm-svn: 46941
2008-02-11 00:02:17 +00:00
Anders Carlsson
c0b0e59643
Implement __builtin_va_copy
...
llvm-svn: 46911
2008-02-09 20:26:43 +00:00
Eli Friedman
a62f3e1352
Expose the logic for field address codegen; it is needed for aggregate
...
initializers, and I don't want to duplicate the bitfield-handling code.
(I'll send a patch for aggregate initializers to the mailing
list sometime soon.)
llvm-svn: 46904
2008-02-09 08:50:58 +00:00
Lauro Ramos Venancio
d74057fa87
Fix a bitfield regression. Reported by Anders Carlsson.
...
llvm-svn: 46889
2008-02-08 19:46:46 +00:00
Anders Carlsson
5c6c05956e
Put back the top-level asm code; all tests pass now.
...
llvm-svn: 46868
2008-02-08 00:33:21 +00:00
Anders Carlsson
0fae4f56df
Back out 46855 for now, it causes test failures on Darwin.
...
llvm-svn: 46867
2008-02-08 00:23:11 +00:00
Lauro Ramos Venancio
9eff02d9f8
Simplify bitfield codegen.
...
Fix codegen of struct { short a[3]; int b:15; }.
llvm-svn: 46859
2008-02-07 19:29:53 +00:00
Lauro Ramos Venancio
0f166de892
Fix codegen of
...
struct {
char a[3];
unsigned char b:1;
};
Fix PR1990.
llvm-svn: 46856
2008-02-07 18:18:58 +00:00
Anders Carlsson
bcc3a4bf64
Handle top-level asm declarations.
...
llvm-svn: 46855
2008-02-07 17:19:11 +00:00
Anders Carlsson
d3b06cda3c
Add pointer + int (and vice versa) to the constant emitter.
...
llvm-svn: 46812
2008-02-06 07:23:14 +00:00
Anders Carlsson
093f1a099f
Generate code for the various __builtin_ctz functions.
...
llvm-svn: 46811
2008-02-06 07:19:27 +00:00
Chris Lattner
b818af539f
now that ConvertTagDeclType is nice and simple, use it from UpdateCompletedType.
...
llvm-svn: 46809
2008-02-06 06:06:49 +00:00
Chris Lattner
d11482ea22
simplify and speed up type refinement logic. No functionality change.
...
llvm-svn: 46808
2008-02-06 06:03:51 +00:00
Chris Lattner
a64dde6b48
only convert the type name once, not each type it is refined.
...
llvm-svn: 46807
2008-02-06 05:48:29 +00:00
Chris Lattner
3340b92582
simplify a bunch of code.
...
llvm-svn: 46805
2008-02-06 05:29:46 +00:00
Chris Lattner
56096f3020
rename TypeHolderMap to TypeCache, which more aptly describes what it is.
...
llvm-svn: 46804
2008-02-06 05:21:55 +00:00
Chris Lattner
ee9fafd533
split tagged decl layout into its own method.
...
llvm-svn: 46803
2008-02-06 05:18:32 +00:00
Chris Lattner
f6e3669eb2
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.
llvm-svn: 46802
2008-02-06 05:12:09 +00:00
Chris Lattner
68be60694e
sink more of the type related code into CodeGenTypes.
...
llvm-svn: 46801
2008-02-06 05:08:19 +00:00
Chris Lattner
8b945ee058
codegen static variables in a function into a different namespace from
...
static variables outside functions.
llvm-svn: 46800
2008-02-06 04:54:32 +00:00
Chris Lattner
a5e4d30942
Finish off the refactoring of type handling stuff. Now we recompile every
...
tag decl after it has been completed
llvm-svn: 46798
2008-02-06 04:51:19 +00:00
Chris Lattner
adf1f51fc5
move the codegen ASTConsumer out of the driver into libcodegen,
...
eliminating a bunch of forwarding methods and generally
simplifying things.
llvm-svn: 46792
2008-02-06 02:01:47 +00:00
Anders Carlsson
3ed4aea198
Even more inline asm codegen fixes.
...
llvm-svn: 46784
2008-02-06 00:11:32 +00:00
Nate Begeman
3399bb424c
simple implementation of __builtin_alloca
...
llvm-svn: 46783
2008-02-06 00:02:50 +00:00