#
beec5a08 |
| 06-Mar-2010 |
John McCall <rjmccall@apple.com> |
Implement __builtin_dwarf_sp_column for i386 (Darwin and not), x86-64 (all), and ARM. Implement __builtin_init_dwarf_reg_size_table for i386 (both) and x86-64 (all).
llvm-svn: 97859
|
#
2e42fec3 |
| 04-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
Fix PR6473.
Clang's support for weakref is now better than llvm-gcc's :-)
We don't introduce a new symbol and we correctly mark undefined references weak only if there is no definition or regular u
Fix PR6473.
Clang's support for weakref is now better than llvm-gcc's :-)
We don't introduce a new symbol and we correctly mark undefined references weak only if there is no definition or regular undefined references in the same file.
llvm-svn: 97733
show more ...
|
#
731be662 |
| 04-Mar-2010 |
John McCall <rjmccall@apple.com> |
Revert changes r97693, r97700, and r97718.
Our testing framework can't deal with disabled targets yet.
llvm-svn: 97719
|
#
9eba9dfb |
| 04-Mar-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Refactor local class name mangling and make it ABI conforming.
llvm-svn: 97702
|
#
6abe39c6 |
| 04-Mar-2010 |
John McCall <rjmccall@apple.com> |
Create a TargetMachine whenever we create a CodeGenAction. The codegen of some builtins will rely on target knowledge.
llvm-svn: 97693
|
#
70e040d5 |
| 02-Mar-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
During codegen assert that any copy assignment, destructor or constructor that we need to synthesize has been marked as used by Sema.
Change Sema to avoid these asserts.
llvm-svn: 97589
|
#
c18086ae |
| 23-Feb-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
Add support for the weakref attribute. We still produce "alias weak" as llvm-gcc does, but are more strict on what uses of weakref we accept.
llvm-svn: 96992
|
#
f8ff7b9f |
| 23-Feb-2010 |
John McCall <rjmccall@apple.com> |
Perform two more constructor/destructor code-size optimizations:
1) emit base destructors as aliases to their unique base class destructors under some careful conditions. This is enabled for the sa
Perform two more constructor/destructor code-size optimizations:
1) emit base destructors as aliases to their unique base class destructors under some careful conditions. This is enabled for the same targets that can support complete-to-base aliases, i.e. not darwin.
2) Emit non-variadic complete constructors for classes with no virtual bases as calls to the base constructor. This is enabled on all targets and in theory can trigger in situations that the alias optimization can't (mostly involving virtual bases, mostly not yet supported).
These are bundled together because I didn't think it worthwhile to split them, not because they really need to be.
llvm-svn: 96842
show more ...
|
#
d4324148 |
| 19-Feb-2010 |
John McCall <rjmccall@apple.com> |
Re-introduce the ctor/dtor alias optimization, this time hidden behind a command-line option which defaults off.
llvm-svn: 96649
|
#
334ce7c1 |
| 18-Feb-2010 |
John McCall <rjmccall@apple.com> |
Revert the ctor/dtor alias optimization for now; the buildbots can detect some failure here that I can't.
llvm-svn: 96612
|
#
67cea747 |
| 17-Feb-2010 |
John McCall <rjmccall@apple.com> |
Emit complete constructors and destructors as aliases to base constructors and destructors when the two entities are semantically identical, i.e. when the class has no virtual base classes. We only
Emit complete constructors and destructors as aliases to base constructors and destructors when the two entities are semantically identical, i.e. when the class has no virtual base classes. We only do this for linkage types for which aliases are supported, i.e. internal and external, i.e. not linkonce.
llvm-svn: 96451
show more ...
|
#
7f4945aa |
| 11-Feb-2010 |
Ted Kremenek <kremenek@apple.com> |
Remove use of 'std::string' from Attr objects, using instead a byte array allocated using the allocator in ASTContext. This addresses these strings getting leaked when using a BumpPtrAllocator (in A
Remove use of 'std::string' from Attr objects, using instead a byte array allocated using the allocator in ASTContext. This addresses these strings getting leaked when using a BumpPtrAllocator (in ASTContext).
Fixes: <rdar://problem/7636765> llvm-svn: 95853
show more ...
|
#
340aafaa |
| 08-Feb-2010 |
John McCall <rjmccall@apple.com> |
Emit global references with constant initializers as constants. Fixes PR5585.
The standard actually says that such references should have internal linkage, but gcc doesn't do that, so we probably c
Emit global references with constant initializers as constants. Fixes PR5585.
The standard actually says that such references should have internal linkage, but gcc doesn't do that, so we probably can't get away with it.
llvm-svn: 95577
show more ...
|
#
10d369d1 |
| 07-Feb-2010 |
Anders Carlsson <andersca@mac.com> |
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!)
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
show more ...
|
#
61f6db54 |
| 06-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Switch CodeGen's "is this variable declaration a definition?" logic over to VarDecl::isThisDeclarationADefinition(), which handles variables declared with linkage specifications better (among other t
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
show more ...
|
#
6710c535 |
| 06-Feb-2010 |
Anders Carlsson <andersca@mac.com> |
Use the correct function info for constructors when applying function attributes. Fixes PR6245.
llvm-svn: 95474
|
#
7dc5c17d |
| 03-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
When a function or variable somehow depends on a type or declaration that is in an anonymous namespace, give that function or variable internal linkage.
This change models an oddity of the C++ stand
When a function or variable somehow depends on a type or declaration that is in an anonymous namespace, give that function or variable internal linkage.
This change models an oddity of the C++ standard, where names declared in an anonymous namespace have external linkage but, because anonymous namespace are really "uniquely-named" namespaces, the names cannot be referenced from other translation units. That means that they have external linkage for semantic analysis, but the only sensible implementation for code generation is to give them internal linkage. We now model this notion via the UniqueExternalLinkage linkage type. There are several changes here:
- Extended NamedDecl::getLinkage() to produce UniqueExternalLinkage when the declaration is in an anonymous namespace. - Added Type::getLinkage() to determine the linkage of a type, which is defined as the minimum linkage of the types (when we're dealing with a compound type that is not a struct/class/union). - Extended NamedDecl::getLinkage() to consider the linkage of the template arguments and template parameters of function template specializations and class template specializations. - Taught code generation to rely on NamedDecl::getLinkage() when determining the linkage of variables and functions, also considering the linkage of the types of those variables and functions (C++ only). Map UniqueExternalLinkage to internal linkage, taking out the explicit checks for isInAnonymousNamespace().
This fixes much of PR5792, which, as discovered by Anders Carlsson, is actually the reason behind the pass-manager assertion that causes the majority of clang-on-clang regression test failures. With this fix, Clang-built-Clang+LLVM passes 88% of its regression tests (up from 67%). The specific numbers are:
LLVM: Expected Passes : 4006 Expected Failures : 32 Unsupported Tests : 40 Unexpected Failures: 736
Clang: Expected Passes : 1903 Expected Failures : 14 Unexpected Failures: 75
Overall: Expected Passes : 5909 Expected Failures : 46 Unsupported Tests : 40 Unexpected Failures: 811
Still to do: - Improve testing - Check whether we should allow the presence of types with InternalLinkage (in addition to UniqueExternalLinkage) given variables/functions internal linkage in C++, as mentioned in PR5792. - Determine how expensive the getLinkage() calls are in practice; consider caching the result in NamedDecl. - Assess the feasibility of Chris's idea in comment #1 of PR5792.
llvm-svn: 95216
show more ...
|
#
5b5d2db3 |
| 01-Feb-2010 |
Chris Lattner <sabre@nondot.org> |
Don't explicitly force utf strings into the __TEXT,__ustring by setting the section of the generated global. This is an optimization done by the code generator, and the code being removed didn't han
Don't explicitly force utf strings into the __TEXT,__ustring by setting the section of the generated global. This is an optimization done by the code generator, and the code being removed didn't handle the case when the string contained an embedded nul (which the code generator does correctly handle). This is rdar://7589850
llvm-svn: 95003
show more ...
|
#
5ca7984b |
| 01-Feb-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
In C++, an initializer on a variable doesn't necessarily mean it's the definition. With that in mind, rename getDefinition to getAnyInitializer (to distinguish it from getInit) and reimplement it in
In C++, an initializer on a variable doesn't necessarily mean it's the definition. With that in mind, rename getDefinition to getAnyInitializer (to distinguish it from getInit) and reimplement it in terms of isThisDeclarationADefinition. Update all code to use this new function.
llvm-svn: 94999
show more ...
|
#
160146eb |
| 27-Jan-2010 |
Ken Dyck <ken.dyck@onsemi.com> |
Change the return type of ASTContext::getDeclAlignInBytes() to CharUnits and, now that the "InBytes" part of the name is implied by the return type, rename it to getDeclAlign().
llvm-svn: 94681
|
#
a0f99ff2 |
| 26-Jan-2010 |
Ken Dyck <ken.dyck@onsemi.com> |
Use CharUnits for alignment of UTF16 string in GetAddrOfConstantCFString().
llvm-svn: 94564
|
#
ca4a5459 |
| 26-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
Use the right definition when emitting a global variable. Fixes PR5564.
llvm-svn: 94555
|
#
98ca7943 |
| 26-Jan-2010 |
Ken Dyck <ken.dyck@onsemi.com> |
Introduce CodeGenModule::GetTargetTypeStoreSize() to calculate the store size of LLVM types in character units.
llvm-svn: 94542
|
#
d6b21e48 |
| 26-Jan-2010 |
Anders Carlsson <andersca@mac.com> |
If a global variable has an initializer with side effects, it can never be deferred (even if it's in an anonymous namespace).
llvm-svn: 94525
|
#
481e3a87 |
| 23-Jan-2010 |
David Chisnall <csdavec@swan.ac.uk> |
Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings.
llvm-svn: 94274
|