[gardening] Move ValueBase::RAUW from SIL.cpp => SILValue.cpp.

This commit is contained in:
Michael Gottesman
2016-12-14 15:44:31 -08:00
parent 671bc4661b
commit 26b37f1641
2 changed files with 9 additions and 9 deletions

View File

@@ -27,17 +27,9 @@
#include "clang/AST/Attr.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclObjC.h"
using namespace swift;
void ValueBase::replaceAllUsesWith(ValueBase *RHS) {
assert(this != RHS && "Cannot RAUW a value with itself");
while (!use_empty()) {
Operand *Op = *use_begin();
Op->set(RHS);
}
}
SILUndef *SILUndef::get(SILType Ty, SILModule *M) {
// Unique these.
SILUndef *&Entry = M->UndefValues[Ty];