Fix a use-after-free in SIL printSILLocation().

<rdar://problem/25727821>
This commit is contained in:
Adrian Prantl
2016-04-15 14:38:30 -07:00
parent af4be31771
commit b1a3ae480b

View File

@@ -669,7 +669,8 @@ public:
// Print inlined-at location, if any.
if (DS) {
SILFunction *InlinedF = DS->getInlinedFunction();
for (auto *CS : reversed(DS->flattenedInlineTree())) {
auto InlineScopes = DS->flattenedInlineTree();
for (auto *CS : reversed(InlineScopes)) {
*this << ": ";
if (InlinedF) {
*this << demangleSymbol(InlinedF->getName());