diff options
Diffstat (limited to 'lib/CodeGen/CGCXX.cpp')
-rw-r--r-- | lib/CodeGen/CGCXX.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp index 0744b79d45..ed7ee4298c 100644 --- a/lib/CodeGen/CGCXX.cpp +++ b/lib/CodeGen/CGCXX.cpp @@ -206,8 +206,14 @@ static bool canDevirtualizeMemberFunctionCalls(const Expr *Base) { // This is a record decl. We know the type and can devirtualize it. return VD->getType()->isRecordType(); } + + return false; } + // We can always devirtualize calls on temporaries. + if (isa<CXXTemporaryObjectExpr>(Base)) + return true; + // We can't devirtualize the call. return false; } |