aliases.
- Attributes specific to a definition are only set when the
definition is seen.
- Alias generation is delayed until the end of the module; necessary
since the alias may reference forward.
- Fixes: PR2743, <rdr://6140807&6094512>
- Improves: <rdr://6095112> (added XFAIL)
Also, print module on verification failures.
llvm-svn: 55966
of RHSs to id type instead of void* if either has Objective-C object
type.
- This ensures the result can still be used in normal places an
object can be used, like a message send.
Add implicit conversions for ?: applied to qualified id types to
ensure that the RHSs are compatible.
- This prevents a codegen crash (creating invalid PHI nodes).
- Again, this relates to the fact that qualified id types have no
canonical types.
- Note that the implicit type casted to is incorrect, however this
doesn't currently cause problems because of the flexibility of the
id type.
Test cases for above.
llvm-svn: 55346
- UsualUnaryConversions takes an Expr *& and may modify its argument,
this broke when it was refactored into Sema::CheckCastTypes. This
meant that we were missing implicit casts in some places.
- Seems pretty sad that this got through our tests.
llvm-svn: 55039
- Returns addr of constant for argument + '\0'.
- I couldn't think of a better name.
- Move appropriate users of GetAddrOfConstantString to this.
Rename getStringForStringLiteral to GetStringForStringLiteral.
Add GetAddrOfConstantStringFromLiteral
- This combines GetAddrOfConstantString and
GetStringForStringLiteral. This method can be, but is not yet, more
efficient.
Change GetAddrOfConstantString to not add terminating '\0'
- <rdar://problem/6140956>
llvm-svn: 54768
- Change hardcoded assembly instructions to a use of 'opt' (still
waiting for someone to yell at me for this).
- Add some cases to cover behavior fixed by previous commit.
llvm-svn: 54413
type.
- This generates somewhat less optimal code than before but this is
not hard to rectify once stable (at the cost of slightly more
complex code).
- This currently always uses little-endian ordering of the bitfield.
- This breaks the CodeGen/bitfield.c test because it was grepping for
hard-coded assembly instructions. Will fix once a better test case
is constructed (hard to do without execution).
- This fixes SingleSource/UnitTests/2006-01-23-InitializedBitField.c
and Regression/C/PR1386.c from the test suite.
- <rdar://problem/6085090>, <rdar://problem/6094169>
llvm-svn: 54395
- Changed EmitSub to work on all cases (arithmetic, ptr - int, ptr -
ptr) so that implementation matches that of other operators.
- Modify EmitCompoundAssign to compute and perform the appropriate
casts of left, right, and result types for the assorted pointer
arithmetic cases.
- Fix EmitSub (ptr - int) case to negate the rhs *after*
extension. This is critical when the rhs is unsigned (and needs
extension).
- This fixes cfrac.
- <rdr://6115726>
llvm-svn: 54392
scimark2 on Darwin.
- Added Sema support for asm-label on variables, which I forgot before.
- Update CodeGen to use GlobalDeclMap to determine if static Decls
require emission (instead of LLVM module name lookup). Important
since the Decl name and the LLVM module name can differ.
- <rdar://problem/6116729>
llvm-svn: 54388
having multiple bindings from all the possible decls which
conceptually map to the same global).
- This eliminates CodeGen depending on the LLVM module for name
lookup.
- This also eliminates the need for ReplaceMapValuesWith (hurrah).
- This handles lookups for FunctionDecls correctly in the presence of
aliases, this was previously broken.
- WIP: Can still clean up & unify variable and function emission.
llvm-svn: 54382
- Follows emission scheme used by llvm-gcc, i.e. invent an id for
each label whose address is taken and replace each indirect goto by
a switch to each possible target.
- Currently we emit a switch for each indirect goto instead of
merging them as llvm-gcc does.
llvm-svn: 54318
- There is an miscompilation issue remaining due to a poor
interaction between the delayed emission of static functions and
the emission of constructors, but that already existed prior to
this change.
llvm-svn: 54258
instead of mapping the decl to a bitcast of the global to the correct
type.
- GetAddrOf{Function,GlobalVar} introduce the bitcast on every use now.
- This solves a problem where a dangling pointer could be introduced
by the RAUW done when replacing a forward or tentative
definition. See testcase for more details.
- Fixes <rdar://problem/6108358>
llvm-svn: 54211
- Fix multiple issues with the way case ranges were emitted, see test
cases details about the specific issues.
- The root issue was not being careful about how basic blocks were
emitted which led to them being chained together incorrectly,
resulting in improper control flow.
- Fixes <rdar://problem/6098585>
llvm-svn: 54006
used to mutate the attribute list for declspecs when the type was
converted, breaking the case where one declspec was shared by multiple
declarators.
This fixes rdar://6032532.
llvm-svn: 52769
qualifier in the lvalue, and changes lvalue loads/stores to honor
the volatile flag. Places which need some further attention are marked
with FIXMEs.
Patch by Cédric Venet.
llvm-svn: 52264