SILDebugScope: Add accessors for the parent SIL functions and use them in

assertions. (NFC)
This commit is contained in:
Adrian Prantl
2016-02-03 14:34:19 -08:00
parent e0e83d3bf9
commit 0854b3ce6d
8 changed files with 39 additions and 43 deletions

View File

@@ -507,8 +507,8 @@ PromotedParamCloner::PromotedParamCloner(SILFunction *Orig,
PromotedParamIndices,
ClonedName)),
Orig(Orig), PromotedParamIndices(PromotedParamIndices) {
assert(Orig->getDebugScope()->getFunction() !=
getCloned()->getDebugScope()->getFunction());
assert(Orig->getDebugScope()->getParentFunction() !=
getCloned()->getDebugScope()->getParentFunction());
}
static std::string getClonedName(SILFunction *F,