[llvm] [llvm] Use OwningArrayRef in NodeMetadata (NFC) (PR #137539)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 27 13:47:24 PDT 2025
================
@@ -183,18 +184,14 @@ class NodeMetadata {
NodeMetadata() = default;
NodeMetadata(const NodeMetadata &Other)
- : RS(Other.RS), NumOpts(Other.NumOpts), DeniedOpts(Other.DeniedOpts),
- OptUnsafeEdges(new unsigned[NumOpts]), VReg(Other.VReg),
- AllowedRegs(Other.AllowedRegs)
+ : RS(Other.RS), DeniedOpts(Other.DeniedOpts),
+ OptUnsafeEdges(ArrayRef<unsigned>(Other.OptUnsafeEdges)),
----------------
nikic wrote:
Is the explicit cast here needed? I thought that would be implicit as OwningArrayRef publicly inherits from ArrayRef.
https://github.com/llvm/llvm-project/pull/137539
More information about the llvm-commits
mailing list