Duncan Sands
a1b98ab7d5
Give DwarfPrinter a protected (but not virtual) destructor. Cppcheck
...
warns about this base class not having a virtual destructor, but since
this class has no virtual methods and neither it or the types derived
from it has a destructor, a protected trivial destructor will do (and
shuts cppcheck up) the trick without the cost of introducing a vtable.
llvm-svn: 95526
2010-02-07 21:09:22 +00:00
Anders Carlsson
ff8cce4395
Make sure to set vtable pointers in the destructors as well.
...
llvm-svn: 95525
2010-02-07 19:45:40 +00:00
Anders Carlsson
6d0e5bd8f3
Use the right type when taking the address of a non-virtual member function pointer. Fixes PR6258.
...
llvm-svn: 95524
2010-02-07 17:37:13 +00:00
Douglas Gregor
0e027fb32b
Workaround for friend template instantiation crash in PR5848, from Keir Mierle!
...
llvm-svn: 95517
2010-02-07 10:31:35 +00:00
Douglas Gregor
b65a913c35
Fix assertion failure when parsing linkage specifications (PR5921),
...
from Keir Mierle!
llvm-svn: 95516
2010-02-07 08:38:28 +00:00
Sam Weinig
e83b3aca0b
Roll r95513 back in.
...
llvm-svn: 95515
2010-02-07 06:32:43 +00:00
Sam Weinig
e911058bb5
Roll out r95513, it seems to have broken self hosting.
...
llvm-svn: 95514
2010-02-07 05:26:25 +00:00
Sam Weinig
db3758c40d
Add PCH support for CXXBoolLiteralExpr and CXXNullPtrLiteralExpr.
...
llvm-svn: 95513
2010-02-07 04:44:10 +00:00
Anders Carlsson
cee2d2f016
Use the right linkage for static variables inside C++ inline functions.
...
llvm-svn: 95512
2010-02-07 02:03:08 +00:00
Anders Carlsson
10d369d1a2
Improved handling of the visibility attribute. Declarations now inherit their parent's visibility.
...
(This is kind of a risky change, but I did a self-host build and everything appears to work fine!)
llvm-svn: 95511
2010-02-07 01:44:36 +00:00
Anders Carlsson
a7bcade229
Add attributes to namespace decls.
...
llvm-svn: 95510
2010-02-07 01:09:23 +00:00
Anders Carlsson
9878f9f73b
Make EmitStartEHSpec and EmitEndEHSpec return early when exceptions are disabled.
...
llvm-svn: 95509
2010-02-06 23:59:05 +00:00
Anders Carlsson
fcd764a168
Add support for threadsafe statics, and make them the default (matching gcc).
...
Daniel, I'd appreciate a review of the driver/cc1 parts.
llvm-svn: 95508
2010-02-06 23:23:06 +00:00
Bruno Cardoso Lopes
d59cddc098
Add suport for VASTART on Mips.
...
llvm-svn: 95506
2010-02-06 21:00:02 +00:00
Anders Carlsson
5ade5d39b4
Call destructors for constructed bases as well.
...
llvm-svn: 95502
2010-02-06 20:00:21 +00:00
Anders Carlsson
ba63167b64
If a constructor throws an exception we need to execute the destructors for all fully constructed members. Fixes ctor_dtor_count.cpp in the test suite.
...
llvm-svn: 95501
2010-02-06 19:50:17 +00:00
Bruno Cardoso Lopes
d6fff557db
First step towards varargs support in Mips:
...
- o32 cc must pass all arguments in A0...A3 and stack regardless
if its type (but respect the alignment).
- Store all variable arguments back to the caller stack.
llvm-svn: 95500
2010-02-06 19:20:49 +00:00
John McCall
15dda3701a
Use a substituted type when determining how to substitute in non-type template
...
params. Don't insert addrof operations when matching against a pointer;
array/function conversions should take care of this for us, assuming the
argument type-checked in the first place. Add a fixme where we seem to be
using a less-restrictive reference type than we should.
Fixes PR 6249.
llvm-svn: 95495
2010-02-06 10:23:53 +00:00
Benjamin Kramer
4692faa7a4
Silence GCC warning and stay in 80 cols.
...
llvm-svn: 95494
2010-02-06 09:59:24 +00:00
Evan Cheng
ea5c6be766
Run codegen dce pass for all targets at all optimization levels. Previously it's
...
only run for x86 with fastisel. I've found it being very effective in
eliminating some obvious dead code as result of formal parameter lowering
especially when tail call optimization eliminated the need for some of the loads
from fixed frame objects. It also shrinks a number of the tests. A couple of
tests no longer make sense and are now eliminated.
llvm-svn: 95493
2010-02-06 09:07:11 +00:00
Evan Cheng
c72f7882c0
Remove a large test case that (soon will) no longer make sense.
...
llvm-svn: 95492
2010-02-06 09:00:30 +00:00
John McCall
13481c56c3
Extract a function to instantiate references to value template parameters.
...
llvm-svn: 95491
2010-02-06 08:42:39 +00:00
Ted Kremenek
83fdeb5855
Update checker build.
...
llvm-svn: 95490
2010-02-06 06:08:09 +00:00
Bob Wilson
182c53ee88
Fix an uninitialized value. Radar 7609421.
...
llvm-svn: 95488
2010-02-06 05:55:20 +00:00
Anders Carlsson
96c15b1816
Don't diagnose missing noreturns for uninstantiated templates. Fixes PR6247.
...
llvm-svn: 95487
2010-02-06 05:31:15 +00:00
Douglas Gregor
61f6db54e1
Switch CodeGen's "is this variable declaration a definition?" logic
...
over to VarDecl::isThisDeclarationADefinition(), which handles
variables declared with linkage specifications better (among other
things). CMake 2.9 (from CVS) now builds with clang++ and is somewhat
functional.
llvm-svn: 95486
2010-02-06 05:15:45 +00:00
Anders Carlsson
2c4de4c31e
Only append 'L' for internal variable declarations, not all declarations. (Found by the mangle checker, yay)
...
llvm-svn: 95485
2010-02-06 04:52:27 +00:00
Ted Kremenek
bdfcacbe8f
Also teach RegionStore::RetrieveVar() to handle 'static' pointers that are implicitly initialized to NULL.
...
llvm-svn: 95479
2010-02-06 04:04:46 +00:00
Ted Kremenek
30fe9ecac2
Fix regression in RegionStore (from BasicStore) where static variables were not treated as being implicitly initialized to 0 (and instead were getting symbolicated).
...
llvm-svn: 95478
2010-02-06 03:57:59 +00:00
Rafael Espindola
4536b9a904
Fix alignment on ppc linux. This fixes the build of crtend.o
...
llvm-svn: 95477
2010-02-06 03:32:21 +00:00
Ted Kremenek
9c193965ba
Remove unused variable.
...
llvm-svn: 95476
2010-02-06 03:29:18 +00:00
Evan Cheng
d064aefefc
Do not emit callseq instructions around sibcalls. This eliminated some unnecessary stack adjustments.
...
llvm-svn: 95475
2010-02-06 03:28:46 +00:00
Anders Carlsson
6710c5351e
Use the correct function info for constructors when applying function attributes. Fixes PR6245.
...
llvm-svn: 95474
2010-02-06 02:44:09 +00:00
Dale Johannesen
0a741b7258
Add a Debug bit to MachineOperand, for uses that
...
are from debug info. Add an iterator to MachineRegisterInfo
to skip Debug operands when walking the use list. No
functional change yet.
llvm-svn: 95473
2010-02-06 02:28:32 +00:00
Anders Carlsson
0da714a3e2
Implement a warning diagnostic for weak vtables. Fixes PR6116.
...
llvm-svn: 95472
2010-02-06 02:27:10 +00:00
Dale Johannesen
db2eb47835
After Victor's latest commits I am seeing null
...
addresses in dbg.declare; ignore this for the
moment to prevent things from breaking.
llvm-svn: 95471
2010-02-06 02:26:02 +00:00
John McCall
ce410662ce
Teach Sema how to instantiate a local function declaration properly. Fixes
...
PR 5517.
llvm-svn: 95470
2010-02-06 01:50:47 +00:00
Victor Hernandez
827de51a4a
Linker should not remap null operands of metadata
...
llvm-svn: 95468
2010-02-06 01:31:55 +00:00
Victor Hernandez
1b08138152
Function-local metadata whose operands had been optimized to no longer refer to function-local IR were not getting written by BitcodeWriter; solution is for these metadata to be enumerated just like global metadata.
...
llvm-svn: 95467
2010-02-06 01:21:09 +00:00
Jakob Stoklund Olesen
74bb06c0f0
Reintroduce the InlineHint function attribute.
...
This time it's for real! I am going to hook this up in the frontends as well.
The inliner has some experimental heuristics for dealing with the inline hint.
When given a -respect-inlinehint option, functions marked with the inline
keyword are given a threshold just above the default for -O3.
We need some experiments to determine if that is the right thing to do.
llvm-svn: 95466
2010-02-06 01:16:28 +00:00
Bob Wilson
a10e65c852
Add a test for my change to disable reassociation for i1 types.
...
llvm-svn: 95465
2010-02-06 01:16:25 +00:00
Douglas Gregor
cae03b1e6d
Assert when we try to mangle a dependent template name, rather than
...
crashing unceremoniously.
llvm-svn: 95464
2010-02-06 01:09:36 +00:00
John McCall
52cc0897f3
Per discussion, remove the explicit restriction on static const data members with
...
out-of-line initializers as integer constant expressions. Fixes PR6206.
llvm-svn: 95463
2010-02-06 01:07:37 +00:00
Devang Patel
6efc8e5120
Set DW_AT_artificial only if argument is marked as artificial.
...
llvm-svn: 95461
2010-02-06 01:02:37 +00:00
Ted Kremenek
5abd69d946
Teach RegionStore::InvalidateRegions() to also invalidate static variables referenced by blocks.
...
llvm-svn: 95459
2010-02-06 00:30:00 +00:00
John McCall
ca972cd1f1
Rearrange some checks to avoid call to isCopyConstructor() and clarify path
...
taken for non-trivial constructors.
llvm-svn: 95457
2010-02-06 00:25:16 +00:00
Bob Wilson
5638c36efd
Handle AddrMode6 (for NEON load/stores) in Thumb2's rewriteT2FrameIndex.
...
Radar 7614112.
llvm-svn: 95456
2010-02-06 00:24:38 +00:00
Douglas Gregor
bb26a92239
Update Clang C++ status, with a more project-centric focus.
...
llvm-svn: 95455
2010-02-05 23:51:14 +00:00
Jakob Stoklund Olesen
5f9ead2714
Don't unroll loops containing function calls.
...
llvm-svn: 95454
2010-02-05 23:21:31 +00:00
Jakob Stoklund Olesen
b0b2297066
Update CodeMetrics to count 'big' function calls explicitly.
...
llvm-svn: 95453
2010-02-05 23:21:18 +00:00