summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/virtual-base-cast.cpp
diff options
context:
space:
mode:
authorWarren Hunt <whunt@google.com>2014-01-14 00:31:30 +0000
committerWarren Hunt <whunt@google.com>2014-01-14 00:31:30 +0000
commit6eba90710273be713b1f2736ce6d9c97bcf2f8be (patch)
tree1fff8a75dbf373f1d77b3666231d78845303312b /clang/test/CodeGenCXX/virtual-base-cast.cpp
parentca9e99fe50cefd6854755a99d3764a4bc7927de3 (diff)
downloadbcm5719-llvm-6eba90710273be713b1f2736ce6d9c97bcf2f8be.tar.gz
bcm5719-llvm-6eba90710273be713b1f2736ce6d9c97bcf2f8be.zip
[ms-abi] Report VBPtrOffset correctly
Although VBPtrs were being placed correctly by the ms-abi layout engine, their offsets were being improperly reported to the ASTRecordLayout builder due to a bug. This patch fixes that and fixes the test cases to use the correct values. y llvm-svn: 199168
Diffstat (limited to 'clang/test/CodeGenCXX/virtual-base-cast.cpp')
-rw-r--r--clang/test/CodeGenCXX/virtual-base-cast.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/CodeGenCXX/virtual-base-cast.cpp b/clang/test/CodeGenCXX/virtual-base-cast.cpp
index e35f41e1cae..40e68f67223 100644
--- a/clang/test/CodeGenCXX/virtual-base-cast.cpp
+++ b/clang/test/CodeGenCXX/virtual-base-cast.cpp
@@ -77,13 +77,13 @@ BB* d() { return y; }
// Same as 'c' except the vbptr offset is 4, changing the initial GEP and the
// final add.
// MSVC: @"\01?d@@YAPAUBB@@XZ"() [[NUW:#[0-9]+]] {
-// MSVC: %[[vbptr_off:.*]] = getelementptr inbounds i8* {{.*}}, i32 12
+// MSVC: %[[vbptr_off:.*]] = getelementptr inbounds i8* {{.*}}, i32 4
// MSVC: %[[vbptr:.*]] = bitcast i8* %[[vbptr_off]] to i8**
// MSVC: %[[vbtable:.*]] = load i8** %[[vbptr]]
// MSVC: %[[entry:.*]] = getelementptr inbounds i8* {{.*}}, i32 16
// MSVC: %[[entry_i32:.*]] = bitcast i8* %[[entry]] to i32*
// MSVC: %[[offset:.*]] = load i32* %[[entry_i32]]
-// MSVC: add nsw i32 12, %[[offset]]
+// MSVC: add nsw i32 4, %[[offset]]
// MSVC: }
// CHECK: attributes [[NUW]] = { nounwind{{.*}} }
OpenPOWER on IntegriCloud