Skip to content

Commit

Permalink
[XRay] Unsupport version<2 sled entry
Browse files Browse the repository at this point in the history
For many features we expect clang and compiler-rt to have a version lock
relation, yet for XRaySledEntry we have kept version<2 compatibility for more
than 2 years (I migrated away the last user mips in 2020-09 (D87977)).
I think it's fair to call an end to version<2 now. This should discourage more
work on version<2 (e.g. D140725).

Reviewed By: ianlevesque

Differential Revision: https://reviews.llvm.org/D140739
  • Loading branch information
MaskRay committed Dec 29, 2022
1 parent 5c3c109 commit 2468b3f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions compiler-rt/lib/xray/xray_interface_internal.h
Expand Up @@ -30,14 +30,10 @@ struct XRaySledEntry {
unsigned char Version;
unsigned char Padding[13]; // Need 32 bytes
uint64_t function() const {
if (Version < 2)
return Function;
// The target address is relative to the location of the Function variable.
return reinterpret_cast<uint64_t>(&Function) + Function;
}
uint64_t address() const {
if (Version < 2)
return Address;
// The target address is relative to the location of the Address variable.
return reinterpret_cast<uint64_t>(&Address) + Address;
}
Expand All @@ -49,14 +45,10 @@ struct XRaySledEntry {
unsigned char Version;
unsigned char Padding[5]; // Need 16 bytes
uint32_t function() const {
if (Version < 2)
return Function;
// The target address is relative to the location of the Function variable.
return reinterpret_cast<uint32_t>(&Function) + Function;
}
uint32_t address() const {
if (Version < 2)
return Address;
// The target address is relative to the location of the Address variable.
return reinterpret_cast<uint32_t>(&Address) + Address;
}
Expand Down

0 comments on commit 2468b3f

Please sign in to comment.