From 02fe58d85a082e5e10010c6f9fa47e78df09cf30 Mon Sep 17 00:00:00 2001 From: theraven Date: Sun, 20 Nov 2011 21:21:22 +0000 Subject: [PATCH] Fix use-after-free in speculative inlining pass. --- opts/ClassMethodInliner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opts/ClassMethodInliner.cpp b/opts/ClassMethodInliner.cpp index fb1c293..f7a77e0 100644 --- a/opts/ClassMethodInliner.cpp +++ b/opts/ClassMethodInliner.cpp @@ -80,7 +80,7 @@ namespace cast(messageType->getOperand(1))->getString(); bool isClassMethod = cast(messageType->getOperand(2))->isOne(); - StringRef functionName = SymbolNameForMethod(cls, "", sel, isClassMethod); + std::string functionName = SymbolNameForMethod(cls, "", sel, isClassMethod); Function *method = M.getFunction(functionName); if (0 == method || method->isDeclaration()) { continue; }