Commit Graph

74327 Commits

Author SHA1 Message Date
Anders Carlsson 3f4336cb1f Rename GetAddrOfRTTI to GetAddrOfRTTIDescriptor. Remove the overload that takes a CXXRecordDecl since we were just creating a QualType from it anyway.
llvm-svn: 91590
2009-12-17 07:09:17 +00:00
Chandler Carruth 187220e3f5 Update CMake build to include HexDisassembler.cpp.
llvm-svn: 91589
2009-12-17 06:35:17 +00:00
Mike Stump cd8faeb0b1 Ensure we run cleanups for CXXTemporaries on the exceptional edge. WIP.
llvm-svn: 91588
2009-12-17 06:08:47 +00:00
Eli Friedman e67cae33e1 Aggressively flip compare constant expressions where appropriate; constant
folding in particular expects null to be on the RHS.

llvm-svn: 91587
2009-12-17 06:07:04 +00:00
Chris Lattner 3dfff974ec reimplement r90860, fixing a couple of problems:
1. Don't make a copy of LangOptions every time a lexer is created.
2. Don't make CharInfo global mutable state.
3. Fix the implementation to properly treat ^Z as EOF instead of as
   horizontal whitespace, which matches the semantic implemented by VC++.

llvm-svn: 91586
2009-12-17 05:29:40 +00:00
Anders Carlsson 1fd734276d Simplify RTTIBuilder::finish.
llvm-svn: 91585
2009-12-17 05:10:59 +00:00
Bob Wilson 1c00b6964f Fix a comment grammaro.
llvm-svn: 91584
2009-12-17 05:07:36 +00:00
Anders Carlsson e5a94105eb Move the Info vector into the RTTIBuilder struct. No functionality change.
llvm-svn: 91583
2009-12-17 05:06:03 +00:00
Bob Wilson ff43ab88ff BIT_CONVERT nodes are used for vector types, too.
llvm-svn: 91582
2009-12-17 05:05:36 +00:00
Anders Carlsson 539e584c3c Attempt to fix rtti-layout.cpp on Linux.
llvm-svn: 91581
2009-12-17 04:57:25 +00:00
Anders Carlsson dc9b9cf7b1 Add a (currently failing) RTTI layout test.
llvm-svn: 91580
2009-12-17 04:41:05 +00:00
Sean Callanan 7e64550747 Test harness for the LLVM disassembler. When invoked
with -disassemble, llvm-mc now accepts lines of the
form
0x00 0x00
and passes the resulting bytes to the disassembler for
the chosen (or default) target, printing the result.

llvm-svn: 91579
2009-12-17 01:49:59 +00:00
Ted Kremenek 85bcc986d6 Add failing test case for C++ static analysis.
llvm-svn: 91578
2009-12-17 01:44:13 +00:00
Ted Kremenek 2e2b258158 Fix check in GRExprEngine for the 'main' function to handle NULL IdentifierInfo*'s.
llvm-svn: 91577
2009-12-17 01:20:43 +00:00
Fariborz Jahanian 057a17e4c5 Diagnose duplicate declaration of a property. Fixes
PR5809

llvm-svn: 91575
2009-12-17 00:49:09 +00:00
Evan Cheng aadf060b92 Revert this dag combine change:
Fold (zext (and x, cst)) -> (and (zext x), cst)

DAG combiner likes to optimize expression in the other way so this would end up cause an infinite looping.

llvm-svn: 91574
2009-12-17 00:40:05 +00:00
Eli Friedman 7f4933f6c7 Fix for PR5801: codegen memcpy, memmove, memset directly to LLVM intrinsics.
llvm-svn: 91573
2009-12-17 00:14:28 +00:00
Ted Kremenek d970acb60f Completely remove ObjCObjectRegion (tests pass this time).
llvm-svn: 91572
2009-12-16 23:53:37 +00:00
Johnny Chen 7f30b64dce Renamed "tCMNZ" to "tCMNz" to be consistent with other similar namings.
llvm-svn: 91571
2009-12-16 23:36:52 +00:00
Fariborz Jahanian 01cbe441b3 Allow pointer convesion of an objective-c pointer to
'void *' to mimic gcc's behavior. (fixes radar 7477351).

llvm-svn: 91570
2009-12-16 23:13:33 +00:00
Eli Friedman 8d0da8042b Fix test.
llvm-svn: 91566
2009-12-16 20:47:15 +00:00
John McCall 30f2ac714b Silence a clang warning about the deprecated (but perfectly reasonable in
context) increment-of-bool idiom.

llvm-svn: 91564
2009-12-16 20:31:50 +00:00
Eli Friedman 6a8dc922b3 Make sure C-specific enum warning doesn't trigger in C++.
llvm-svn: 91563
2009-12-16 20:30:08 +00:00
Daniel Dunbar 15cef0ed42 Fix -fdollars-in-identifiers Clang translation.
llvm-svn: 91562
2009-12-16 20:10:18 +00:00
Daniel Dunbar b827e52638 Reapply r91392, it was only unmasking the bug, and since TOT is still broken having it reverted does no good.
llvm-svn: 91560
2009-12-16 20:10:05 +00:00
Daniel Dunbar ab42d42390 Reapply r91459, it was only unmasking the bug, and since TOT is still broken having it reverted does no good.
llvm-svn: 91559
2009-12-16 20:09:53 +00:00
Eli Friedman 5dd02a0f65 Correctly calcluate abstract-ness in the case where an implicitly declared
method overrides a pure virtual method.

llvm-svn: 91558
2009-12-16 20:00:27 +00:00
Ted Kremenek 3ab9e4cf87 Temporarily revert 91553.
llvm-svn: 91557
2009-12-16 19:46:44 +00:00
Jim Grosbach 69461f50c1 Mark STREX* as earlyclobber for the success result register.
llvm-svn: 91555
2009-12-16 19:44:06 +00:00
Jim Grosbach 2a282f2f86 Add @earlyclobber TableGen constraint
llvm-svn: 91554
2009-12-16 19:43:02 +00:00
Ted Kremenek 023bceaf1b Remove use of ObjCObjectRegion from BasicStoreManager.
llvm-svn: 91553
2009-12-16 19:42:23 +00:00
Bill Wendling 8478ed5d18 Remove superfluous 'extern' variable that was causing a warning with clang.
llvm-svn: 91552
2009-12-16 19:36:42 +00:00
Douglas Gregor 8cdc2e0590 Fix test case to unbreak testing
llvm-svn: 91551
2009-12-16 19:18:40 +00:00
Jakob Stoklund Olesen ec20a88a57 Reuse lowered phi nodes.
Tail duplication produces lots of identical phi nodes in different basic
blocks. Teach PHIElimination to reuse the join registers when lowering a phi
node that is identical to an already lowered node. This saves virtual
registers, and more importantly it avoids creating copies the the coalescer
doesn't know how to eliminate.

Teach LiveIntervalAnalysis about the phi joins with multiple uses.

This patch significantly reduces code size produced by -pre-regalloc-taildup.

llvm-svn: 91549
2009-12-16 18:55:53 +00:00
Douglas Gregor 4f4b186215 When value-initializing a class with no user-defined constructors but
with a non-trivial default constructor, zero-initialize the storage
and then call the default constructor. Fixes PR5800.

llvm-svn: 91548
2009-12-16 18:50:27 +00:00
Ted Kremenek 22a8a4bfb9 Compute the right extension for preprocessed Objective-C++ files.
llvm-svn: 91547
2009-12-16 18:32:41 +00:00
Fariborz Jahanian 00857fc376 Diagnose property of reference type as unsupported
instead of crashing for now. 

llvm-svn: 91546
2009-12-16 18:03:30 +00:00
Anders Carlsson d681a29ac0 Baby steps towards fixing PR5589. If a class needs a vtable pointer, add one.
llvm-svn: 91545
2009-12-16 17:27:20 +00:00
Nuno Lopes 8716b478e4 add some svn:ignore
llvm-svn: 91544
2009-12-16 17:07:58 +00:00
Nuno Lopes 13c88c7269 implement PR5654: add -fassume-sane-operator-new, which is enabled by default, and adds the malloc attribute to the global function new() and to the overloaded new operators.
feel free to chage the name to this lengthy argument

llvm-svn: 91543
2009-12-16 16:59:22 +00:00
Douglas Gregor 59ae3c8542 In Sema::CheckInitializerTypes, replace a use of CheckReferenceInit with an InitializationSequence
llvm-svn: 91542
2009-12-16 16:54:16 +00:00
Douglas Gregor 4044489d69 Update C++ status page to reflect reality
llvm-svn: 91541
2009-12-16 16:23:48 +00:00
Nuno Lopes 2af2af219f fix PR5689: add support for 'o' and 'V' asm input operands
llvm-svn: 91540
2009-12-16 14:28:21 +00:00
Nuno Lopes fdb8137a3e fix build
llvm-svn: 91539
2009-12-16 14:20:08 +00:00
John McCall 5750077300 Shift things around so that it's easier to recover from a missing
function in a C++ call using an arbitrary call-expression type.
Actually exploit this to fix the recovery implemented earlier.

The diagnostic is still iffy, though.

llvm-svn: 91538
2009-12-16 12:17:52 +00:00
Daniel Dunbar 282c9b9cc1 Fix pretty stack traces.
llvm-svn: 91537
2009-12-16 11:47:38 +00:00
Daniel Dunbar 1482b5aa16 Fix one more missing this-> to placate that picky clang++.
llvm-svn: 91536
2009-12-16 11:38:03 +00:00
Zhongxing Xu 6df9f54d6d Add a new kind of region: CXXObjectRegion. Currently it has only one
attribute: the object type. 
Add initial support for visiting CXXThisExpr.
Fix a bunch of 80-col violations.

llvm-svn: 91535
2009-12-16 11:27:52 +00:00
Daniel Dunbar 133efc317e Revert "Reapply 91184 with fixes and an addition to the testcase to cover the
problem", this broke llvm-gcc bootstrap for release builds on
x86_64-apple-darwin10.

This reverts commit db22309800b224a9f5f51baf76071d7a93ce59c9.

llvm-svn: 91534
2009-12-16 10:56:17 +00:00
Daniel Dunbar df45b70c1e Revert "Initial work on disabling the scheduler. This is a work in progress, and
this", this broke llvm-gcc bootstrap for release builds on
x86_64-apple-darwin10.

llvm-svn: 91533
2009-12-16 10:56:02 +00:00