- Feb 07, 2010
-
-
Anders Carlsson authored
(This is kind of a risky change, but I did a self-host build and everything appears to work fine!) llvm-svn: 95511
-
- Feb 06, 2010
-
-
Douglas Gregor authored
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
-
Anders Carlsson authored
llvm-svn: 95474
-
- Feb 03, 2010
-
-
Douglas Gregor authored
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
-
- Feb 01, 2010
-
-
Chris Lattner authored
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
-
Sebastian Redl authored
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
-
- Jan 27, 2010
-
-
Ken Dyck authored
now that the "InBytes" part of the name is implied by the return type, rename it to getDeclAlign(). llvm-svn: 94681
-
- Jan 26, 2010
-
-
Ken Dyck authored
llvm-svn: 94564
-
Anders Carlsson authored
llvm-svn: 94555
-
Ken Dyck authored
of LLVM types in character units. llvm-svn: 94542
-
Anders Carlsson authored
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
-
- Jan 23, 2010
-
-
David Chisnall authored
Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings. llvm-svn: 94274
-
- Jan 10, 2010
-
-
Anton Korobeynikov authored
1. Add helper class for sema checks for target attributes 2. Add helper class for codegen of target attributes As a proof-of-concept - implement msp430's 'interrupt' attribute. llvm-svn: 93118
-
- Jan 09, 2010
-
-
Chris Lattner authored
llvm-svn: 93074
-
- Jan 08, 2010
-
-
Eli Friedman authored
run-time initialization, and emit run-time initializers aggresively to avoid ordering issues with deferred globals. llvm-svn: 92976
-
- Jan 06, 2010
-
-
Douglas Gregor authored
linkage of vtables. Before this, we were emitting RTTI names for template instantiations with strong external linkage rather than with weak ODR linkage. llvm-svn: 92857
-
Douglas Gregor authored
Fix marking of virtual members for nested classes whose first non-pure virtual function has a body inlined in the class llvm-svn: 92855
-
- Jan 05, 2010
-
-
Douglas Gregor authored
- All classes can have a key function; templates don't change that. non-template classes when computing the key function. - We always mark all of the virtual member functions of class template instantiations. - The vtable for an instantiation of a class template has weak linkage. We could probably use available_externally linkage for vtables of classes instantiated by explicit instantiation declarations (extern templates), but GCC doesn't do this and I'm not 100% that the ABI permits it. llvm-svn: 92753
-
Mike Stump authored
llvm-svn: 92749
-
- Dec 29, 2009
-
-
Chris Lattner authored
llvm-svn: 92253
-
- Dec 28, 2009
-
-
Chris Lattner authored
are about to not come in implicitly. llvm-svn: 92228
-
- Dec 25, 2009
-
-
Eli Friedman authored
LLVM-Code-Symbols test. llvm-svn: 92152
-
- Dec 12, 2009
-
-
Jeffrey Yasskin authored
no extra safety anyway. llvm-svn: 91207
-
- Dec 11, 2009
-
-
Eli Friedman authored
llvm-svn: 91156
-
Benjamin Kramer authored
llvm-svn: 91119
-
- Dec 10, 2009
-
-
Anders Carlsson authored
llvm-svn: 91069
-
- Dec 09, 2009
-
-
Eli Friedman authored
type of the builtin when generating the function declaration for a builtin library call. llvm-svn: 90936
-
- Dec 08, 2009
-
-
Eli Friedman authored
llvm-svn: 90831
-
Eli Friedman authored
(Yes, I do intend to commit some tests for this.) llvm-svn: 90818
-
- Dec 06, 2009
-
-
Eli Friedman authored
generation, and make sure we generate thunks when the function is defined rather than when the vtable is defined. llvm-svn: 90722
-
Anders Carlsson authored
llvm-svn: 90711
-
- Dec 05, 2009
-
-
Anders Carlsson authored
llvm-svn: 90624
-
- Dec 01, 2009
-
-
Anders Carlsson authored
Have ASTRecordLayout keep track of the key function, in preparation of fixing a synthetic ctor/dtor bug. llvm-svn: 90168
-
- Nov 30, 2009
-
-
Daniel Dunbar authored
Don't try to generate common globals for C++ files, instead of depending on the FE to set NoCommon, and simplify CodeGenOptions initialization. llvm-svn: 90119
-
- Nov 26, 2009
-
-
Eli Friedman authored
operators, and destructors. Avoids generating declarations/definitions of trivial constructors/destructors, and makes sure the trivial copy assignment operator is generated when necessary. llvm-svn: 89943
-
Eli Friedman authored
internal linkage. Fixes PR5433. llvm-svn: 89931
-
- Nov 24, 2009
-
-
Anders Carlsson authored
llvm-svn: 89737
-
- Nov 21, 2009
-
-
Daniel Dunbar authored
- Sometimes we have to mangle things we wouldn't normally (e.g., because they appear in a template expression). - This also tidies up the predicate to be more obvious what is getting mangled. llvm-svn: 89555
-
Daniel Dunbar authored
instead of requiring clients to make a raw_svector_ostream, which is just an implementation detail. llvm-svn: 89548
-
Daniel Dunbar authored
llvm-svn: 89547
-