10 Commits

Author SHA1 Message Date
Timm Baeder
07b2ba2600
Reapply "[clang][bytecode] Fix incorrect offset in elem() (#155157)" (#155276)
This reverts commit 9642aadf7064192164d1687378d28d6bda1978c9.

Since elem() only works on primitive arrays anyway, we don't have to do
the isArrayRoot() check at all.
2025-08-26 05:24:18 +02:00
Timm Bäder
9642aadf70 Revert "[clang][bytecode] Fix incorrect offset in elem() (#155157)"
This reverts commit 0f4db1a7955e511844d7a685103aa32617fc279d.

This breaks the armv8-quick builder:
https://lab.llvm.org/buildbot/#/builders/154/builds/20676
2025-08-25 15:00:02 +02:00
Timm Baeder
0f4db1a795
[clang][bytecode] Fix incorrect offset in elem() (#155157)
We need to use the base offset in both cases.
Also, add additional assertions to make sure we don't miss this case
again.

Fixes #155132
2025-08-25 14:09:59 +02:00
Timm Baeder
5b0935f1f0
[clang][bytecode] Reintroduce Pointer::elem() (#149693)
As a way of writing atIndex(I).deref<T>(), which creates an intermediate
Pointer, which in turn adds (and removes) that pointer from the pointer
list of the Block. This way we can avoid that.
2025-07-20 10:59:50 +02:00
Timm Baeder
a1bcc8f757
[clang][bytecode] Diagnose heap-allocated array elem pointers... (#137523)
...  as "pointer to subobject".
2025-04-27 18:01:19 +02:00
Kazu Hirata
3f07af93dc
[AST] Migrate away from PointerUnion::dyn_cast (NFC) (#123283)
Note that PointerUnion::dyn_cast has been soft deprecated in
PointerUnion.h:

  // FIXME: Replace the uses of is(), get() and dyn_cast() with
  //        isa<T>, cast<T> and the llvm::dyn_cast<T>

Literal migration would result in dyn_cast_if_present (see the
definition of PointerUnion::dyn_cast), but this patch uses dyn_cast
because we expect Source to be nonnull.
2025-01-17 08:46:16 -08:00
Kazu Hirata
dec6324cb0
[AST] Remove unused includes (NFC) (#116549)
Identified with misc-include-cleaner.
2024-11-17 09:36:48 -08:00
Timm Baeder
208584d91a
[clang][bytecode] Fix source range of uncalled base dtor (#111683)
Make this emit the same source range as the current interpreter.
2024-10-09 20:00:33 +02:00
Timm Baeder
35f7cfb224
[clang][bytecode] Check for Pointer dereference in EvaluationResult (#108207)
We will deref<>() it later, so this is the right check.
2024-09-11 16:14:41 +02:00
Timm Baeder
a07aba5d44
[clang] Rename all AST/Interp stuff to AST/ByteCode (#104552)
"Interp" clashes with the clang interpreter and people often confuse
this.
2024-08-16 17:13:12 +02:00