8343837: Remove unnecessary reinterpret_cast from C2AccessValuePtr

Reviewed-by: thartmann, kvn, kbarrett
This commit is contained in:
theoweidmannoracle 2024-11-11 08:17:00 +00:00 committed by Tobias Hartmann
parent 5f338e9adb
commit 5b2f7f3b30

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -92,9 +92,9 @@ class C2AccessValuePtr: public C2AccessValue {
public:
C2AccessValuePtr(Node* node, const TypePtr* type) :
C2AccessValue(node, reinterpret_cast<const Type*>(type)) {}
C2AccessValue(node, type) {}
const TypePtr* type() const { return reinterpret_cast<const TypePtr*>(_type); }
const TypePtr* type() const { return _type->is_ptr(); }
};
// This class wraps a bunch of context parameters that are passed around in the