Anders Carlsson
2683fd6f8c
Mangle std::nullptr_t as specified by the Itanium C++ ABI.
...
llvm-svn: 118236
2010-11-04 04:31:32 +00:00
David Chisnall
e8431a7766
Some fixes for synthesized ivar metadata (GNU runtime).
...
llvm-svn: 118172
2010-11-03 16:12:44 +00:00
John McCall
8e7cb6dcfa
Ensure that static local variables in function templates inherit the
...
visibility of their function.
llvm-svn: 118065
2010-11-02 21:04:24 +00:00
Fariborz Jahanian
dc9bc5aeb8
Fix a crash mangling decayed val argument-typed function.
...
// rdar: //8620510 and PR7666
llvm-svn: 118019
2010-11-02 16:54:00 +00:00
Devang Patel
86f30f5a1d
Simplify. Builtin types' context is always implied.
...
llvm-svn: 117928
2010-11-01 16:52:40 +00:00
Anders Carlsson
fd88a6160d
Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset.
...
llvm-svn: 117881
2010-10-31 23:22:37 +00:00
John McCall
c273f24196
Better solution: calculate the visibility of functions and variables
...
independently of whether they're definitions, then teach IR generation to
ignore non-explicit visibility when emitting declarations. Use this to
make sure that RTTI, vtables, and VTTs get the right visibility.
More of rdar://problem/8613093
llvm-svn: 117781
2010-10-30 11:50:40 +00:00
Dale Johannesen
7d3dfc0622
Generate bitcasts going in and out of MMX parameters
...
in asm's. PR 8501, 8602988.
I don't like including Type.h where it is; the idea was
to get references to X86_MMXTy out of the common code.
Maybe there's a better way?
llvm-svn: 117736
2010-10-29 23:12:32 +00:00
Dan Gohman
e9e32dcb48
Use CodeGenFunction's getContext(), for consistency.
...
llvm-svn: 117734
2010-10-29 22:47:07 +00:00
John McCall
37bb6c9832
Restore r117644, this time properly ignoring -fvisibility and type visibility
...
for namespace-scope variable declarations.
Apply visibility in IR gen to variables that are merely declared
and never defined. We were previously emitting these with default
visibility unless they were declared with private_extern.
Ignore global visibility settings when computing visibility for
a declaration's context, and key several conditions on whether a
visibility attribute exists anywhere in the hierarchy as opposed
to whether it exists at the current level.
llvm-svn: 117729
2010-10-29 22:22:43 +00:00
Devang Patel
31d1e2153f
After processing named unions do not fall through to handle anonymous unions.
...
This is tested by funcargs.exp in gdb testsuite.
llvm-svn: 117659
2010-10-29 16:21:19 +00:00
Daniel Dunbar
df8792128f
Revert r117644, "Apply visibility in IR gen to variables that are merely
...
declared", it breaks things.
llvm-svn: 117653
2010-10-29 15:19:36 +00:00
John McCall
077dc60540
Don't assert on attempts to throw 'bool'. I wonder if in the history of C++
...
anyone has ever intentionally done this outside of a compiler test case.
llvm-svn: 117645
2010-10-29 08:14:02 +00:00
John McCall
4af6bf1fdc
Apply visibility in IR gen to variables that are merely declared
...
and never defined. We were previously emitting these with default
visibility unless they were declared with private_extern.
Ignore global visibility settings when computing visibility for
a declaration's context, and key several conditions on whether a
visibility attribute exists anywhere in the hierarchy as opposed
to whether it exists at the current level.
llvm-svn: 117644
2010-10-29 07:49:41 +00:00
Devang Patel
ed23f18d7e
Basic types are language defined builtins. They are always defined at top most level.
...
llvm-svn: 117613
2010-10-28 22:03:20 +00:00
John McCall
565141612f
When emitting l-values for bool non-__block decl references, make a pointer
...
using the memory type; fixes an assert.
Fixes rdar://problem/8605032
llvm-svn: 117610
2010-10-28 21:37:57 +00:00
Devang Patel
faadd7b72d
Directly use NamespaceDecl->getLocation() to find the source file.
...
llvm-svn: 117576
2010-10-28 19:12:46 +00:00
Devang Patel
8e0073008a
Stay within 80 columns.
...
llvm-svn: 117561
2010-10-28 17:27:32 +00:00
John McCall
9de9160d55
Implement an indirect-goto optimization for goto *&&lbl and respect this
...
in the scope checker. With that done, turn an indirect goto into a
protected scope into a hard error; otherwise IR generation has to start
worrying about declarations not dominating their scopes, as exemplified
in PR8473.
If this really affects anyone, I can probably adjust this to only hard-error
on possible indirect gotos into VLA scopes rather than arbitrary scopes.
But we'll see how people cope with the aggressive change on the marginal
feature.
llvm-svn: 117539
2010-10-28 08:53:48 +00:00
Devang Patel
1bee63f325
Fix context info for enums.
...
Radar 8595129
llvm-svn: 117507
2010-10-27 23:23:58 +00:00
John McCall
3a7f6926d1
Restore r117403 (fixing IR gen for bool atomics), this time being less
...
aggressive about the form we expect bools to be in. I don't really have
time to fix all the sources right now.
llvm-svn: 117486
2010-10-27 20:58:56 +00:00
Rafael Espindola
9d798a07e4
Revert r117403 as it caused PR8480.
...
llvm-svn: 117456
2010-10-27 17:13:49 +00:00
Fariborz Jahanian
1518a5eca7
Do the guarding of instantiated static data members
...
on if its linkage is weak. Currently this is the
case but may change in the future. (part of radar
8562966).
llvm-svn: 117452
2010-10-27 16:21:54 +00:00
Anders Carlsson
b00c2144b3
Also devirtualize calls to a member functions where the containing class has been marked final.
...
llvm-svn: 117445
2010-10-27 13:34:43 +00:00
Anders Carlsson
a7911fa3d7
If a virtual member function has the 'final' attribute, we can devirtualize calls to it.
...
llvm-svn: 117444
2010-10-27 13:28:46 +00:00
Fariborz Jahanian
67ca8c4c7b
Patch to provide guard when initializing instances
...
of static data member of a class template.
Fixes //rdar :// 8562966 and pr8409.
llvm-svn: 117410
2010-10-26 22:47:47 +00:00
John McCall
6bde954f47
Extract procedures to do scalar-to-memory and memory-to-scalar conversions
...
in IR gen, and use those to fix a correctness issue with bool atomic
intrinsics. rdar://problem/8461234
llvm-svn: 117403
2010-10-26 22:09:15 +00:00
Dan Gohman
8fc50c296a
Factor out the code for emitting code to load vtable pointer members
...
so that it's done in one place.
llvm-svn: 117386
2010-10-26 18:44:08 +00:00
Dan Gohman
dc2c4db598
Add infrastructure for emitting TBAA metadata with the "constant" flag.
...
llvm-svn: 117328
2010-10-25 23:51:23 +00:00
Dan Gohman
d831356635
Trim an unnecessary #include.
...
llvm-svn: 117321
2010-10-25 21:59:29 +00:00
Dan Gohman
7dfd13c167
Factor out the code for creating the Root and Char nodes, so that
...
they can be used outside of the main getTBAAInfo function.
llvm-svn: 117320
2010-10-25 21:48:30 +00:00
Fariborz Jahanian
c123623d28
After discussion with Doug and John, I am reverting
...
the patch.
llvm-svn: 117159
2010-10-22 22:05:03 +00:00
John McCall
457a04e3ce
Substantially revise how clang computes the visibility of a declaration to
...
more closely parallel the computation of linkage. This gets us to a state
much closer to what gcc emits, modulo bugs, which will undoubtedly arise in
abundance.
llvm-svn: 117147
2010-10-22 21:05:15 +00:00
Fariborz Jahanian
0196aa28ec
Patch fixes miscompile with non-trivial copy constructors and
...
statement expressions, //rdar: //8540501
llvm-svn: 117146
2010-10-22 21:01:02 +00:00
Devang Patel
401c916c8a
Delay record type's debug info emission, in -flimit-debug-info mode, if member expression's base is call expr.
...
llvm-svn: 117127
2010-10-22 18:56:27 +00:00
Devang Patel
db3910000a
Revert unintentional check-in.
...
llvm-svn: 117120
2010-10-22 18:31:12 +00:00
Devang Patel
f79199d140
Tidy up MIPS_linkage name. Provide it only if it does not match regular name, otherwise it confuses debugger.
...
This is tested by local.C in llvmgcc testsuite.
llvm-svn: 117107
2010-10-22 17:11:50 +00:00
Benjamin Kramer
fb5e584151
More class anonymization.
...
llvm-svn: 117106
2010-10-22 16:48:22 +00:00
Dan Gohman
2bb62c3d2b
Rename clang's TBAA tree root from "experimental" to "simple".
...
llvm-svn: 117046
2010-10-21 18:50:04 +00:00
Dan Gohman
5419ce6827
Add some more comments.
...
llvm-svn: 117043
2010-10-21 18:49:12 +00:00
Fariborz Jahanian
50c925fe96
This patch implements Next's IRGen for -fconstant-string-class=class-name.
...
PR6056, //rdar: //8564463
llvm-svn: 116819
2010-10-19 17:19:29 +00:00
Michael J. Spencer
f5a1fbcdf3
Fix Whitespace.
...
llvm-svn: 116798
2010-10-19 06:39:39 +00:00
Bill Wendling
9987c0ea42
We shouldn't keep track of MMX registers "needed" separately from the SSE
...
registers needed.
llvm-svn: 116772
2010-10-18 23:51:38 +00:00
John McCall
18e4edae82
Fix some bugs in local class mangling brought up in PR8355.
...
Patch by Richard Smith!
llvm-svn: 116752
2010-10-18 21:28:44 +00:00
Fariborz Jahanian
f34011e4ca
patch fixes class names missing from method names in debug information for
...
synthesized property. // rdar: //8498026
llvm-svn: 116717
2010-10-18 17:51:06 +00:00
Bill Wendling
5cd41c4b13
Reapply r116684 with fixes. The test cases needed to be updated.
...
llvm-svn: 116696
2010-10-18 03:41:31 +00:00
Bill Wendling
c7c9be661f
Temporarily revert r116684. It was causing failures with
...
Clang :: CodeGen/x86_32-arguments-darwin.c
Clang :: CodeGen/x86_32-arguments-linux.c
llvm-svn: 116687
2010-10-17 07:58:46 +00:00
Bill Wendling
812f4b123e
The "gcc.dg/compat/vector-1 -m32" test was broken after the MMX rewrite. The
...
function parameters weren't converted to use the correct type (x86_mmx). Add a
check, similar to the one in llvm-gcc, to see if we need the x86_mmx type for
that function parameter. If so, it coerces the type to be that.
llvm-svn: 116684
2010-10-17 07:38:01 +00:00
John McCall
d509182336
Coding by inspection has its problems.
...
llvm-svn: 116672
2010-10-16 16:34:08 +00:00
John McCall
17afe45a87
objc_exception_rethrow does not take an exception argument.
...
rdar://problem/8535238
llvm-svn: 116663
2010-10-16 08:21:07 +00:00