mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
[C++11] Switch all uses of the llvm_move macro to use std::move
directly, and remove the macro. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202612 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
afad335cae
commit
0a3eef53d7
@ -285,8 +285,8 @@ protected:
|
|||||||
bool FoundVal = LookupBucketFor(B->first, DestBucket);
|
bool FoundVal = LookupBucketFor(B->first, DestBucket);
|
||||||
(void)FoundVal; // silence warning.
|
(void)FoundVal; // silence warning.
|
||||||
assert(!FoundVal && "Key already in new map?");
|
assert(!FoundVal && "Key already in new map?");
|
||||||
DestBucket->first = llvm_move(B->first);
|
DestBucket->first = std::move(B->first);
|
||||||
new (&DestBucket->second) ValueT(llvm_move(B->second));
|
new (&DestBucket->second) ValueT(std::move(B->second));
|
||||||
incrementNumEntries();
|
incrementNumEntries();
|
||||||
|
|
||||||
// Free the value.
|
// Free the value.
|
||||||
@ -753,10 +753,10 @@ public:
|
|||||||
// Swap separately and handle any assymetry.
|
// Swap separately and handle any assymetry.
|
||||||
std::swap(LHSB->first, RHSB->first);
|
std::swap(LHSB->first, RHSB->first);
|
||||||
if (hasLHSValue) {
|
if (hasLHSValue) {
|
||||||
new (&RHSB->second) ValueT(llvm_move(LHSB->second));
|
new (&RHSB->second) ValueT(std::move(LHSB->second));
|
||||||
LHSB->second.~ValueT();
|
LHSB->second.~ValueT();
|
||||||
} else if (hasRHSValue) {
|
} else if (hasRHSValue) {
|
||||||
new (&LHSB->second) ValueT(llvm_move(RHSB->second));
|
new (&LHSB->second) ValueT(std::move(RHSB->second));
|
||||||
RHSB->second.~ValueT();
|
RHSB->second.~ValueT();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -772,7 +772,7 @@ public:
|
|||||||
SmallDenseMap &LargeSide = Small ? RHS : *this;
|
SmallDenseMap &LargeSide = Small ? RHS : *this;
|
||||||
|
|
||||||
// First stash the large side's rep and move the small side across.
|
// First stash the large side's rep and move the small side across.
|
||||||
LargeRep TmpRep = llvm_move(*LargeSide.getLargeRep());
|
LargeRep TmpRep = std::move(*LargeSide.getLargeRep());
|
||||||
LargeSide.getLargeRep()->~LargeRep();
|
LargeSide.getLargeRep()->~LargeRep();
|
||||||
LargeSide.Small = true;
|
LargeSide.Small = true;
|
||||||
// This is similar to the standard move-from-old-buckets, but the bucket
|
// This is similar to the standard move-from-old-buckets, but the bucket
|
||||||
@ -782,11 +782,11 @@ public:
|
|||||||
for (unsigned i = 0, e = InlineBuckets; i != e; ++i) {
|
for (unsigned i = 0, e = InlineBuckets; i != e; ++i) {
|
||||||
BucketT *NewB = &LargeSide.getInlineBuckets()[i],
|
BucketT *NewB = &LargeSide.getInlineBuckets()[i],
|
||||||
*OldB = &SmallSide.getInlineBuckets()[i];
|
*OldB = &SmallSide.getInlineBuckets()[i];
|
||||||
new (&NewB->first) KeyT(llvm_move(OldB->first));
|
new (&NewB->first) KeyT(std::move(OldB->first));
|
||||||
OldB->first.~KeyT();
|
OldB->first.~KeyT();
|
||||||
if (!KeyInfoT::isEqual(NewB->first, EmptyKey) &&
|
if (!KeyInfoT::isEqual(NewB->first, EmptyKey) &&
|
||||||
!KeyInfoT::isEqual(NewB->first, TombstoneKey)) {
|
!KeyInfoT::isEqual(NewB->first, TombstoneKey)) {
|
||||||
new (&NewB->second) ValueT(llvm_move(OldB->second));
|
new (&NewB->second) ValueT(std::move(OldB->second));
|
||||||
OldB->second.~ValueT();
|
OldB->second.~ValueT();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -794,7 +794,7 @@ public:
|
|||||||
// The hard part of moving the small buckets across is done, just move
|
// The hard part of moving the small buckets across is done, just move
|
||||||
// the TmpRep into its new home.
|
// the TmpRep into its new home.
|
||||||
SmallSide.Small = false;
|
SmallSide.Small = false;
|
||||||
new (SmallSide.getLargeRep()) LargeRep(llvm_move(TmpRep));
|
new (SmallSide.getLargeRep()) LargeRep(std::move(TmpRep));
|
||||||
}
|
}
|
||||||
|
|
||||||
SmallDenseMap& operator=(const SmallDenseMap& other) {
|
SmallDenseMap& operator=(const SmallDenseMap& other) {
|
||||||
@ -852,8 +852,8 @@ public:
|
|||||||
!KeyInfoT::isEqual(P->first, TombstoneKey)) {
|
!KeyInfoT::isEqual(P->first, TombstoneKey)) {
|
||||||
assert(size_t(TmpEnd - TmpBegin) < InlineBuckets &&
|
assert(size_t(TmpEnd - TmpBegin) < InlineBuckets &&
|
||||||
"Too many inline buckets!");
|
"Too many inline buckets!");
|
||||||
new (&TmpEnd->first) KeyT(llvm_move(P->first));
|
new (&TmpEnd->first) KeyT(std::move(P->first));
|
||||||
new (&TmpEnd->second) ValueT(llvm_move(P->second));
|
new (&TmpEnd->second) ValueT(std::move(P->second));
|
||||||
++TmpEnd;
|
++TmpEnd;
|
||||||
P->second.~ValueT();
|
P->second.~ValueT();
|
||||||
}
|
}
|
||||||
@ -868,7 +868,7 @@ public:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LargeRep OldRep = llvm_move(*getLargeRep());
|
LargeRep OldRep = std::move(*getLargeRep());
|
||||||
getLargeRep()->~LargeRep();
|
getLargeRep()->~LargeRep();
|
||||||
if (AtLeast <= InlineBuckets) {
|
if (AtLeast <= InlineBuckets) {
|
||||||
Small = true;
|
Small = true;
|
||||||
|
@ -219,7 +219,7 @@ public:
|
|||||||
U = ToVisit.UseAndIsOffsetKnown.getPointer();
|
U = ToVisit.UseAndIsOffsetKnown.getPointer();
|
||||||
IsOffsetKnown = ToVisit.UseAndIsOffsetKnown.getInt();
|
IsOffsetKnown = ToVisit.UseAndIsOffsetKnown.getInt();
|
||||||
if (IsOffsetKnown)
|
if (IsOffsetKnown)
|
||||||
Offset = llvm_move(ToVisit.Offset);
|
Offset = std::move(ToVisit.Offset);
|
||||||
|
|
||||||
Instruction *I = cast<Instruction>(U->getUser());
|
Instruction *I = cast<Instruction>(U->getUser());
|
||||||
static_cast<DerivedT*>(this)->visit(I);
|
static_cast<DerivedT*>(this)->visit(I);
|
||||||
|
@ -204,7 +204,7 @@ struct PassModel;
|
|||||||
template <typename IRUnitT, typename AnalysisManagerT, typename PassT>
|
template <typename IRUnitT, typename AnalysisManagerT, typename PassT>
|
||||||
struct PassModel<IRUnitT, AnalysisManagerT, PassT,
|
struct PassModel<IRUnitT, AnalysisManagerT, PassT,
|
||||||
true> : PassConcept<IRUnitT, AnalysisManagerT> {
|
true> : PassConcept<IRUnitT, AnalysisManagerT> {
|
||||||
PassModel(PassT Pass) : Pass(llvm_move(Pass)) {}
|
PassModel(PassT Pass) : Pass(std::move(Pass)) {}
|
||||||
virtual PassModel *clone() { return new PassModel(Pass); }
|
virtual PassModel *clone() { return new PassModel(Pass); }
|
||||||
virtual PreservedAnalyses run(IRUnitT IR, AnalysisManagerT *AM) {
|
virtual PreservedAnalyses run(IRUnitT IR, AnalysisManagerT *AM) {
|
||||||
return Pass.run(IR, AM);
|
return Pass.run(IR, AM);
|
||||||
@ -218,7 +218,7 @@ struct PassModel<IRUnitT, AnalysisManagerT, PassT,
|
|||||||
template <typename IRUnitT, typename AnalysisManagerT, typename PassT>
|
template <typename IRUnitT, typename AnalysisManagerT, typename PassT>
|
||||||
struct PassModel<IRUnitT, AnalysisManagerT, PassT,
|
struct PassModel<IRUnitT, AnalysisManagerT, PassT,
|
||||||
false> : PassConcept<IRUnitT, AnalysisManagerT> {
|
false> : PassConcept<IRUnitT, AnalysisManagerT> {
|
||||||
PassModel(PassT Pass) : Pass(llvm_move(Pass)) {}
|
PassModel(PassT Pass) : Pass(std::move(Pass)) {}
|
||||||
virtual PassModel *clone() { return new PassModel(Pass); }
|
virtual PassModel *clone() { return new PassModel(Pass); }
|
||||||
virtual PreservedAnalyses run(IRUnitT IR, AnalysisManagerT *AM) {
|
virtual PreservedAnalyses run(IRUnitT IR, AnalysisManagerT *AM) {
|
||||||
return Pass.run(IR);
|
return Pass.run(IR);
|
||||||
@ -280,7 +280,7 @@ struct AnalysisResultModel;
|
|||||||
template <typename IRUnitT, typename PassT, typename ResultT>
|
template <typename IRUnitT, typename PassT, typename ResultT>
|
||||||
struct AnalysisResultModel<IRUnitT, PassT, ResultT,
|
struct AnalysisResultModel<IRUnitT, PassT, ResultT,
|
||||||
false> : AnalysisResultConcept<IRUnitT> {
|
false> : AnalysisResultConcept<IRUnitT> {
|
||||||
AnalysisResultModel(ResultT Result) : Result(llvm_move(Result)) {}
|
AnalysisResultModel(ResultT Result) : Result(std::move(Result)) {}
|
||||||
virtual AnalysisResultModel *clone() {
|
virtual AnalysisResultModel *clone() {
|
||||||
return new AnalysisResultModel(Result);
|
return new AnalysisResultModel(Result);
|
||||||
}
|
}
|
||||||
@ -302,7 +302,7 @@ struct AnalysisResultModel<IRUnitT, PassT, ResultT,
|
|||||||
template <typename IRUnitT, typename PassT, typename ResultT>
|
template <typename IRUnitT, typename PassT, typename ResultT>
|
||||||
struct AnalysisResultModel<IRUnitT, PassT, ResultT,
|
struct AnalysisResultModel<IRUnitT, PassT, ResultT,
|
||||||
true> : AnalysisResultConcept<IRUnitT> {
|
true> : AnalysisResultConcept<IRUnitT> {
|
||||||
AnalysisResultModel(ResultT Result) : Result(llvm_move(Result)) {}
|
AnalysisResultModel(ResultT Result) : Result(std::move(Result)) {}
|
||||||
virtual AnalysisResultModel *clone() {
|
virtual AnalysisResultModel *clone() {
|
||||||
return new AnalysisResultModel(Result);
|
return new AnalysisResultModel(Result);
|
||||||
}
|
}
|
||||||
@ -347,7 +347,7 @@ template <typename IRUnitT, typename AnalysisManagerT, typename PassT>
|
|||||||
struct AnalysisPassModel<IRUnitT, AnalysisManagerT, PassT,
|
struct AnalysisPassModel<IRUnitT, AnalysisManagerT, PassT,
|
||||||
true> : AnalysisPassConcept<IRUnitT,
|
true> : AnalysisPassConcept<IRUnitT,
|
||||||
AnalysisManagerT> {
|
AnalysisManagerT> {
|
||||||
AnalysisPassModel(PassT Pass) : Pass(llvm_move(Pass)) {}
|
AnalysisPassModel(PassT Pass) : Pass(std::move(Pass)) {}
|
||||||
virtual AnalysisPassModel *clone() { return new AnalysisPassModel(Pass); }
|
virtual AnalysisPassModel *clone() { return new AnalysisPassModel(Pass); }
|
||||||
|
|
||||||
// FIXME: Replace PassT::Result with type traits when we use C++11.
|
// FIXME: Replace PassT::Result with type traits when we use C++11.
|
||||||
@ -370,7 +370,7 @@ template <typename IRUnitT, typename AnalysisManagerT, typename PassT>
|
|||||||
struct AnalysisPassModel<IRUnitT, AnalysisManagerT, PassT,
|
struct AnalysisPassModel<IRUnitT, AnalysisManagerT, PassT,
|
||||||
false> : AnalysisPassConcept<IRUnitT,
|
false> : AnalysisPassConcept<IRUnitT,
|
||||||
AnalysisManagerT> {
|
AnalysisManagerT> {
|
||||||
AnalysisPassModel(PassT Pass) : Pass(llvm_move(Pass)) {}
|
AnalysisPassModel(PassT Pass) : Pass(std::move(Pass)) {}
|
||||||
virtual AnalysisPassModel *clone() { return new AnalysisPassModel(Pass); }
|
virtual AnalysisPassModel *clone() { return new AnalysisPassModel(Pass); }
|
||||||
|
|
||||||
// FIXME: Replace PassT::Result with type traits when we use C++11.
|
// FIXME: Replace PassT::Result with type traits when we use C++11.
|
||||||
@ -403,7 +403,7 @@ public:
|
|||||||
PreservedAnalyses run(Module *M, ModuleAnalysisManager *AM = 0);
|
PreservedAnalyses run(Module *M, ModuleAnalysisManager *AM = 0);
|
||||||
|
|
||||||
template <typename ModulePassT> void addPass(ModulePassT Pass) {
|
template <typename ModulePassT> void addPass(ModulePassT Pass) {
|
||||||
Passes.push_back(new ModulePassModel<ModulePassT>(llvm_move(Pass)));
|
Passes.push_back(new ModulePassModel<ModulePassT>(std::move(Pass)));
|
||||||
}
|
}
|
||||||
|
|
||||||
static StringRef name() { return "ModulePassManager"; }
|
static StringRef name() { return "ModulePassManager"; }
|
||||||
@ -428,7 +428,7 @@ public:
|
|||||||
explicit FunctionPassManager() {}
|
explicit FunctionPassManager() {}
|
||||||
|
|
||||||
template <typename FunctionPassT> void addPass(FunctionPassT Pass) {
|
template <typename FunctionPassT> void addPass(FunctionPassT Pass) {
|
||||||
Passes.push_back(new FunctionPassModel<FunctionPassT>(llvm_move(Pass)));
|
Passes.push_back(new FunctionPassModel<FunctionPassT>(std::move(Pass)));
|
||||||
}
|
}
|
||||||
|
|
||||||
PreservedAnalyses run(Function *F, FunctionAnalysisManager *AM = 0);
|
PreservedAnalyses run(Function *F, FunctionAnalysisManager *AM = 0);
|
||||||
@ -519,7 +519,7 @@ public:
|
|||||||
assert(!AnalysisPasses.count(PassT::ID()) &&
|
assert(!AnalysisPasses.count(PassT::ID()) &&
|
||||||
"Registered the same analysis pass twice!");
|
"Registered the same analysis pass twice!");
|
||||||
typedef detail::AnalysisPassModel<IRUnitT, DerivedT, PassT> PassModelT;
|
typedef detail::AnalysisPassModel<IRUnitT, DerivedT, PassT> PassModelT;
|
||||||
AnalysisPasses[PassT::ID()] = new PassModelT(llvm_move(Pass));
|
AnalysisPasses[PassT::ID()] = new PassModelT(std::move(Pass));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \brief Invalidate a specific analysis pass for an IR module.
|
/// \brief Invalidate a specific analysis pass for an IR module.
|
||||||
@ -783,7 +783,7 @@ template <typename FunctionPassT>
|
|||||||
class ModuleToFunctionPassAdaptor {
|
class ModuleToFunctionPassAdaptor {
|
||||||
public:
|
public:
|
||||||
explicit ModuleToFunctionPassAdaptor(FunctionPassT Pass)
|
explicit ModuleToFunctionPassAdaptor(FunctionPassT Pass)
|
||||||
: Pass(llvm_move(Pass)) {}
|
: Pass(std::move(Pass)) {}
|
||||||
|
|
||||||
/// \brief Runs the function pass across every function in the module.
|
/// \brief Runs the function pass across every function in the module.
|
||||||
PreservedAnalyses run(Module *M, ModuleAnalysisManager *AM) {
|
PreservedAnalyses run(Module *M, ModuleAnalysisManager *AM) {
|
||||||
@ -804,7 +804,7 @@ public:
|
|||||||
|
|
||||||
// Then intersect the preserved set so that invalidation of module
|
// Then intersect the preserved set so that invalidation of module
|
||||||
// analyses will eventually occur when the module pass completes.
|
// analyses will eventually occur when the module pass completes.
|
||||||
PA.intersect(llvm_move(PassPA));
|
PA.intersect(std::move(PassPA));
|
||||||
}
|
}
|
||||||
|
|
||||||
// By definition we preserve the proxy. This precludes *any* invalidation
|
// By definition we preserve the proxy. This precludes *any* invalidation
|
||||||
@ -826,7 +826,7 @@ private:
|
|||||||
template <typename FunctionPassT>
|
template <typename FunctionPassT>
|
||||||
ModuleToFunctionPassAdaptor<FunctionPassT>
|
ModuleToFunctionPassAdaptor<FunctionPassT>
|
||||||
createModuleToFunctionPassAdaptor(FunctionPassT Pass) {
|
createModuleToFunctionPassAdaptor(FunctionPassT Pass) {
|
||||||
return ModuleToFunctionPassAdaptor<FunctionPassT>(llvm_move(Pass));
|
return ModuleToFunctionPassAdaptor<FunctionPassT>(std::move(Pass));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -78,10 +78,6 @@
|
|||||||
# define LLVM_HAS_VARIADIC_TEMPLATES 0
|
# define LLVM_HAS_VARIADIC_TEMPLATES 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// llvm_move - Expands to ::std::move. This is a hold-over from when we did
|
|
||||||
/// not support R-value references.
|
|
||||||
#define llvm_move(value) (::std::move(value))
|
|
||||||
|
|
||||||
/// Expands to '&' if r-value references are supported.
|
/// Expands to '&' if r-value references are supported.
|
||||||
///
|
///
|
||||||
/// This can be used to provide l-value/r-value overrides of member functions.
|
/// This can be used to provide l-value/r-value overrides of member functions.
|
||||||
|
@ -23,7 +23,7 @@ void detail::PtrUseVisitorBase::enqueueUsers(Instruction &I) {
|
|||||||
UseToVisit::UseAndIsOffsetKnownPair(&UI.getUse(), IsOffsetKnown),
|
UseToVisit::UseAndIsOffsetKnownPair(&UI.getUse(), IsOffsetKnown),
|
||||||
Offset
|
Offset
|
||||||
};
|
};
|
||||||
Worklist.push_back(llvm_move(NewU));
|
Worklist.push_back(std::move(NewU));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -470,11 +470,11 @@ void DwarfDebug::addScopeRangeList(DwarfCompileUnit *TheCU, DIE *ScopeDIE,
|
|||||||
RI != RE; ++RI) {
|
RI != RE; ++RI) {
|
||||||
RangeSpan Span(getLabelBeforeInsn(RI->first),
|
RangeSpan Span(getLabelBeforeInsn(RI->first),
|
||||||
getLabelAfterInsn(RI->second));
|
getLabelAfterInsn(RI->second));
|
||||||
List.addRange(llvm_move(Span));
|
List.addRange(std::move(Span));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the range list to the set of ranges to be emitted.
|
// Add the range list to the set of ranges to be emitted.
|
||||||
TheCU->addRangeList(llvm_move(List));
|
TheCU->addRangeList(std::move(List));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Construct new DW_TAG_lexical_block for this scope and attach
|
// Construct new DW_TAG_lexical_block for this scope and attach
|
||||||
@ -1800,7 +1800,7 @@ void DwarfDebug::endFunction(const MachineFunction *MF) {
|
|||||||
|
|
||||||
// Add the range of this function to the list of ranges for the CU.
|
// Add the range of this function to the list of ranges for the CU.
|
||||||
RangeSpan Span(FunctionBeginSym, FunctionEndSym);
|
RangeSpan Span(FunctionBeginSym, FunctionEndSym);
|
||||||
TheCU->addRange(llvm_move(Span));
|
TheCU->addRange(std::move(Span));
|
||||||
|
|
||||||
// Clear debug info
|
// Clear debug info
|
||||||
for (ScopeVariablesMap::iterator I = ScopeVariables.begin(),
|
for (ScopeVariablesMap::iterator I = ScopeVariables.begin(),
|
||||||
|
@ -68,7 +68,7 @@ void DWARFDebugLoc::parse(DataExtractor data, unsigned AddressSize) {
|
|||||||
Offset += Bytes;
|
Offset += Bytes;
|
||||||
E.Loc.reserve(str.size());
|
E.Loc.reserve(str.size());
|
||||||
std::copy(str.begin(), str.end(), std::back_inserter(E.Loc));
|
std::copy(str.begin(), str.end(), std::back_inserter(E.Loc));
|
||||||
Loc.Entries.push_back(llvm_move(E));
|
Loc.Entries.push_back(std::move(E));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.isValidOffset(Offset))
|
if (data.isValidOffset(Offset))
|
||||||
|
@ -31,7 +31,7 @@ PreservedAnalyses ModulePassManager::run(Module *M, ModuleAnalysisManager *AM) {
|
|||||||
PreservedAnalyses PassPA = Passes[Idx]->run(M, AM);
|
PreservedAnalyses PassPA = Passes[Idx]->run(M, AM);
|
||||||
if (AM)
|
if (AM)
|
||||||
AM->invalidate(M, PassPA);
|
AM->invalidate(M, PassPA);
|
||||||
PA.intersect(llvm_move(PassPA));
|
PA.intersect(std::move(PassPA));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DebugPM)
|
if (DebugPM)
|
||||||
@ -89,7 +89,7 @@ PreservedAnalyses FunctionPassManager::run(Function *F, FunctionAnalysisManager
|
|||||||
PreservedAnalyses PassPA = Passes[Idx]->run(F, AM);
|
PreservedAnalyses PassPA = Passes[Idx]->run(F, AM);
|
||||||
if (AM)
|
if (AM)
|
||||||
AM->invalidate(F, PassPA);
|
AM->invalidate(F, PassPA);
|
||||||
PA.intersect(llvm_move(PassPA));
|
PA.intersect(std::move(PassPA));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DebugPM)
|
if (DebugPM)
|
||||||
|
@ -39,10 +39,10 @@ ConstantRange::ConstantRange(uint32_t BitWidth, bool Full) {
|
|||||||
/// Initialize a range to hold the single specified value.
|
/// Initialize a range to hold the single specified value.
|
||||||
///
|
///
|
||||||
ConstantRange::ConstantRange(APIntMoveTy V)
|
ConstantRange::ConstantRange(APIntMoveTy V)
|
||||||
: Lower(llvm_move(V)), Upper(Lower + 1) {}
|
: Lower(std::move(V)), Upper(Lower + 1) {}
|
||||||
|
|
||||||
ConstantRange::ConstantRange(APIntMoveTy L, APIntMoveTy U)
|
ConstantRange::ConstantRange(APIntMoveTy L, APIntMoveTy U)
|
||||||
: Lower(llvm_move(L)), Upper(llvm_move(U)) {
|
: Lower(std::move(L)), Upper(std::move(U)) {
|
||||||
assert(Lower.getBitWidth() == Upper.getBitWidth() &&
|
assert(Lower.getBitWidth() == Upper.getBitWidth() &&
|
||||||
"ConstantRange with unequal bit widths");
|
"ConstantRange with unequal bit widths");
|
||||||
assert((Lower != Upper || (Lower.isMaxValue() || Lower.isMinValue())) &&
|
assert((Lower != Upper || (Lower.isMaxValue() || Lower.isMinValue())) &&
|
||||||
|
@ -1617,11 +1617,11 @@ std::string Node::getVerbatimTag() const {
|
|||||||
if (Raw.find_last_of('!') == 0) {
|
if (Raw.find_last_of('!') == 0) {
|
||||||
Ret = Doc->getTagMap().find("!")->second;
|
Ret = Doc->getTagMap().find("!")->second;
|
||||||
Ret += Raw.substr(1);
|
Ret += Raw.substr(1);
|
||||||
return llvm_move(Ret);
|
return std::move(Ret);
|
||||||
} else if (Raw.startswith("!!")) {
|
} else if (Raw.startswith("!!")) {
|
||||||
Ret = Doc->getTagMap().find("!!")->second;
|
Ret = Doc->getTagMap().find("!!")->second;
|
||||||
Ret += Raw.substr(2);
|
Ret += Raw.substr(2);
|
||||||
return llvm_move(Ret);
|
return std::move(Ret);
|
||||||
} else {
|
} else {
|
||||||
StringRef TagHandle = Raw.substr(0, Raw.find_last_of('!') + 1);
|
StringRef TagHandle = Raw.substr(0, Raw.find_last_of('!') + 1);
|
||||||
std::map<StringRef, StringRef>::const_iterator It =
|
std::map<StringRef, StringRef>::const_iterator It =
|
||||||
@ -1635,7 +1635,7 @@ std::string Node::getVerbatimTag() const {
|
|||||||
setError(Twine("Unknown tag handle ") + TagHandle, T);
|
setError(Twine("Unknown tag handle ") + TagHandle, T);
|
||||||
}
|
}
|
||||||
Ret += Raw.substr(Raw.find_last_of('!') + 1);
|
Ret += Raw.substr(Raw.find_last_of('!') + 1);
|
||||||
return llvm_move(Ret);
|
return std::move(Ret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ void ConstantHoisting::FindAndMakeBaseConstant(ConstantMapType::iterator S,
|
|||||||
ConstantInfo::RebasedConstantInfo RCI;
|
ConstantInfo::RebasedConstantInfo RCI;
|
||||||
RCI.OriginalConstant = I->first;
|
RCI.OriginalConstant = I->first;
|
||||||
RCI.Offset = ConstantInt::get(Ty, Diff);
|
RCI.Offset = ConstantInt::get(Ty, Diff);
|
||||||
RCI.Uses = llvm_move(I->second.Uses);
|
RCI.Uses = std::move(I->second.Uses);
|
||||||
CI.RebasedConstants.push_back(RCI);
|
CI.RebasedConstants.push_back(RCI);
|
||||||
}
|
}
|
||||||
Constants.push_back(CI);
|
Constants.push_back(CI);
|
||||||
|
@ -143,7 +143,7 @@ TEST(SmallPtrSetTest, CopyAndMoveTest) {
|
|||||||
s3.insert(&buf[5]);
|
s3.insert(&buf[5]);
|
||||||
s3.insert(&buf[6]);
|
s3.insert(&buf[6]);
|
||||||
s3.insert(&buf[7]);
|
s3.insert(&buf[7]);
|
||||||
s1 = llvm_move(s3);
|
s1 = std::move(s3);
|
||||||
EXPECT_EQ(8U, s1.size());
|
EXPECT_EQ(8U, s1.size());
|
||||||
EXPECT_TRUE(s3.empty());
|
EXPECT_TRUE(s3.empty());
|
||||||
for (int i = 0; i < 8; ++i)
|
for (int i = 0; i < 8; ++i)
|
||||||
|
@ -57,7 +57,7 @@ TEST(polymorphic_ptr_test, Basic) {
|
|||||||
EXPECT_EQ(s, p.get());
|
EXPECT_EQ(s, p.get());
|
||||||
EXPECT_EQ(42, p->x);
|
EXPECT_EQ(42, p->x);
|
||||||
|
|
||||||
polymorphic_ptr<S> p2((llvm_move(p)));
|
polymorphic_ptr<S> p2((std::move(p)));
|
||||||
EXPECT_FALSE((bool)p);
|
EXPECT_FALSE((bool)p);
|
||||||
EXPECT_TRUE(!p);
|
EXPECT_TRUE(!p);
|
||||||
EXPECT_TRUE((bool)p2);
|
EXPECT_TRUE((bool)p2);
|
||||||
|
@ -588,7 +588,7 @@ TEST_F(FileSystemTest, FileMapping) {
|
|||||||
EC);
|
EC);
|
||||||
ASSERT_NO_ERROR(EC);
|
ASSERT_NO_ERROR(EC);
|
||||||
const char *Data = m.const_data();
|
const char *Data = m.const_data();
|
||||||
fs::mapped_file_region mfrrv(llvm_move(m));
|
fs::mapped_file_region mfrrv(std::move(m));
|
||||||
EXPECT_EQ(mfrrv.const_data(), Data);
|
EXPECT_EQ(mfrrv.const_data(), Data);
|
||||||
}
|
}
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
@ -69,7 +69,7 @@ static std::string prettyTag(yaml::Node *N) {
|
|||||||
if (StringRef(Tag).startswith("tag:yaml.org,2002:")) {
|
if (StringRef(Tag).startswith("tag:yaml.org,2002:")) {
|
||||||
std::string Ret = "!!";
|
std::string Ret = "!!";
|
||||||
Ret += StringRef(Tag).substr(18);
|
Ret += StringRef(Tag).substr(18);
|
||||||
return llvm_move(Ret);
|
return std::move(Ret);
|
||||||
}
|
}
|
||||||
std::string Ret = "!<";
|
std::string Ret = "!<";
|
||||||
Ret += Tag;
|
Ret += Tag;
|
||||||
|
Loading…
Reference in New Issue
Block a user