#
5513fce9 |
| 05-Aug-2010 |
John McCall <rjmccall@apple.com> |
It turns out that linkers (at least, the Darwin linker) don't necessarily do the right thing with mixed-visibility symbols, so disable the visibility optimization where that's possible, i.e. with tem
It turns out that linkers (at least, the Darwin linker) don't necessarily do the right thing with mixed-visibility symbols, so disable the visibility optimization where that's possible, i.e. with template classes (since it's possible that an arbitrary template might be subject to an explicit instantiation elsewhere). 447.dealII actually does this.
I've put the code under an option that's currently not hooked up to anything.
llvm-svn: 110374
show more ...
|
#
570024a8 |
| 05-Aug-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Implement #pragma GCC visibility.
llvm-svn: 110315
|
#
e16adc2b |
| 04-Aug-2010 |
John McCall <rjmccall@apple.com> |
Emit standard-library RTTI with external linkage, not weak_odr.
Apply hidden visibility to most RTTI; libstdc++ does not rely on exact pointer equality for the type info (just the type info names).
Emit standard-library RTTI with external linkage, not weak_odr.
Apply hidden visibility to most RTTI; libstdc++ does not rely on exact pointer equality for the type info (just the type info names). Apply the same optimization to RTTI that we do to vtables.
Fixes PR5962.
llvm-svn: 110192
show more ...
|
#
c904933a |
| 29-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Change the name to something less terrible; suggestion by Doug. No functionality change.
llvm-svn: 109797
|
#
c81af03f |
| 29-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Merge PCHWriterDecl.cpp's isRequiredDecl and CodeGenModule::MayDeferGeneration into a new function, DeclIsRequiredFunctionOrFileScopedVar.
This is essentially a CodeGen predicate that is also needed
Merge PCHWriterDecl.cpp's isRequiredDecl and CodeGenModule::MayDeferGeneration into a new function, DeclIsRequiredFunctionOrFileScopedVar.
This is essentially a CodeGen predicate that is also needed by the PCH mechanism to determine whether a decl needs to be deserialized during PCH loading for codegen purposes. Since this logic is shared by CodeGen and the PCH mechanism, move it to the ASTContext, thus CodeGenModule's GetLinkageForFunction/GetLinkageForVariable and the GVALinkage enum is moved out of CodeGen.
This fixes current (and avoids future) codegen-from-PCH bugs.
llvm-svn: 109784
show more ...
|
#
79ac9ed7 |
| 28-Jul-2010 |
Gabor Greif <ggreif@gmail.com> |
we are not supposed to create an improper callsite using a CallInstr; leave a fixme mentioning the simplification when CallSite can clone itself
llvm-svn: 109575
|
#
c0279a98 |
| 27-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Revert r109546, it broke linux build.
llvm-svn: 109550
|
#
4fac2806 |
| 27-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Merge PCHWriterDecl.cpp's isRequiredDecl and CodeGenModule::MayDeferGeneration into a new function, DeclIsRequiredFunctionOrFileScopedVar.
This function is part of the public CodeGen interface since
Merge PCHWriterDecl.cpp's isRequiredDecl and CodeGenModule::MayDeferGeneration into a new function, DeclIsRequiredFunctionOrFileScopedVar.
This function is part of the public CodeGen interface since it's essentially a CodeGen predicate that is also needed by the PCH mechanism to determine whether a decl needs to be deserialized during PCH loading for codegen purposes. This fixes current (and avoids future) codegen-from-PCH bugs.
llvm-svn: 109546
show more ...
|
#
6e7e8cc1 |
| 22-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
atch for implementation of objective-c's -Wselector warning flag in clang. Little more to do for a PCH issue. Radar 6507158.
llvm-svn: 109129
|
#
3348e2d1 |
| 16-Jul-2010 |
Daniel Dunbar <daniel@zuster.org> |
IRgen: Support user defined attributes on block runtime functions. - This issue here is that /usr/include/Blocks.h wants to define some of the block runtime globals as weak, depending on the targ
IRgen: Support user defined attributes on block runtime functions. - This issue here is that /usr/include/Blocks.h wants to define some of the block runtime globals as weak, depending on the target. This doesn't work in Clang because we aren't using the AST decl for these globals.
- The fix is a pretty gross hack which just watches all the decls for the specific blocks globals we need to know about; if we see one we use it, otherwise we use the hand coded type.
In time, I would like to clean this up by changing IRgen to ask Sema/AST for the decl, which would then be lazily loaded from the builtin table if necessary. This could be used in a whole host of places in IRgen and would get rid of a lot of grotty hand coding of LLVM IR; however, we need some extra Sema support for this as well as support for builtin global variables.
llvm-svn: 108482
show more ...
|
#
900546d2 |
| 16-Jul-2010 |
Daniel Dunbar <daniel@zuster.org> |
IRgen: Move blocks runtime interfaces to CodeGenModule.
llvm-svn: 108481
|
#
70013b64 |
| 15-Jul-2010 |
John McCall <rjmccall@apple.com> |
When deferring the emission of declarations with initializers in C++, remember the order they appeared in the translation unit. If they get emitted, put them in their proper order. Fixes rdar://pro
When deferring the emission of declarations with initializers in C++, remember the order they appeared in the translation unit. If they get emitted, put them in their proper order. Fixes rdar://problem/7458115
llvm-svn: 108477
show more ...
|
#
8997690f |
| 15-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't suppress the emission of available_externally functions marked with always_inline attribute. Thanks to Howard for the tip.
llvm-svn: 108469
|
#
a700f688 |
| 13-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Reinstate the optimization suppressing available_externally functions at -O0. The only change from the previous patch is that we don't try to generate virtual method thunks for an available_externall
Reinstate the optimization suppressing available_externally functions at -O0. The only change from the previous patch is that we don't try to generate virtual method thunks for an available_externally function.
llvm-svn: 108230
show more ...
|
#
553f3a9b |
| 12-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Speculatively revert r108156; it appears to be breaking self-host.
llvm-svn: 108194
|
#
dbb2806a |
| 12-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Do not generate LLVM IR for available_externally function bodies at -O0, since we won't be using the definitions for anything anyway. For lib/System/Path.o when built in Debug+Asserts mode, this lead
Do not generate LLVM IR for available_externally function bodies at -O0, since we won't be using the definitions for anything anyway. For lib/System/Path.o when built in Debug+Asserts mode, this leads to a 4% improvement in compile time (and suppresses 440 function bodies).
<rdar://problem/7987644>
llvm-svn: 108156
show more ...
|
#
36ea3225 |
| 07-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce Decl::hasBody() and FunctionDecl::hasBody() and use them instead of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH.
Makes de-se
Introduce Decl::hasBody() and FunctionDecl::hasBody() and use them instead of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH.
Makes de-serialization of the function body even more "lazier".
llvm-svn: 107768
show more ...
|
#
09ae0329 |
| 06-Jul-2010 |
John McCall <rjmccall@apple.com> |
Provide a hook for the benefit of clients using clang IR gen as a subroutine: emit metadata associating allocas and global values with a Decl*. This feature is controlled by an option that (intentio
Provide a hook for the benefit of clients using clang IR gen as a subroutine: emit metadata associating allocas and global values with a Decl*. This feature is controlled by an option that (intentionally) cannot be enabled on the command line.
To use this feature, simply set CodeGenOptions.EmitDeclMetadata = true; and then interpret the completely underspecified metadata. :)
llvm-svn: 107739
show more ...
|
#
5c740f15 |
| 30-Jun-2010 |
Chris Lattner <sabre@nondot.org> |
Reapply: r107173, "fix PR7519: after thrashing around and remembering how all this stuff" r107216, "fix PR7523, which was caused by the ABI code calling ConvertType instead"
This includes a fix to m
Reapply: r107173, "fix PR7519: after thrashing around and remembering how all this stuff" r107216, "fix PR7523, which was caused by the ABI code calling ConvertType instead"
This includes a fix to make ConvertTypeForMem handle the "recursive" case, and call it as such when lowering function types which have an indirect result.
llvm-svn: 107310
show more ...
|
#
749b8ed5 |
| 30-Jun-2010 |
Chris Lattner <sabre@nondot.org> |
reduce nesting.
llvm-svn: 107292
|
#
9b5528d2 |
| 24-Jun-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to correctly mangle block helper functions when block literal is declared inside a ctor/dtor. Fixes radr 8096995.
llvm-svn: 106700
|
#
ea836bc4 |
| 22-Jun-2010 |
Anders Carlsson <andersca@mac.com> |
Switch over to the new caching version of getMangledName.
llvm-svn: 106549
|
#
2e2f4d2e |
| 22-Jun-2010 |
Anders Carlsson <andersca@mac.com> |
Add a new variant of getMangledName that caches the mangling for decls.
llvm-svn: 106547
|
#
5dd34744 |
| 21-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Instantiations subject to an explicit template instantiation declaration have default visibility even under -fvisibility=hidden. Fixes <rdar://problem/8109763>.
llvm-svn: 106440
|
#
c96b2496 |
| 19-Jun-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Fix for PR7415: refactor CodeGenModule::MayDeferGeneration and make it less conservative for static variables in templated classes.
llvm-svn: 106385
|