aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp
AgeCommit message (Collapse)Author
2012-10-25When we're devirtualizing a method call, make sure the method has the ↵Eli Friedman
correct IR type. Reported in the thread "devirtualisation appears to crash clang on covariant functions on ARM" on cfe-dev. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166651 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24A number of test cases assume that an "int" parameter or return valueUlrich Weigand
will be represented in the IR as a plain "i32" type. This causes the tests to spuriously fail on platforms where int is not a 32-bit type, or where the ABI requires attributes like "signext" or "zeroext" to be used. This patch adds -triple or -target parameters to force those tests to use the i386-unknown-unknown target. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166551 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-28Disable devirtualization when we have covariant returns. I will open a bugRafael Espindola
for tracking this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159351 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-28Don't devirtualize calls when we don't have the correct type of the this pointerRafael Espindola
handy. It can be done, but we would have to build a derived-to-base cast during codegen to compute the correct this pointer. I will handle covariant returns next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159350 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-28Fix another issue with devirtualizing calls to final methods by passing themRafael Espindola
the correct this pointer. There is some potential for sharing a bit more code with canDevirtualizeMemberFunctionCalls, but that can be done in an independent patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159326 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-26During codegen of a virtual call we would extract any casts in the expressionRafael Espindola
to see if we had an underlying final class or method, but we would then use the cast type to do the call, resulting in a direct call to the wrong method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159212 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-29When trying to get the most derived class, don't assume that we can ignore ↵Anders Carlsson
all casts. We can only ignore derived-to-base and no-op casts. Fixes selfhost. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124528 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-29When calling a virtual member function on a base class and the most derived ↵Anders Carlsson
class is marked 'final', we can devirtualize the call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124524 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-23Get rid of the [[final]] C++0x attribute.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124083 91177308-0d34-0410-b5e6-96231b3b80d8