[all-commits] [llvm/llvm-project] 12a789: [clang][Interp] BaseToDerived casts
Timm Baeder via All-commits
all-commits at lists.llvm.org
Tue Sep 5 01:54:26 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 12a789710e2bafe9bb49adea5e634784b086eb6a
https://github.com/llvm/llvm-project/commit/12a789710e2bafe9bb49adea5e634784b086eb6a
Author: Timm Bäder <tbaeder at redhat.com>
Date: 2023-09-05 (Tue, 05 Sep 2023)
Changed paths:
M clang/lib/AST/Interp/ByteCodeExprGen.cpp
M clang/lib/AST/Interp/ByteCodeExprGen.h
M clang/lib/AST/Interp/Interp.cpp
M clang/lib/AST/Interp/Interp.h
M clang/lib/AST/Interp/Opcodes.td
M clang/lib/AST/Interp/Pointer.h
M clang/test/AST/Interp/records.cpp
Log Message:
-----------
[clang][Interp] BaseToDerived casts
We can implement these similarly to DerivedToBase casts. We just have to
walk the class hierarchy, sum the base offsets and subtract it from the
current base offset of the pointer.
Differential Revision: https://reviews.llvm.org/D149133
More information about the All-commits
mailing list