From 365c53e3281860d46f771edf88156ca0aac581cf Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 24 Aug 2010 23:16:53 +0000 Subject: [PATCH] Use Bits.data() instead of &Bits[0]. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111993 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/FoldingSet.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Support/FoldingSet.cpp b/lib/Support/FoldingSet.cpp index 4da220382d6..29b59522088 100644 --- a/lib/Support/FoldingSet.cpp +++ b/lib/Support/FoldingSet.cpp @@ -135,19 +135,19 @@ void FoldingSetNodeID::AddString(StringRef String) { /// ComputeHash - Compute a strong hash value for this FoldingSetNodeID, used to /// lookup the node in the FoldingSetImpl. unsigned FoldingSetNodeID::ComputeHash() const { - return FoldingSetNodeIDRef(&Bits[0], Bits.size()).ComputeHash(); + return FoldingSetNodeIDRef(Bits.data(), Bits.size()).ComputeHash(); } /// operator== - Used to compare two nodes to each other. /// bool FoldingSetNodeID::operator==(const FoldingSetNodeID &RHS)const{ - return *this == FoldingSetNodeIDRef(&RHS.Bits[0], RHS.Bits.size()); + return *this == FoldingSetNodeIDRef(RHS.Bits.data(), RHS.Bits.size()); } /// operator== - Used to compare two nodes to each other. /// bool FoldingSetNodeID::operator==(FoldingSetNodeIDRef RHS) const { - return FoldingSetNodeIDRef(&Bits[0], Bits.size()) == RHS; + return FoldingSetNodeIDRef(Bits.data(), Bits.size()) == RHS; } /// Intern - Copy this node's data to a memory region allocated from the