Commit Graph

82970 Commits

Author SHA1 Message Date
John McCall b3cec96a7c Account for the VTT argument when making an implicit copy constructor for
a class with virtual bases.  Just a patch until Sema starts (correctly) doing
most of this analysis.

Fixes PR 6622.

llvm-svn: 102692
2010-04-30 05:56:45 +00:00
Douglas Gregor 1e13c5a8fb When we start the definition of a class template, set the
InjectedClassNameType's Decl to point at the definition. It's a little
messy, but we do the same thing with classes and their record types,
since much of Clang expects that the TagDecl* one gets out of a type
is the definition. Fixes several Boost.Proto failures.

llvm-svn: 102691
2010-04-30 04:39:27 +00:00
Zhongxing Xu 526f504f06 Remove unused trait.
llvm-svn: 102690
2010-04-30 04:17:33 +00:00
Zhongxing Xu 685a1d818d Refactor the AnalysisConsumer to analyze functions after the whole
translation unit is parsed. This enables us to inline some calls when still
analyzing one function at a time.

Actions are classified into Function, CXXMethod, ObjCMethod, 
ObjCImplementation.

This does not hurt performance much. The analysis time for sqlite3.c:

before:
real    17m52.440s
user    17m49.460s
sys    0m2.010s

after:
real    18m0.500s
user    17m56.900s
sys    0m2.330s

DisplayProgress option is broken now. -inine-call action is removed. It
will be reenabled in another form, perhaps as an indenpendant option.

llvm-svn: 102689
2010-04-30 04:14:20 +00:00
John McCall e7db86ddb0 Fix a tentative-parse error with unqualified template ids in cast expressions.
Also resolve a long-working FIXME in the test case I modified.

llvm-svn: 102688
2010-04-30 03:11:01 +00:00
Douglas Gregor dead00f902 Fix pasto in this test
llvm-svn: 102687
2010-04-30 03:07:23 +00:00
Douglas Gregor 6602c25c0c Add Clang version inspection macros. Fixes PR6681.
llvm-svn: 102686
2010-04-30 02:51:06 +00:00
John McCall 48bf349471 Fix -fno-rtti -fexceptions by forcing the emission of (non-"builtin") RTTI
when used by the exceptions routines.  Fixes PR 6974.

llvm-svn: 102684
2010-04-30 01:15:21 +00:00
Evan Cheng 5117a555e0 Another sibcall bug. If caller and callee calling conventions differ, then it's only safe to do a tail call if the results are returned in the same way.
llvm-svn: 102683
2010-04-30 01:12:32 +00:00
Nate Begeman 4a623eed26 logical ops, unary ops, pairwise ops
llvm-svn: 102681
2010-04-30 00:46:57 +00:00
Dan Gohman 587e0800e5 Temporarily disable SelectionDAG kill flags, which are causing trouble.
llvm-svn: 102680
2010-04-30 00:32:51 +00:00
Jeffrey Yasskin 0a1513902f Fix the OProfileJITEventListener build after r101844 removed
MachineFunction::DefaultDebugLoc.  We now use the same technique as
DwarfDebug::beginFunction to find the starting line number for a
function.

llvm-svn: 102679
2010-04-30 00:16:10 +00:00
Dan Gohman ac55510c4e Set register kill flags on the SelectionDAG path, at least in the
easy cases.

llvm-svn: 102678
2010-04-30 00:08:21 +00:00
John McCall dac3ea6e8d Teach EHCleanupBlock to deal appropriately with the possibility that there
might not have been an insertion block set at start.  Fixes PR6975.

llvm-svn: 102677
2010-04-30 00:06:43 +00:00
Anders Carlsson 786a3d910e Get the base class addresses before calling EmitClassCopyAssignment.
llvm-svn: 102676
2010-04-30 00:04:01 +00:00
Anders Carlsson 2b4ec8d003 Remove an unnecessary argument to EmitClassCopyAssignment.
llvm-svn: 102674
2010-04-29 23:51:42 +00:00
John McCall 99b2fe5f54 Rebuild the nested name specifiers in member-pointer declarator chunks when
entering the current instantiation.  Set up a little to preserve type location
information for typename types while we're in there.

Fixes a Boost failure.

llvm-svn: 102673
2010-04-29 23:50:39 +00:00
Jakob Stoklund Olesen 8d4214578d Reject really weird coalescer case when trying to merge identical subregisters
of different register classes. e.g.

  %reg1048:3<def> = EXTRACT_SUBREG %RAX<kill>, 3

Where %reg1048 is a GR32 register. This is not impossible to handle, but it is
pretty hard and very rare.

This should unbreak the dragonegg builder.

llvm-svn: 102672
2010-04-29 23:47:46 +00:00
Charles Davis b2403ee273 Fix build with MSVC.
llvm-svn: 102671
2010-04-29 23:44:00 +00:00
Nick Lewycky 83e3060f08 The llc -f flag was removed.
llvm-svn: 102670
2010-04-29 23:37:44 +00:00
Nate Begeman 723169d8ec Comparisons.
llvm-svn: 102669
2010-04-29 23:36:09 +00:00
Dan Gohman 0fd54fbbcf Don't leave Base.FrameIndex uninitialized, so that it doesn't
print randomly in debug output.

llvm-svn: 102668
2010-04-29 23:30:41 +00:00
Chris Lattner 9d186478c0 add some more (void)'s to prototypes for PR6961
llvm-svn: 102667
2010-04-29 23:27:32 +00:00
Dan Gohman 35cd68c888 Fix typos in assertion strings.
llvm-svn: 102666
2010-04-29 23:25:34 +00:00
Ted Kremenek d8a23f988d Do not enable '-analyze-check-security-syntactic' by default when using '--analyze'. There
are several known issues to address for it should be turned on by default.

llvm-svn: 102664
2010-04-29 22:50:22 +00:00
Jakob Stoklund Olesen e2550f4f93 Slightly verboser debug spew from coalescer
llvm-svn: 102663
2010-04-29 22:21:48 +00:00
Devang Patel 02b2574d06 Missed earlier. This is part of previous check-in. (r102661 - refactor.)
llvm-svn: 102662
2010-04-29 20:48:12 +00:00
Devang Patel 0395553e35 Refactor.
llvm-svn: 102661
2010-04-29 20:40:36 +00:00
Dale Johannesen 6feac8a39b Make naked functions work on PPC.
llvm-svn: 102657
2010-04-29 19:32:19 +00:00
Devang Patel 080e4fb2f0 Print variable scope name in DEBUG_VALUE comment. Useful in some cases. e.g.
##DEBUG_VALUE: runOnMachineFunction:this <- RDI+0
	##DEBUG_VALUE: runOnMachineFunction:fn <- RSI+0
	##DEBUG_VALUE: DeadDefs <- undef ## SimpleRegisterCoalescing.cpp:2706
	##DEBUG_VALUE: getRegInfo:this <- [%rsp+$56]+$0
	##DEBUG_VALUE: getTarget:this <- [%rsp+$56]+$0

llvm-svn: 102655
2010-04-29 18:52:10 +00:00
Evan Cheng 6e7ca24907 Remove DBG_VALUE which reference dead stack slots.
llvm-svn: 102654
2010-04-29 18:51:00 +00:00
Devang Patel a46953d281 DO not push DBG_VALUE machine instructions for inlined fuction arguments in entry block.
llvm-svn: 102653
2010-04-29 18:50:36 +00:00
Evan Cheng d433757315 Add DenseMapInfo for int.
llvm-svn: 102652
2010-04-29 18:50:35 +00:00
Dan Gohman 0cc5629f4e llc no longer requires the -f option to overwrite files.
llvm-svn: 102651
2010-04-29 18:46:52 +00:00
Douglas Gregor 980fb16f9a When determining a standard conversion sequence involves resolving the
address of an overloaded function (or function template), perform that
resolution prior to determining the implicit conversion
sequence. This resolution is not part of the implicit conversion
sequence itself.

Previously, we would always consider this resolution to be a
function pointer decay, which was a lie: there might be an explicit &
in the expression, in which case decay should not occur. This caused
the CodeGen assertion in PR6973 (where we created a 
pointer to a pointer to a function when we should have had a pointer
to a function), but it's likely that there are corner cases of
overload resolution where this would have failed.

Cleaned up the code involved in determining the type that will
produced afer resolving the overloaded function reference, and added
an assertion to make sure the result is correct. Fixes PR6973.

llvm-svn: 102650
2010-04-29 18:24:40 +00:00
Bob Wilson 1905e2be86 Don't remove libLTO.dylib if it's not being installed in Developer/usr/lib;
just leave it in Developer/usr/local/lib.

llvm-svn: 102646
2010-04-29 18:04:29 +00:00
Fariborz Jahanian 9e1a3af030 Properties cannot be synthesized by-dafult in
categories. Issue usual warnings instead of
confusing error message. Radar 7920807

llvm-svn: 102645
2010-04-29 17:52:18 +00:00
Devang Patel dfcd0661a1 Use clang::VarDecl name instead of llvm::GlobalVariable name.
llvm::GLobalVariable name may not match user visibile name for function static variables.

llvm-svn: 102644
2010-04-29 17:48:37 +00:00
Ted Kremenek 3b9ad93a35 Add USR support for 'static inline' functions (which can be declared in header files).
Add USR support for 'static' functions and local variables, which can be handy for resolving named variables within a translation unit.

llvm-svn: 102641
2010-04-29 17:43:29 +00:00
Ted Kremenek 9825536eea Remove USRGenerator::VisitBlockDecl(). We don't need to generate USRs for blocks, since
they have no linkage and by definition are anonymous.

llvm-svn: 102640
2010-04-29 17:43:26 +00:00
Ted Kremenek 772810137a Add test case for __has_feature(objc_weak_class).
llvm-svn: 102639
2010-04-29 17:43:21 +00:00
Nate Begeman 23a2f2ff79 Start stamping out the __builtin_neon stuff.
llvm-svn: 102638
2010-04-29 17:37:19 +00:00
Dan Gohman 4695c20f8c Elaborate on a comment.
llvm-svn: 102637
2010-04-29 16:57:54 +00:00
Ted Kremenek 186a074346 Add FunctionDecl::isVariadic() to match BlockDecl::isVariadic() and ObjCMethodDecl::isVariadic().
Do some minor refactoring along the way.

llvm-svn: 102635
2010-04-29 16:49:01 +00:00
Ted Kremenek 8af4f40f4a Rename BlockDecl::IsVariadic() to BlockDecl::isVariadic() to match the casing
for similar methods.  No functionality change.

llvm-svn: 102634
2010-04-29 16:48:58 +00:00
Daniel Dunbar 0c00537583 IRgen/NeXT: Put the synthesized _objc_super, _message_ref_t decls in a valid DeclContext, to satisfy the invariants that should hold on a RecordDecl.
llvm-svn: 102624
2010-04-29 16:29:11 +00:00
Daniel Dunbar 50aa0a528d Remove a FIXME that is unlikely to be fixed (streaming code generation).
llvm-svn: 102623
2010-04-29 16:29:09 +00:00
Daniel Dunbar 117c19fa4d Frontend: Tie backend verification passes to CodeGenOptions::VerifyModule,
instead of NDEBUG.

llvm-svn: 102622
2010-04-29 16:29:06 +00:00
Daniel Dunbar c1626e3317 Remove dead option.
llvm-svn: 102621
2010-04-29 16:29:02 +00:00
Duncan Sands 76d6217906 Verify metadata harder. In particular, check that module
level metadata does not have any function local operands.
This would have caught the problem found in PR6112.

llvm-svn: 102620
2010-04-29 16:10:30 +00:00