[MS-ABI] Implement dynamic_cast
authorWarren Hunt <whunt@google.com>
Fri, 6 Jun 2014 22:12:37 +0000 (22:12 +0000)
committerWarren Hunt <whunt@google.com>
Fri, 6 Jun 2014 22:12:37 +0000 (22:12 +0000)
commitb57b4b098cb5f87d30473f0ae5ad6b665d19e0db
tree1a7c73c3ba37bc44a5912b3ce770e76b460f783c
parent58f770ffa4794934e6d08b8c583108a7ad5fc4a2
[MS-ABI] Implement dynamic_cast
This patch implements call lower from dynamic_cast to __RTDynamicCast
and __RTCastToVoid.  Test cases are included.  A feature of note is that
helper function getPolymorphicOffset is placed in such a way that it can
be used by EmitTypeid (to be implemented in a later patch) without being
moved.  Details are included as comments directly in the code.

llvm-svn: 210377
clang/lib/CodeGen/CGExprCXX.cpp
clang/test/CodeGenCXX/microsoft-abi-dynamic-cast.cpp [new file with mode: 0644]