Commit Graph

58160 Commits

Author SHA1 Message Date
Daniel Dunbar 66b13dac0a Don't put msgrefs in used globals (in particular, we don't want
no-dead-strip set on them).

llvm-svn: 69388
2009-04-17 21:10:58 +00:00
Devang Patel 75009454e3 Appropriately set file name and directory name in debug info compile units.
llvm-svn: 69387
2009-04-17 21:06:59 +00:00
Chris Lattner 6395285306 implement a new clang-cc option -dump-build-information=filename which causes the
compiler to dump random stuff from the build into the file.  Right now this
amounts to dumping command line arguments and diagnostics to the file.

The idea is that you can set an envvar, do a world build of an OS, then grep 
through all the logs for interesting things or something.

Daniel, please wire the driver up to do something with this.

llvm-svn: 69386
2009-04-17 21:05:01 +00:00
Douglas Gregor f994f062fd PCH support for inline assembly statements.
This completes support for all of C (+ extensions). We can (again)
build a PCH file for Carbon.h.

llvm-svn: 69385
2009-04-17 20:57:14 +00:00
Bob Wilson b0b10f8bf6 Move the AddLiveIn function definition closer to its uses.
llvm-svn: 69382
2009-04-17 20:42:34 +00:00
Bob Wilson deeaf70dad Rearrange code to reduce indentation.
llvm-svn: 69381
2009-04-17 20:40:45 +00:00
Bob Wilson 9c1ec76084 Rename file to have the correct suffix.
llvm-svn: 69380
2009-04-17 20:40:20 +00:00
Chris Lattner 25ef69a36e refactor htmldiags to be created up front like the other diag clients.
llvm-svn: 69379
2009-04-17 20:40:01 +00:00
Bob Wilson ea09d4aca8 Clean up formatting, remove trailing whitespace, fix comment typos and
punctuation.  No functional changes.

llvm-svn: 69378
2009-04-17 20:35:10 +00:00
Chris Lattner c6b5613460 add a virtual method to DiagnosticClient to get rid of some fragile
casting in clang-cc.

llvm-svn: 69377
2009-04-17 20:16:08 +00:00
Douglas Gregor 5ceb1a2dd9 PCH tests for va_arg expressions. Verified that the blocks test does create a BlockDeclRefExpr
llvm-svn: 69376
2009-04-17 20:06:59 +00:00
Dan Gohman b47514dfe8 Delete an unused field.
llvm-svn: 69375
2009-04-17 20:03:31 +00:00
Chris Lattner fbbf539c45 fix a crash on invalid by making ActOnDeclarator create decl with
a dummy *function* type when it is recovering and knows it needs 
a function.  rdar://6802350 - clang crash on invalid input

llvm-svn: 69374
2009-04-17 19:32:54 +00:00
Douglas Gregor c95701da6c PCH support for blocks
llvm-svn: 69373
2009-04-17 19:21:43 +00:00
Chris Lattner b63e1db6bc wire up comment diagnostics to -Wcomment, add it to -Wall. Now
you can silence these with -Wno-all or -Wno-comment, but they
still default to on.

llvm-svn: 69372
2009-04-17 19:09:26 +00:00
Bob Wilson a4c2290e5f Use CallConvLower.h and TableGen descriptions of the calling conventions
for ARM.  Patch by Sandeep Patel.

llvm-svn: 69371
2009-04-17 19:07:39 +00:00
Douglas Gregor af97671954 PCH support for GNU statement expressions
llvm-svn: 69370
2009-04-17 19:05:30 +00:00
Douglas Gregor 779d865b48 PCH support for indirect gotos and address-of-label expressions.
llvm-svn: 69369
2009-04-17 18:58:21 +00:00
Chris Lattner 70a42144ca adjust for the new -Wvector-conversions option
llvm-svn: 69366
2009-04-17 18:39:25 +00:00
Chris Lattner cce935edfe move a vector conversion warning to be diabled by default (like gcc),
but add it to -Wall (unlike gcc) and give it a controlling group 
(-Wvector-conversions).

llvm-svn: 69365
2009-04-17 18:28:37 +00:00
Douglas Gregor 6cc68a47b5 PCH support for labels and goto.
llvm-svn: 69364
2009-04-17 18:18:49 +00:00
Steve Naroff 059c6f6293 Update Xcode project with some PCH related headers.
llvm-svn: 69363
2009-04-17 18:02:59 +00:00
Chris Lattner ff8a9e6ee4 fix misspelt attribute.
llvm-svn: 69362
2009-04-17 17:55:23 +00:00
Chris Lattner 10dae30049 Fix rdar://6800926 - crash compiling non-fragile _Bool bitfield ivar,
the functional change here is changing ConvertType -> ConvertTypeForMem
so that we handle i1 fields properly as memory.

llvm-svn: 69361
2009-04-17 17:46:19 +00:00
Chris Lattner c4688d21f7 tidy some code.
llvm-svn: 69360
2009-04-17 17:44:48 +00:00
Chris Lattner ead1e0002f clean up run lines.
llvm-svn: 69359
2009-04-17 17:43:56 +00:00
Jim Grosbach 7da1b90597 Update information on canadian cross builds
llvm-svn: 69358
2009-04-17 17:25:16 +00:00
Chris Lattner e49652b1c8 add basic support for building DiagnosticGroups.inc with cmake
llvm-svn: 69357
2009-04-17 17:04:48 +00:00
Douglas Gregor 915b6c663d PCH support for declaration statements, and a test for PredefinedExpr
llvm-svn: 69356
2009-04-17 16:55:36 +00:00
Douglas Gregor f961e5921f PCH support for return statements.
Optimize PCH encoding for switch-case statements slightly, by making
the switch-case numbering local to a particular statement.

llvm-svn: 69355
2009-04-17 16:34:57 +00:00
Sebastian Redl 5775af1afd Implement lvalue test for conditional expressions.
Add a few commented lines to the test case that point out things that don't work yet.

llvm-svn: 69354
2009-04-17 16:30:52 +00:00
David Greene 22fa407ed7 Use a safer iterator interface and get rid of std C++ library misuse.
This fixes a --enable-expensive-checks problem.

llvm-svn: 69353
2009-04-17 14:56:18 +00:00
David Greene c0a34a0730 Regenerate configure.
llvm-svn: 69352
2009-04-17 14:50:39 +00:00
David Greene 80f48bd13f Add a --enable-profiling option to configure to build Debug+Profile and
Opt+Profile tools.  Now we can profile any kind of flavor we build.

llvm-svn: 69351
2009-04-17 14:49:22 +00:00
Rafael Espindola 355fe12c82 For general dynamic TLS access we must use
leaq	foo@TLSGD(%rip), %rdi

as part of the instruction sequence. Using a register other than %rdi and then
copying it to %rdi is not valid.

llvm-svn: 69350
2009-04-17 14:35:58 +00:00
Bill Wendling 30527b1114 Revert r69335 and r69336. They were causing build failures.
llvm-svn: 69347
2009-04-17 04:19:22 +00:00
Fariborz Jahanian 493d4e080d Added -print-ivar-layout option. No change in functionality
yet.

llvm-svn: 69346
2009-04-17 03:04:15 +00:00
Anders Carlsson 6dc3575220 Add support for the __has_trivial_destructor type trait.
llvm-svn: 69345
2009-04-17 02:34:54 +00:00
Dan Gohman d2d6fd806c Don't create ConstantInts with pointer type. This fixes a
regression in 403.gcc in PIC_CODEGEN=1 and DISABLE_LTO=1
mode.

llvm-svn: 69344
2009-04-17 02:02:52 +00:00
Anders Carlsson eaa28f7e18 Add support for generating (very basic) C++ destructors. These aren't called by anything yet.
llvm-svn: 69343
2009-04-17 01:58:57 +00:00
Daniel Dunbar 3f4a2c286e Support QA_OVERRIDE_GCC3_OPTIONS
- Cover your eyes...

 - This is a simple but effective way to allow developers to build a
   project with clang while manipulating the command line, without
   having to edit the project itself.

llvm-svn: 69342
2009-04-17 01:54:00 +00:00
Evan Cheng b96a1082a9 Teach spiller to unfold instructions which modref spill slot when a scratch
register is available and when it's profitable.

e.g.
     xorq  %r12<kill>, %r13
     addq  %rax, -184(%rbp)
     addq  %r13, -184(%rbp)
==>
     xorq  %r12<kill>, %r13
     movq  -184(%rbp), %r12
     addq  %rax, %r12
     addq  %r13, %r12
     movq  %r12, -184(%rbp)

Two more instructions, but fewer memory accesses. It can also open up
opportunities for more optimizations.

llvm-svn: 69341
2009-04-17 01:29:40 +00:00
Daniel Dunbar c3e7cff6d3 Attributes on block functions were not being set.
- <rdar://problem/6800351> clang not producing correct large struct
   return code for Blocks

llvm-svn: 69337
2009-04-17 00:48:04 +00:00
Dan Gohman 09dbb0b5e0 MOV8rr_NOREX is a "Move" instruction. This doesn't currently
matter, because this instruction isn't generated until after
things that care.

llvm-svn: 69336
2009-04-17 00:45:17 +00:00
Dan Gohman 74835ce1cb Don't use MOV8rr_NOREX on x86-32. It doesn't actually hurt anything at
present, but it's inconsistent.

llvm-svn: 69335
2009-04-17 00:43:09 +00:00
Douglas Gregor 71517c47e6 PCH support for do-while and for loops
llvm-svn: 69334
2009-04-17 00:29:51 +00:00
Chris Lattner a8919d0a35 Fix some failures in targets on available_externally functions,
this fixes a crash on CodeGen/Generic/externally_available.ll
on ppc hosts.  Thanks to Nicholas L for pointing this out.

llvm-svn: 69333
2009-04-17 00:26:12 +00:00
Douglas Gregor e24cbc0f4b PCH support for while and continue statements
llvm-svn: 69332
2009-04-17 00:16:09 +00:00
Mike Stump 5c3285b6fb Fixup semantic analysis for nested blocks, and allow block literal
expressions that can be of static duration to be returned.
Radar 6786551

llvm-svn: 69331
2009-04-17 00:09:41 +00:00
Anders Carlsson b7f8f594f3 Implement basic code generation of constructor calls. We can now compile:
struct S {
S(int, int);
};

void f() {
S s(10, 10);
}

llvm-svn: 69330
2009-04-17 00:06:03 +00:00