mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Added "Profile" method to APFloat for use with FoldingSet.
Added member template "Add" to FoldingSetNodeID that allows "adding" arbitrary objects to a profile via dispatch to FoldingSetTrait<T>::Profile(). Removed FoldingSetNodeID::AddAPFloat and FoldingSetNodeID::APInt, as their functionality is now replaced using the above mentioned member template. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46957 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -13,6 +13,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/ADT/APFloat.h"
|
||||
#include "llvm/ADT/FoldingSet.h"
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include "llvm/Support/MathExtras.h"
|
||||
@ -691,6 +692,11 @@ APFloat::~APFloat()
|
||||
freeSignificand();
|
||||
}
|
||||
|
||||
// Profile - This method 'profiles' an APFloat for use with FoldingSet.
|
||||
void APFloat::Profile(FoldingSetNodeID& ID) const {
|
||||
ID.Add(convertToAPInt());
|
||||
}
|
||||
|
||||
unsigned int
|
||||
APFloat::partCount() const
|
||||
{
|
||||
|
Reference in New Issue
Block a user