Commit Graph

83282 Commits

Author SHA1 Message Date
Daniel Dunbar 0b9729887c Basic: Update getClangRepositoryPath for my change to integration branch layout.
llvm-svn: 103192
2010-05-06 18:39:38 +00:00
John McCall 4fa0d5f2bd Diagnose deprecated/unavailable functions selected by overload resolution.
Fixes rdar://problem/4232969, or at least the clang parts of it.

llvm-svn: 103191
2010-05-06 18:15:07 +00:00
Douglas Gregor 027f8d2b2d Try to work around a Visual C++ bug with copy-assignment.
llvm-svn: 103190
2010-05-06 18:05:52 +00:00
Dan Gohman cb4e3e51a9 Add a testcase for r103135, explicitly representing unknown
locations in debug line info.

llvm-svn: 103189
2010-05-06 17:49:17 +00:00
Douglas Gregor e60e41add9 Rework our handling of temporary objects within the conditions of
if/switch/while/do/for statements. Previously, we would end up either:

  (1) Forgetting to destroy temporaries created in the condition (!),
  (2) Destroying the temporaries created in the condition *before*
  converting the condition to a boolean value (or, in the case of a
  switch statement, to an integral or enumeral value), or
  (3) In a for statement, destroying the condition's temporaries at
  the end of the increment expression (!).

We now destroy temporaries in conditions at the right times. This
required some tweaking of the Parse/Sema interaction, since the parser
was building full expressions too early in many places.

Fixes PR7067.

llvm-svn: 103187
2010-05-06 17:25:47 +00:00
Evan Cheng f0ac19a6d5 80 col violation.
llvm-svn: 103185
2010-05-06 16:33:12 +00:00
Bob Wilson 0e0f99816a Fix handling of unreachable blocks in the SSAUpdater. The previous code only
handled cases where a block had zero predecessors, but failed to detect other
cases like loops with no entries.  The SSAUpdater is already doing a forward
traversal through the blocks, so it is not hard to identify the blocks that
were never reached on that traversal.  This fixes the crash for ppc on the
stepanov_vector test.

llvm-svn: 103184
2010-05-06 16:24:11 +00:00
Bob Wilson f765e1f34a Add a missing break statement to fix unintentional fall-through
(replacing the previous patch for the same issue).

llvm-svn: 103183
2010-05-06 16:05:26 +00:00
Fariborz Jahanian b8993384f3 Code Gen support for Getter/Setter synthesis of
C++ object properties. (still radar 7468090).

llvm-svn: 103182
2010-05-06 15:45:36 +00:00
Jim Grosbach 5e3cccb1e4 Fix unintentional fallthrough. Patch by Edmund Grimley-Evans <Edmund.Grimley-Evans@arm.com>
llvm-svn: 103181
2010-05-06 15:32:49 +00:00
mike-m b49148807a Reverted part of r103177 (repositioning of clang-builtin include/)
which breaks clang-i686-xp-msvc9 test-clang.

llvm-svn: 103180
2010-05-06 15:23:52 +00:00
Shantonu Sen 94231eec1f Fix "warning: extra ';' inside a struct or union" when building llvm with clang
llvm-svn: 103179
2010-05-06 14:57:47 +00:00
Daniel Dunbar b0ceb764b8 Revert r103137, fix for $ in labels. It looks like we can't actually handle this
at the token level. Consider the following horrible test case:

  a = 1
  .globl $a
  movl ($a), %eax
  movl $a, %eax
  movl $$a, %eax

llvm-svn: 103178
2010-05-06 14:46:38 +00:00
mike-m 94ab2902fe Reposition clang-builtin include/ to immediately precede /usr/include/,
matching gcc compiler. Fixes #include_next <...> shenanigans that lead to
file-not-found failures with <cstddef> on libstdc++ 4.3.[012].

Updated C++ include header search paths for various Debian/Ubuntu and Fedora
linux distros.

llvm-svn: 103177
2010-05-06 14:11:13 +00:00
John McCall 0086190d58 Push TypeSourceInfo::getTypeLoc() into a header file so that it's
inlineable.  That header file has to be TypeLoc.h, which means that
TypeLoc.h needs to depend on Decl.h because TypeSourceInfo doesn't
have its own header.  That could be remedied, though.

llvm-svn: 103176
2010-05-06 09:25:57 +00:00
John McCall 31b0b46779 Kill a never-defined, never-used member function. Thanks, Enea.
llvm-svn: 103175
2010-05-06 09:09:08 +00:00
John McCall cc7e5bff5c Rearchitect -Wconversion and -Wsign-compare. Instead of computing them
"bottom-up" when implicit casts and comparisons are inserted, compute them
"top-down" when the full expression is finished.  Makes it easier to
coordinate warnings and thus implement -Wconversion for signedness
conversions without double-warning with -Wsign-compare.  Also makes it possible
to realize that a signedness conversion is okay because the context is
performing the inverse conversion.  Also simplifies some logic that was
trying to calculate the ultimate comparison/result type and getting it wrong.
Also fixes a problem with the C++ explicit casts which are often "implemented"
in the AST with a series of implicit cast expressions.

llvm-svn: 103174
2010-05-06 08:58:33 +00:00
John McCall 9aa35bed45 Remember the number of positive and negative bits used by the enumerators of
an enum in the enum decl itself.  Use some spare bits from TagDecl for this
purpose.

llvm-svn: 103173
2010-05-06 08:49:23 +00:00
Evan Cheng 31cdcd46d6 Re-apply 103156 and 103157. 103156 didn't break anything. 10315 exposed a coalescer bug that's fixed by 103170.
llvm-svn: 103172
2010-05-06 06:36:08 +00:00
Chris Lattner 44456d294c simplify EmitAggMemberInitializer a bit and make it work in 32-bit mode,
fixing PR7063.

llvm-svn: 103171
2010-05-06 06:35:23 +00:00
Evan Cheng c0255bac1d Fixes a coalescer bug that caused llc to crash on 2009-11-30-LiveVariablesBug.ll
with the fix in 103157.

%reg1039:1<def> = VMOVS %S1<kill>, pred:14, pred:%reg0
is not coalescable since none of the super-registers of S1 are in reg1039's
register class: DPR_VFP2. But it is still a legal copy instruction so it should
not assert.

llvm-svn: 103170
2010-05-06 06:23:31 +00:00
Chris Lattner 3628326b44 add todos for isinf_sign and isnormal, which I don't intend to implement
in the near future.

llvm-svn: 103169
2010-05-06 06:13:53 +00:00
Chris Lattner dbff4bf5f4 implement codegen support for __builtin_isfinite, part of PR6083
llvm-svn: 103168
2010-05-06 06:04:13 +00:00
Chris Lattner 68784efaf6 optimize builtin_isnan/isinf to not do an extraneous extension from
float -> double (which happens because they are modelled as int(...)
functions), and add a testcase for isinf.

llvm-svn: 103167
2010-05-06 05:50:07 +00:00
Chris Lattner 43660c5bc0 implement part of PR6083: codegen support for isinf. Like isnan,
this is generating correct but suboptimal (extra extend to double)
code for the float case.  Will investigate next.

llvm-svn: 103166
2010-05-06 05:35:16 +00:00
Chandler Carruth 2998b5458d Mark a variable as used in the absence of asserts to silence a GCC warning.
llvm-svn: 103165
2010-05-06 05:28:42 +00:00
Alexis Hunt 41e9f77628 Fix some stylistic issues with my last commit.
llvm-svn: 103164
2010-05-06 05:24:38 +00:00
Dan Gohman 77c71811f5 Revert r103157, which broke test/CodeGen/ARM/2009-11-30-LiveVariablesBug.ll.
llvm-svn: 103163
2010-05-06 05:08:57 +00:00
Chandler Carruth a77a72734c Remove a dependency on Frontend headers in the Driver library. Also saves
building and passing arguments to cc1 layer when setting values to their
defaults.

llvm-svn: 103162
2010-05-06 04:55:18 +00:00
Zhongxing Xu 1a56a488ed Turn -analyzer-inline-call on for C functions. This also fixed a bug that
after inlining post-call checking shouldn't be done.

llvm-svn: 103161
2010-05-06 03:38:27 +00:00
Zhongxing Xu 9174b2c2f9 Make -analyzer-inline-call not a separate analysis. Instead it's a boolean
flag now, and can be used with other analyses. Only turned it on for C++ 
methods for now.

llvm-svn: 103160
2010-05-06 02:59:29 +00:00
Eric Christopher 9feb1bb117 Revert r103156 since it was breaking the build bots.
Reverse-merging r103156 into '.':
U    lib/Target/ARM/ARMInstrNEON.td
U    lib/Target/ARM/ARMRegisterInfo.h
U    lib/Target/ARM/ARMBaseRegisterInfo.cpp
U    lib/Target/ARM/ARMBaseInstrInfo.cpp
U    lib/Target/ARM/ARMRegisterInfo.td

llvm-svn: 103159
2010-05-06 02:29:06 +00:00
Dan Gohman d351116be0 Handle the case where open(2) or close(2) is interrupted by a signal when
automatic syscall restarting is disabled.

Also, fix the build on systems which don't define EWOULDBLOCK.

llvm-svn: 103158
2010-05-06 02:06:20 +00:00
Evan Cheng 8fd7b510d6 Fix an obvious bug in isMoveInstr. It needs to return sub-register indices.
llvm-svn: 103157
2010-05-06 01:54:03 +00:00
Evan Cheng 8f99a1c6b4 Adding pseudo 256-bit registers QQ0 . . . QQ7 to represent pairs of Q registers. These will be used to model VLD2 / VST2 instructions in order to get substantially better codegen for them.
llvm-svn: 103156
2010-05-06 01:52:03 +00:00
Evan Cheng 9d768f4445 Cosmetic changes.
llvm-svn: 103155
2010-05-06 01:34:11 +00:00
Evan Cheng 718ff448df storeRegToStackSlot has forgotten about QPR_8 register class.
llvm-svn: 103154
2010-05-06 01:32:54 +00:00
Dan Gohman ef969f3539 Handle EWOULDBLOCK as EAGAIN. And add a comment explaining why
EAGAIN and EWOULDBLOCK are used here.

Also, handle the case where a write call is interrupted after
some data has already been written.

llvm-svn: 103153
2010-05-06 01:27:36 +00:00
Chris Lattner b903a15807 make -filetype=obj default to emitting its output to foo.obj
when on windows instead of foo.o.  Patch by Nathan Jeffords!

llvm-svn: 103150
2010-05-06 00:54:20 +00:00
Dan Gohman 47d04e3e41 Update LabelsBeforeInsn also, when creating unknown-position labels.
llvm-svn: 103145
2010-05-06 00:29:41 +00:00
Douglas Gregor e902956f59 Partial and full specializations of a class template may have a
different tag kind ("struct" vs. "class") than the primary template,
which has an affect on access control.

Should fix the last remaining Boost.Accumulors failure.

llvm-svn: 103144
2010-05-06 00:28:52 +00:00
Ted Kremenek 5b0773e201 Workaround a really serious caching bug in SourceManager::isBeforeInTranslationUnit() where the
method will sometimes return different results for the same input SourceLocations.  I haven't
unraveled this method completely yet, so this truly is a workaround until a better fix comes
along.

llvm-svn: 103143
2010-05-06 00:22:25 +00:00
Chandler Carruth f3983652eb Clean up the {} and else placement. This fixes an ambiguous else as well as
picking a more consistent pattern.

llvm-svn: 103142
2010-05-06 00:20:39 +00:00
Chandler Carruth 27c9fe9f8b Silence a pedantic GCC warning by making the grouping of && and || explicit.
llvm-svn: 103141
2010-05-06 00:15:06 +00:00
Chris Lattner 35096e82c5 Fix PR7054 - Assertion `Symbol->isUndefined() && "Cannot define a symbol twice!"' failed.
Users can write broken code that emits the same label twice with asm renaming,
detect this and emit a fatal backend error instead of aborting.

llvm-svn: 103140
2010-05-06 00:05:37 +00:00
Dan Gohman a7c717d8d4 In bottom-up mode, defer the materialization of local constant values.
llvm-svn: 103139
2010-05-06 00:02:14 +00:00
Dan Gohman ffcb590b0f Add an "IsBottomUp" member function to FastISel, which will be used to
support a new bottom-up mode.

llvm-svn: 103138
2010-05-05 23:58:35 +00:00
Chris Lattner 482fa218d4 fix rdar://7946934 - in some limited cases, the assembler should
allow $ at the start of a symbol name.

llvm-svn: 103137
2010-05-05 23:51:28 +00:00
Jim Grosbach 151cd8f159 Cleanup of ARMv7M support. Move hardware divide and Thumb2 extract/pack
instructions to subtarget features and update tests to reflect.
PR5717.

llvm-svn: 103136
2010-05-05 23:44:43 +00:00
Dan Gohman 50849c63e4 Emit debug info for MachineInstrs with unknown debug locations, instead
of just letting them inherit the debug locations of adjacent instructions.

Debug info should aim to be either accurate or absent.

llvm-svn: 103135
2010-05-05 23:41:32 +00:00