| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
| |
__block object copy/dispose helpers for C++ objects with those for
different variables with completely different semantics simply because
they happen to both be no more aligned than a pointer.
Found by inspection.
Also, internalize most of the helper generation logic within CGBlocks.cpp,
and refactor it to fit my peculiar aesthetic sense.
llvm-svn: 128618
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Emit them instead with the linkage of the VTT.
I'm actually really ambivalent about this; it's what GCC does, but outside
of improving code size (if the linkage is coalescing), I'm not sure it's
at all relevant. Construction vtables are naturally referenced only by the
VTT, which is itself only referenced by complete-object constructors and
destructors; giving the construction vtables possibly-external linkage is
important if you have an optimization that drills through the VTT to a
reference to a particular construction vtable which it cannot just emit
itself.
llvm-svn: 128374
|
|
|
|
|
|
| |
Radar 9168773
llvm-svn: 128150
|
|
|
|
|
|
|
|
| |
Issue this as an IR-gen error; it's not really worthwhile doing this
"right", i.e. in Sema, because IR gen knows a lot of tricks beyond
what the constant evaluator knows.
llvm-svn: 127854
|
|
|
|
|
|
| |
recomputation.
llvm-svn: 127322
|
|
|
|
|
|
|
|
|
|
| |
simplify the logic of initializing function parameters so that we don't need
both a variable declaration and a type in FunctionArgList. This also means
that we need to propagate the CGFunctionInfo down in a lot of places rather
than recalculating it from the FAL. There's more we can do to eliminate
redundancy here, and I've left FIXMEs behind to do it.
llvm-svn: 127314
|
|
|
|
|
|
| |
attribute). However, at module level it is determined by command line option and the state of command line option does not change during compilation. Make this layering explicit and fix accidental cases where the code generator was checking whether module has debug info enabled instead of checking whether debug info is enabled for this function or not.
llvm-svn: 127165
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
experience.
21 int main() {
22 A a;
For example, here user would expect to stop at line 22, even if A's constructor leads to a call through CXXDefaultArgExpr.
This fixes ostream-defined.exp regression from gdb testsuite.
llvm-svn: 127164
|
|
|
|
| |
llvm-svn: 127082
|
|
|
|
|
|
|
| |
loading references as part of that. Use 'char' TBAA when accessing
(immediate!) fields of a may_alias struct; fixes PR9307.
llvm-svn: 126540
|
|
|
|
|
|
|
|
|
|
| |
invocation function into the debug info. Rather than faking up a class,
which is tricky because of the custom layout we do, we just emit a struct
directly from the layout information we've already got.
Also, don't emit an unnecessarily parameter alloca for this "variable".
llvm-svn: 126255
|
|
|
|
| |
llvm-svn: 126189
|
|
|
|
|
|
|
|
|
| |
- Have CGM precompute a number of commonly-used types
- Have CGF copy that during initialization instead of recomputing them
- Use TBAA info when initializing a parameter variable
- Refactor the scalar ++/-- code
llvm-svn: 125562
|
|
|
|
|
|
|
|
| |
Block{Function,Module} base class. Minor other refactorings.
Fixed a few address-space bugs while I was there.
llvm-svn: 125085
|
|
|
|
| |
llvm-svn: 124983
|
|
|
|
|
|
|
|
| |
GetOrCreateLLVMFunction so that we
won't assert when building a thunk for an implicit virtual member function that is not marked used.
llvm-svn: 124967
|
|
|
|
|
|
| |
We now emit everything except unused implicit virtual member functions when building the vtable.
llvm-svn: 124935
|
|
|
|
|
|
|
|
|
|
|
| |
right for anonymous struct/union members led to me discovering some
seemingly broken code in that area of Sema, which I fixed, partly by
changing the representation of member pointer constants so that
IndirectFieldDecls aren't expanded. This led to assorted cleanups with
member pointers in CodeGen, and while I was doing that I saw some random
other things to clean up.
llvm-svn: 124785
|
|
|
|
|
|
|
| |
This reopens PR99114, but that one at least can be avoided with an #include.
PR9130 cannot.
llvm-svn: 124780
|
|
|
|
|
|
|
|
|
|
|
| |
is not defined in the current translation unit. Doing so lead to compile errors
such as PR9114.
Instead, when CodeGen is building the vtable, don't try to emit a definition
for functions that aren't marked used in the current translation unit.
Fixes PR9114.
llvm-svn: 124768
|
|
|
|
| |
llvm-svn: 124550
|
|
|
|
|
|
| |
instead of an "IsForRTTI" flag.
llvm-svn: 124546
|
|
|
|
| |
llvm-svn: 124541
|
|
|
|
|
|
| |
has their own copy of this code).
llvm-svn: 124537
|
|
|
|
| |
llvm-svn: 124529
|
|
|
|
| |
llvm-svn: 124095
|
|
|
|
| |
llvm-svn: 123773
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
process, perform a number of refactorings:
- Move MiscNameMangler member functions to MangleContext
- Remove GlobalDecl dependency from MangleContext
- Make MangleContext abstract and move Itanium/Microsoft functionality
to their own classes/files
- Implement ASTContext::createMangleContext and have CodeGen use it
No (intended) functionality change.
llvm-svn: 123386
|
|
|
|
| |
llvm-svn: 122634
|
|
|
|
|
|
|
|
|
| |
data members by delaying the emission of the initializer until after
linkage and visibility have been set on the global. Also, don't
emit a guard unless the variable actually ends up with vague linkage,
and don't use thread-safe statics in any case.
llvm-svn: 118336
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
on if its linkage is weak. Currently this is the
case but may change in the future. (part of radar
8562966).
llvm-svn: 117452
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
PR6056, //rdar: //8564463
llvm-svn: 116819
|
|
|
|
|
|
|
| |
This enables metadata generation by default, however the TBAA pass
in the optimizer is still disabled for now.
llvm-svn: 116536
|
|
|
|
|
|
| |
translation units that don't catch ObjC types. rdar://problem/8434851
llvm-svn: 114070
|
|
|
|
|
|
| |
under the ARM ABI.
llvm-svn: 112588
|
|
|
|
|
|
|
|
|
|
|
| |
class; they should just be completely opaque throughout IR gen now,
although I haven't really audited that.
Fix a bug apparently inherited from gcc-4.2 where we failed to null-check
member data pointers when performing derived-to-base or base-to-derived
conversions on them.
llvm-svn: 111789
|
|
|
|
|
|
|
|
|
| |
Make CGT defer to the ABI on all member pointer types.
This requires giving CGT a handle to the ABI.
It's way easier to make that work if we avoid lazily creating the ABI.
Make it so.
llvm-svn: 111786
|
|
|
|
|
|
|
|
| |
duplication between the constant and non-constant paths in all of this.
Implement ARM ABI semantics for member pointer constants and conversion.
llvm-svn: 111772
|
|
|
|
|
|
|
|
| |
AST library.
This also adds infrastructure for supporting multiple C++ ABIs in the AST.
llvm-svn: 111117
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This takes some trickery since CastExpr has subclasses (and indeed,
is abstract).
Also, smoosh the CastKind into the bitfield from Expr.
Drops two words of storage from Expr in the common case of expressions
which don't need inheritance paths. Avoids a separate allocation and
another word of overhead in cases needing inheritance paths. Also has
the advantage of not leaking memory, since destructors for AST nodes are
never run.
llvm-svn: 110507
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
This will simplify a bunch of code, coming up next.
llvm-svn: 109722
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
llvm-svn: 108481
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
whether to use objc_msgSend_fpret; the choice is target dependent, not Obj-C ABI
dependent.
- <rdar://problem/8139758> arm objc _objc_msgSend_fpret bug
llvm-svn: 108379
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|