]>
granicus.if.org Git - clang/log
Anders Carlsson [Wed, 24 Mar 2010 00:41:37 +0000 (00:41 +0000)]
Flip the switch and use the new vtable layout code for thunks by default. Add a thunks.cpp test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99367
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Mar 2010 00:39:18 +0000 (00:39 +0000)]
Add CodeGenFunction::GenerateThunk and implement it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99365
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Mar 2010 00:35:44 +0000 (00:35 +0000)]
Minor cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99364
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Mar 2010 00:32:03 +0000 (00:32 +0000)]
Remove parts of virt.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99363
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 23 Mar 2010 23:47:56 +0000 (23:47 +0000)]
Implement computation of the final overriders for each virtual
function within a class hierarchy (C++ [class.virtual]p2).
We use the final-overrider computation to determine when a particular
class is ill-formed because it has multiple final overriders for a
given virtual function (e.g., because two virtual functions override
the same virtual function in the same virtual base class). Fixes
PR5973.
We also use the final-overrider computation to determine which virtual
member functions are pure when determining whether a class is
abstract or diagnosing the improper use of an abstract class. The
prior approach to determining whether there were any pure virtual
functions in a class didn't cope with virtual base class subobjects
properly, and could not easily be fixed to deal with the oddities of
subobject hiding. Fixes PR6631.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99351
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 23 Mar 2010 20:23:06 +0000 (20:23 +0000)]
Add some missing files to xcode project
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99318
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 23 Mar 2010 19:55:22 +0000 (19:55 +0000)]
revert 99311. Looks like it broke darwin bootstrap.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99317
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 23 Mar 2010 19:02:22 +0000 (19:02 +0000)]
Improve diagnostic for @property/ivar type mismatch by including the types of the
ivar and @property respectively.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99312
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 23 Mar 2010 18:56:16 +0000 (18:56 +0000)]
Avoid producing implicit methods when we have a explicit template instantiation
declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99311
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 23 Mar 2010 18:43:00 +0000 (18:43 +0000)]
Code gen for compound assignment of complex
types using property syntax to access setter/getters.
(also radar
7351147 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99307
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 18:18:41 +0000 (18:18 +0000)]
More work on thunks - don't assert if there's a variable with the same name as the thunk already.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99303
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 23 Mar 2010 18:08:50 +0000 (18:08 +0000)]
Patch to implement code gen. use of compound assignent on
properties of complex type. Radar
7351147 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99299
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 17:17:29 +0000 (17:17 +0000)]
More thunks scaffolding.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99294
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 16:36:50 +0000 (16:36 +0000)]
More work on thunks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99287
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 23 Mar 2010 15:26:55 +0000 (15:26 +0000)]
When recovering from a qualified typedef name, don't clear out the
DeclContext because we don't want a NULL DeclContext. Instead, use the
current context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99281
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 15:17:13 +0000 (15:17 +0000)]
Move ThunkInfo as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99280
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 15:13:06 +0000 (15:13 +0000)]
Move ReturnAdjustment and ThisAdjustment out into CGVtable.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99279
91177308 -0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 23 Mar 2010 14:44:19 +0000 (14:44 +0000)]
Ignore a more comprehensive set of gcc-special format attributes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99277
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 23 Mar 2010 09:13:17 +0000 (09:13 +0000)]
Bind the constructed object value to CXXConstructExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99271
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 23 Mar 2010 08:14:19 +0000 (08:14 +0000)]
update CMakeLists.txt
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99269
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 23 Mar 2010 08:09:29 +0000 (08:09 +0000)]
Clear the return expr GDM after using it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99268
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 23 Mar 2010 07:32:14 +0000 (07:32 +0000)]
Add a AggExprVisitor class. It contains lots of boiler
plate code for evaluating expressions of C++ class type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99267
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 05:15:24 +0000 (05:15 +0000)]
Use the canonical destructor, which fixes the self-host build. Thanks to Eli for noticing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99260
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 23 Mar 2010 05:13:26 +0000 (05:13 +0000)]
merge line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99259
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 23 Mar 2010 05:09:16 +0000 (05:09 +0000)]
Frontend: Don't free the CompilerInstance or FrontendActions when running under
-disable-free. Among other things, this fixes freeing of the LLVM module on
exit.
- Note that this means we are disable-free'ing of a lot more stuff than we used to -- this should flush out bugs in anything left that is trying to do real work in its destructor. I did a mini-audit but '::~' is not totally uncommon.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99258
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 23 Mar 2010 05:09:10 +0000 (05:09 +0000)]
PPCallbacks: Add hook for reaching the end of the main file, and fix DependencyFile to not do work in its destructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99257
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 23 Mar 2010 05:05:02 +0000 (05:05 +0000)]
Since we now may have basicblocks with the same block is in different function,
change the block counter map from unsigned -> unsigned to
<StackFrameContext*, unsigned> -> unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99255
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 04:59:02 +0000 (04:59 +0000)]
Baby steps towards making thunks be emitted from the new vtable layout code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99254
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 04:44:10 +0000 (04:44 +0000)]
Some renames.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99253
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 04:31:31 +0000 (04:31 +0000)]
Always emit associated thunks when emitting the function itself. Remove getVtableAddressPoint, it's not used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99252
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 04:15:00 +0000 (04:15 +0000)]
Rename MaybeEmitVtable to EmitVTableRelatedData in preparation for making it emit thunks as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99251
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 04:11:45 +0000 (04:11 +0000)]
Rename CGVtableInfo to CodeGenVTables in preparation of adding another VTableInfo class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99250
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 23 Mar 2010 01:37:12 +0000 (01:37 +0000)]
For forward-declared static inline functions, delay CFG-based warnings until we
encounter a definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99243
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 23 Mar 2010 01:11:38 +0000 (01:11 +0000)]
Tweak null dereference diagnostics to give clearer diagnostics when
a null dereference results from a field access.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99236
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 23 Mar 2010 00:13:23 +0000 (00:13 +0000)]
Only perform CFG-based warnings on 'static inline' functions that
are called (transitively) by regular functions/blocks within a
translation untion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99233
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 22 Mar 2010 23:25:52 +0000 (23:25 +0000)]
Set the relevent attributes declared in class extension
and fix a missing diagnostics on assigning to a read-only
property. Fixes radar
7766184 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99230
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 22 Mar 2010 23:12:48 +0000 (23:12 +0000)]
A fixed version of r99174 which also includes a test that we emit vtables when
we see an specialization definition ever if we then see a extern template declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99226
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 22 Mar 2010 22:32:05 +0000 (22:32 +0000)]
Disable the emission of frontend warnings (not errors) under --analyze.
Fixes <rdar://problem/
7405601 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99222
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 22 Mar 2010 22:16:26 +0000 (22:16 +0000)]
Improve the diagnostics for the UndefinedAssignmentChecker when an
uninitialized value is used in the LHS of a compound assignment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99221
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 22 Mar 2010 21:28:29 +0000 (21:28 +0000)]
Comment the reasons for the strange little dance we do with the main file name for debug information
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99215
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Mar 2010 21:08:50 +0000 (21:08 +0000)]
(re)implement PR6542, accepting and discarding the __gcc_tdiag__
format attribute specifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99213
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Mar 2010 21:05:15 +0000 (21:05 +0000)]
merge some tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99212
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Mar 2010 21:02:58 +0000 (21:02 +0000)]
rename test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99211
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 22 Mar 2010 21:02:34 +0000 (21:02 +0000)]
Diagnose miuse of property dot-syntax instead of crashing.
(radar
7634653 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99210
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Mar 2010 21:02:14 +0000 (21:02 +0000)]
merge two tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99209
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Mar 2010 21:01:10 +0000 (21:01 +0000)]
rename test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99208
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Mar 2010 20:59:10 +0000 (20:59 +0000)]
revert r98661, gcc_tdiag is not an attribute (PR6542).
Will fix correctly now that I have a testcase
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99207
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Mar 2010 20:31:04 +0000 (20:31 +0000)]
move a test to a more appropriate directory
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99200
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 22 Mar 2010 20:06:40 +0000 (20:06 +0000)]
More work on thunks; almost there now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99199
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 22 Mar 2010 19:04:14 +0000 (19:04 +0000)]
Fixes access rues for ivars declared in class
implementations (radar
7547942 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99198
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Mar 2010 18:51:09 +0000 (18:51 +0000)]
hopefully fix this on non-sse2 hosts. Shouldn't an apple-darwin10
triple imply sse2?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99197
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 22 Mar 2010 18:27:27 +0000 (18:27 +0000)]
Test for my last patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99194
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 22 Mar 2010 18:25:57 +0000 (18:25 +0000)]
More clean up of ivars which are either in class extensions and
implementation or synthesized into an implementation. Also,
fixes a code gen. bug when ivars are itroduced in interleaved
implementations. (related to radar
7547942 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99193
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kovarththanan Rajaratnam [Mon, 22 Mar 2010 18:16:06 +0000 (18:16 +0000)]
Sort calls to add_clang_library()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99191
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Mar 2010 18:14:12 +0000 (18:14 +0000)]
fix PR6658: inline isn't a keyword in C89 mode, use __inline__ instead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99190
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 22 Mar 2010 18:10:25 +0000 (18:10 +0000)]
revert r99174. It caused PR6677. Will try to debug why tonight.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99188
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 22 Mar 2010 16:30:44 +0000 (16:30 +0000)]
Add less than operators to ThisAdjustment, ReturnAdjustment and ThunkInfo. Sort the thunks before dumping them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99184
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 22 Mar 2010 16:10:59 +0000 (16:10 +0000)]
Improve dumping of thunks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99181
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 22 Mar 2010 15:53:50 +0000 (15:53 +0000)]
Use the cursor's ASTContext rather than the ASTContext computed from a
declaration, just in case invalid code makes the latter
incorrect. This may be the cause behind <rdar://problem/
7777070 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99179
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 22 Mar 2010 15:47:45 +0000 (15:47 +0000)]
Fix a thinko and a typo in the delayed-diagnostic code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99178
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 22 Mar 2010 15:47:01 +0000 (15:47 +0000)]
We want to add all thunks, not just 'this' adjustment thunks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99177
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kovarththanan Rajaratnam [Mon, 22 Mar 2010 15:44:38 +0000 (15:44 +0000)]
Use DEFINE_SYMBOL property to control dllexport/dllimport
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99176
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 22 Mar 2010 15:10:57 +0000 (15:10 +0000)]
Introduce the notion of a single "delayed" diagnostic into the
Diagnostic subsystem, which is used in the rare case where we find a
serious problem (i.e., an inconsistency in the file system) while
we're busy formatting another diagnostic. In this case, the delayed
diagnostic will be emitted after we're done with the other
diagnostic. This is only to be used for fatal conditions detected at
very inconvenient times, where we can neither stop the current
diagnostic in flight nor can we suppress the second error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99175
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 22 Mar 2010 14:43:41 +0000 (14:43 +0000)]
When handling a TSK_ExplicitInstantiationDefinition after a
TSK_ExplicitInstantiationDeclaration make sure we call
MaybeMarkVirtualMembersReferenced with a method attached to the definition.
Remove the hack that forced vtable emition with declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99174
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 22 Mar 2010 09:20:08 +0000 (09:20 +0000)]
-Wshadow should only warn about parameter declarations when we're
entering a function or block definition, not on every single declaration.
Unfortunately we don't have previous-lookup results around when it's time
to make this decision, so we have to redo the lookup. The alternative is
to use delayed diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99172
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 22 Mar 2010 01:52:07 +0000 (01:52 +0000)]
Add very limited support for GCC's '-B' flag. This allows us to support unusual
toolchain configurations and is a small step toward FreeBSD support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99159
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 21 Mar 2010 22:56:43 +0000 (22:56 +0000)]
Fix PR6618.
If a struct has an invalid field, mark it as invalid. Also avoid producing
errors about incomplete types that are invalid.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99150
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 21 Mar 2010 22:49:54 +0000 (22:49 +0000)]
Keep track of the size/modification time of each file source-location
entry in a precompiled header, so that we can detect modified files
even when we miss in the stat cache.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99149
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 21 Mar 2010 20:27:14 +0000 (20:27 +0000)]
AddThunk should take a const reference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99140
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 21 Mar 2010 17:11:05 +0000 (17:11 +0000)]
Fix PR6648 by not creating a temporary with the type of a
CXXExprWithTemporaries.
Not emitting the expression as an aggregate might be the right thing to do,
but is orthogonal. Emitting it as an scalar expression will still try to
create a temporary for the incomplete type of the CXXExprWithTemporaries and
fail.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99134
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 21 Mar 2010 04:38:40 +0000 (04:38 +0000)]
Delete the new visitor if an old one already exists.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99114
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 20 Mar 2010 21:13:08 +0000 (21:13 +0000)]
tests: Mangle '-vg' onto the end of the triple when running under valgrind, so
we can use the standard XFAIL and XTARGET to conditional tests based on
valgrind.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99089
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 20 Mar 2010 21:11:09 +0000 (21:11 +0000)]
Don't bother running the analysis for CFG-based warnings if the
declaration is in a system header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99087
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 20 Mar 2010 21:06:02 +0000 (21:06 +0000)]
Refactor CFG-based warnings in Sema to be run by a worked object called AnalysisBasedWarnings.
This object controls when the warnings are executed, allowing the client code
in Sema to selectively disable warnings as needed.
Centralizing the logic for analysis-based warnings allows us to optimize
when and how they are run.
Along the way, remove the redundant logic for the 'check fall-through' warning
for blocks; now the same logic is used for both blocks and functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99085
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Sat, 20 Mar 2010 19:53:29 +0000 (19:53 +0000)]
Fixed synthesizing properties declared in properties (GNU runtime).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99077
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 20 Mar 2010 18:02:01 +0000 (18:02 +0000)]
Reapply r99024 (but with the memory issue now fixed).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99064
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 20 Mar 2010 18:01:57 +0000 (18:01 +0000)]
Check if a BugReporterVisitor has already been added to a BugReporterContext.
This avoids redundant diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99063
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 20 Mar 2010 15:45:06 +0000 (15:45 +0000)]
Fix use-of-invalid-memory found by Valgrind and Windows buildbots.
We were inserting a value into a std::vector<> while iterating over
it, which could cause the underlying memory to get deallocated
and reallocated. While not the best solution, use an llvm::ImmutableList
for now as it is safely supports insertions during iteration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99058
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 20 Mar 2010 08:47:42 +0000 (08:47 +0000)]
Driver: Fix thinkos that prevented Clang from picking the right deployment
target when both {MACOSX,IPHONEOS}_DEPLOYMENT_TARGET were set.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99055
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 20 Mar 2010 08:01:59 +0000 (08:01 +0000)]
Driver: Support CC_PRINT_OPTIONS, used for logging the compile commands (in -v style) to a file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99054
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 20 Mar 2010 08:01:53 +0000 (08:01 +0000)]
Driver: Fix -### to quote shell special characters, following gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99053
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 20 Mar 2010 07:48:45 +0000 (07:48 +0000)]
Add sse4.2 support to this test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99052
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 20 Mar 2010 07:43:28 +0000 (07:43 +0000)]
Add sse4.2 header and builtin support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99051
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 20 Mar 2010 07:04:11 +0000 (07:04 +0000)]
IRgen: Wrap atomic intrinsics with memory barriers, to ensure we honor the semantics.
- This should be conservatively correct, we eventually should have target hooks for platforms that are less strict.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99050
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 20 Mar 2010 05:53:45 +0000 (05:53 +0000)]
Evaluate: Fix a subtle bug in the pointer evaluator in which we would do an
expression computation in the wrong bit-width, and end up generating a totally
bogus array reference (_g0+
8589934546 ).
- This showed up on Prolangs/cdecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99042
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 20 Mar 2010 04:52:14 +0000 (04:52 +0000)]
Driver: Fix a number of -fapple-kext issues:
- Disable RTTI.
- Disable use of __cxa_atexit.
- Disable unwind tables.
- Enable freestanding mode.
Also, honor -fhosted correctly.
<rdar://problem/
7515383 > C++ support: -fapple-kext not honored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99041
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 20 Mar 2010 04:28:39 +0000 (04:28 +0000)]
Revert r99024, "Augment path diagnostics to include displaying when a message
expression", statistical evidence indicates it has some kind of memory error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99040
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 20 Mar 2010 04:15:41 +0000 (04:15 +0000)]
C++: Add support for -fno-use-cxa-atexit.
- So much typing, so little gain...
Also, rename the __cxx_global_initialization function just to match llvm-gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99039
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 20 Mar 2010 04:15:29 +0000 (04:15 +0000)]
IRgen: Inline GenerateCXXGlobal[VarDecl]InitFunc into sole caller.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99038
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 20 Mar 2010 04:12:52 +0000 (04:12 +0000)]
Implement -Wshadow for parameter declarations as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99037
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 20 Mar 2010 01:19:04 +0000 (01:19 +0000)]
Add a newline at the end of the file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99026
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 20 Mar 2010 01:18:30 +0000 (01:18 +0000)]
For legacy compatibility add a varargs.h header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99025
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 20 Mar 2010 01:17:30 +0000 (01:17 +0000)]
Augment path diagnostics to include displaying when a message expression
is not evaluated because the receiver is nil.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99024
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 20 Mar 2010 01:12:03 +0000 (01:12 +0000)]
Driver: Force joining of "-l" "foo", the linker doesn't eat that format.
<rdar://problem/
7641151 > clang must eat spaces after -l
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99023
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 20 Mar 2010 01:12:00 +0000 (01:12 +0000)]
Driver: Allow Render{Separate,Joined} option flags on JoinedOrSeparate option types.
Also, simplify/fix SeparateArg::render with forced join.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99022
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 20 Mar 2010 01:11:56 +0000 (01:11 +0000)]
Fix unused variable warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99021
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 20 Mar 2010 01:08:47 +0000 (01:08 +0000)]
Migrate typedefs to the top level of xmmintrin.h and remove the same
one from emmintrin.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99020
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 20 Mar 2010 01:06:48 +0000 (01:06 +0000)]
Add include for smmintrin.h to this test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99019
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 20 Mar 2010 00:50:21 +0000 (00:50 +0000)]
Driver: Fix possible crash when targetting an unknown (unsupported) Darwin
platform, e.g. ppc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99016
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 20 Mar 2010 00:41:21 +0000 (00:41 +0000)]
Optimize region-of-interest based cursor walks through the
preprocessed entities by grouping preprocessed entities by file
ID. This drastically improves performance of repeated
clang_getCursor() calls local tests, although it is a bit ugly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99015
91177308 -0d34-0410-b5e6-
96231b3b80d8