Commit Graph

72042 Commits

Author SHA1 Message Date
Daniel Dunbar 1b39a2edff Shuffle VerifyDiagnosticsClient API to be less fragile.
llvm-svn: 88765
2009-11-14 07:53:24 +00:00
Daniel Dunbar 409e890f8d Add CompilerInstance::InitializeSourceManager.
llvm-svn: 88764
2009-11-14 07:53:04 +00:00
Nick Lewycky 7935bcb0fe Remove LLVMContext from reassociate. It was threaded through every function but
ultimately never used.

llvm-svn: 88763
2009-11-14 07:25:54 +00:00
Sanjiv Gupta d03742a122 revert 88761 as it fails builds.
llvm-svn: 88762
2009-11-14 07:22:25 +00:00
Sanjiv Gupta 8f9c22646b Fix debug info crashes for PIC16.
llvm-svn: 88761
2009-11-14 06:19:49 +00:00
Nick Lewycky c53e2ecf02 Teach BasicAA that a constant expression can't alias memory provably not
allocated until runtime (such as an alloca). Patch by Hans Wennborg!

llvm-svn: 88760
2009-11-14 06:15:14 +00:00
Eli Friedman a9ea959d04 PR5462: Don't run off the edge of the argument array for vararg handling
when there are more parameters in the prototype than arguments to the call.

llvm-svn: 88759
2009-11-14 04:43:10 +00:00
Daniel Dunbar 6c39d457fa Update FixIt tests to make it more obvious they use a separate mode.
llvm-svn: 88758
2009-11-14 04:39:42 +00:00
Daniel Dunbar 10563ea92e Turn -fixit it back into a mode, but make -fixit-at imply that mode this time
(instead of running it with arbitrary consumers).
 - Also, turn any -fixit-at lookup failure into an error.

llvm-svn: 88757
2009-11-14 04:39:29 +00:00
Eli Friedman b774685c08 Fix a couple of tests.
llvm-svn: 88756
2009-11-14 04:23:25 +00:00
Eli Friedman b572c92674 PR5483: Generate missing form of destructor when it is virtual. (Someone
more familiar with this stuff should double-check that there isn't some more
general rule; this is purely from inspecting g++ output.)

llvm-svn: 88755
2009-11-14 04:19:37 +00:00
Evan Cheng 16797a1f55 Added getSubRegIndex(A,B) that returns subreg index of A to B. Use it to replace broken code in VirtRegRewriter.
llvm-svn: 88753
2009-11-14 03:42:17 +00:00
Eli Friedman c9827d1ad3 Fix for PR5489: don't skip the complete type requrirement for variable
definitions just because the type happens to be an array type.

llvm-svn: 88752
2009-11-14 03:40:14 +00:00
Douglas Gregor bf3f322034 When type-checking a static cast (or the static_cast part of a C-style
cast) that is converting to a class type, enumerate its constructors
as in any other direct initialization. This ensures that we get the
proper conversion sequence.

llvm-svn: 88751
2009-11-14 03:27:21 +00:00
Daniel Dunbar 50ec0da0e1 Switch -verify implementation to use VerifyDiagnosticClient.
- Not tested, but -verify with multiple inputs should work now.

llvm-svn: 88750
2009-11-14 03:24:39 +00:00
Daniel Dunbar 9d5118a69c Fix broken tests, exposed by improved -verify.
llvm-svn: 88749
2009-11-14 03:24:04 +00:00
Daniel Dunbar 348185548e Add VerifyDiagnosticsClient, to replace old -verify.
- This reimplements -verify as just another DiagnosticClient, which buffers the diagnostics and checks them when the source file is complete. There are some hacks to make this work, but they are all internal, and this exposes a better external interface.

 - This also tweaks a few things:
   o Errors are now just regular diagnostics.
   o Frontend diagnostics are now caught (for example, errors in command line arguments), although there isn't yet a way to specify that they are expected. That would be nice though.

 - Not yet used.

llvm-svn: 88748
2009-11-14 03:23:19 +00:00
Anders Carlsson 654e5c7cf8 Diagnose ambiguity of operator delete and operator delete[]. Sebastian, please review.
llvm-svn: 88747
2009-11-14 03:17:38 +00:00
Evan Cheng 6ad7da96fe - Change TargetInstrInfo::reMaterialize to pass in TargetRegisterInfo.
- If destination is a physical register and it has a subreg index, use the
  sub-register instead.
This fixes PR5423.

llvm-svn: 88745
2009-11-14 02:55:43 +00:00
Daniel Dunbar e598a56d30 Pass Preprocessor through DiagnosticClient::BeginSourceFile.
llvm-svn: 88744
2009-11-14 02:48:04 +00:00
Daniel Dunbar 56d9c293db Add ASTConsumer to CompilerInstance.
llvm-svn: 88743
2009-11-14 02:47:17 +00:00
Dan Gohman 81132465d3 Add an option for running GVN with redundant load processing disabled.
llvm-svn: 88742
2009-11-14 02:27:51 +00:00
Fariborz Jahanian da2efb091d Generate the old API when sending message to super
in a category implementation (objc 32bit api related).

llvm-svn: 88741
2009-11-14 02:18:31 +00:00
Evan Cheng e3b312fec9 Add radar number.
llvm-svn: 88739
2009-11-14 02:11:32 +00:00
Evan Cheng d2c10508cd Fix PR5412: Fix an inverted check and another missing sub-register check.
llvm-svn: 88738
2009-11-14 02:09:09 +00:00
Dan Gohman a627e26d39 Enable the tail call optimization when the caller returns undef.
llvm-svn: 88737
2009-11-14 02:06:30 +00:00
Anders Carlsson 52ce3bbf57 Handle CXXDefaultArgExprs in EmitLValue. Fixes PR5484.
llvm-svn: 88735
2009-11-14 01:51:50 +00:00
Evan Cheng 66401c90da When expanding t2STRDi8 r, r to two stores, add kill markers correctly.
llvm-svn: 88734
2009-11-14 01:50:00 +00:00
Douglas Gregor ffe14e3712 If we attempt to add a constructor template specialization that looks
like a copy constructor to the overload set, just ignore it. This
ensures that we don't try to use such a constructor as a copy
constructor *without* triggering diagnostics at the point of
declaration.

Note that we *do* diagnose such copy constructors when explicitly
written by the user (e.g., as an explicit specialization).

llvm-svn: 88733
2009-11-14 01:20:54 +00:00
Daniel Dunbar bf410c6fc2 Add static version of Preprocessor::getSpelling.
llvm-svn: 88732
2009-11-14 01:20:48 +00:00
Daniel Dunbar e01dc86d2a Move CompilerInstance::set* methods out-of-line.
llvm-svn: 88731
2009-11-14 01:20:40 +00:00
Ted Kremenek 1a0dd2e30b Move definition of GRExprEngine::ProcessEndPath() out-of-line.
llvm-svn: 88729
2009-11-14 01:05:20 +00:00
Jakob Stoklund Olesen 24b027401e Fix bug in -split-phi-edges.
When splitting an edge after a machine basic block with fall-through, we
forgot to insert a jump instruction. Fix this by calling updateTerminator() on
the fall-through block when relevant.

Also be more precise in PHIElimination::isLiveIn.

llvm-svn: 88728
2009-11-14 00:38:13 +00:00
Jakob Stoklund Olesen 15ca009ee7 Update MachineDominator information
llvm-svn: 88727
2009-11-14 00:38:06 +00:00
Mike Stump 2ec5dd7160 Mangling support for typeinfo names.
llvm-svn: 88726
2009-11-14 00:14:13 +00:00
Lang Hames 6b7233afc6 Added an API to the SlotIndexes pass to allow new instructions to be inserted into the numbering.
PreAllocSplitting is now using this API to insert code.

llvm-svn: 88725
2009-11-14 00:02:51 +00:00
Douglas Gregor ff7028a55e Revert r88718, which does NOT solve the constructor-template-as-copy-constructor issue. Big thanks to John for finding this
llvm-svn: 88724
2009-11-13 23:59:09 +00:00
Mike Stump c5a332cefb Handle descructor printing better.
llvm-svn: 88723
2009-11-13 23:45:53 +00:00
Douglas Gregor 2bb756a3be Template argument deduction of a non-type template parameter from a
template argument.

llvm-svn: 88722
2009-11-13 23:45:44 +00:00
Evan Cheng 78fa302e7d Fix PR5411. Bug in UpdateKills. A reg def partially define its super-registers.
llvm-svn: 88719
2009-11-13 23:16:41 +00:00
Douglas Gregor 5f235a21eb A constructor template cannot be instantiated to a copy
constructor. Make sure that such declarations can never be formed.

llvm-svn: 88718
2009-11-13 23:14:53 +00:00
Mike Stump 559387fe8b Also track address points for primaries bases.
llvm-svn: 88717
2009-11-13 23:13:20 +00:00
Eric Christopher 96b26acd0f Remove extraneous commit.
llvm-svn: 88716
2009-11-13 23:08:47 +00:00
Eric Christopher 0cabd30b22 Print out something, even if it's non-parseable later when we've
got ghost linkage. It's better than aborting.

llvm-svn: 88715
2009-11-13 23:00:14 +00:00
Fariborz Jahanian ebea005812 Code gen. For virtual destructor call on array objects
(still part of pr5472).

llvm-svn: 88712
2009-11-13 22:29:45 +00:00
Dan Gohman 6e99014947 Move the FixedStackPseudoSourceValueVal enum value before InstructionVal
so that isa<Instructon> doesn't return true for FixedStackPseudoSourceValue
values. This fixes a variety of problems, including crashes with -debug
and -print-machineinstrs. Also, add a comment to warn about this.

llvm-svn: 88711
2009-11-13 22:24:13 +00:00
Mike Stump 2fb78c0250 More VTT and constructor vtable testcases from recent work.
llvm-svn: 88710
2009-11-13 22:12:05 +00:00
Bill Wendling 6787318557 Disable the JITTest.NoStubs test for Darwin PPC. It apparently doesn't implement
emitFunctionStubAtAddr.

llvm-svn: 88708
2009-11-13 21:58:54 +00:00
Jakob Stoklund Olesen ad205d6102 Fix PHIElimination optimization that uses MBB->getBasicBlock.
The BasicBlock associated with a MachineBasicBlock does not necessarily
correspond to the code in the MBB.

Don't insert a new IR BasicBlock when splitting critical edges. We are not
supposed to modify the IR during codegen, and we should be able to do just
fine with a NULL BB.

llvm-svn: 88707
2009-11-13 21:56:15 +00:00
Jakob Stoklund Olesen 27440e71fc Add MachineFunction::verify() to call the machine code verifier directly.
llvm-svn: 88706
2009-11-13 21:56:09 +00:00