Author: Timm Baeder Date: 2026-11-16T10:31:47+01:00 New Revision: 7090701baa47d03b1e9877eff3b4e8f032b99946
URL: https://github.com/llvm/llvm-project/commit/7090701baa47d03b1e9877eff3b4e8f032b99946 DIFF: https://github.com/llvm/llvm-project/commit/7090701baa47d03b1e9877eff3b4e8f032b99946.diff LOG: [clang][bytecode][NFC] Remove unused `Pointer::compare()` (#242977) Added: Modified: clang/lib/AST/ByteCode/Pointer.h Removed: ################################################################################ diff --git a/clang/lib/AST/ByteCode/Pointer.h b/clang/lib/AST/ByteCode/Pointer.h index 04aaacd5d96512..f1dcc5637455d0 100644 --- a/clang/lib/AST/ByteCode/Pointer.h +++ b/clang/lib/AST/ByteCode/Pointer.h @@ -1286,20 +1286,6 @@ class Pointer { [[nodiscard]] Pointer stripBaseCasts() const { return Pointer(view().stripBaseCasts()); } - - /// Compare two pointers. - ComparisonCategoryResult compare(const Pointer &Other) const { - if (!hasSameBase(*this, Other)) - return ComparisonCategoryResult::Unordered; - - if (Offset < Other.Offset) - return ComparisonCategoryResult::Less; - if (Offset > Other.Offset) - return ComparisonCategoryResult::Greater; - - return ComparisonCategoryResult::Equal; - } - /// Checks if two pointers are comparable. static bool hasSameBase(const Pointer &A, const Pointer &B); /// Checks if two pointers can be subtracted. _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
