aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX
diff options
context:
space:
mode:
authorMark Seaborn <mseaborn@chromium.org>2013-06-19 15:25:12 -0700
committerMark Seaborn <mseaborn@chromium.org>2013-06-19 15:25:12 -0700
commitbdfbe91f5f6db852e3e91d6830a82b323c4dd846 (patch)
tree5aef741c85c6456f0b2081c02ead0897700f7b61 /test/CodeGenCXX
parent9c3c7b3130bc72b3f50703c11b85152b1264fc90 (diff)
Use ARM-style representation for C++ method pointers under PNaCl
This avoids baking into pexes an assumption that function pointers are 0 mod 2, which might not be the case in future sandboxing models. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3450 TEST=run_method_pointer_repr_test in NaCl + llvm-lit test Review URL: https://codereview.chromium.org/17419005
Diffstat (limited to 'test/CodeGenCXX')
-rw-r--r--test/CodeGenCXX/member-function-pointers.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/CodeGenCXX/member-function-pointers.cpp b/test/CodeGenCXX/member-function-pointers.cpp
index 84b54b67d3..23a7b0009f 100644
--- a/test/CodeGenCXX/member-function-pointers.cpp
+++ b/test/CodeGenCXX/member-function-pointers.cpp
@@ -4,6 +4,9 @@
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=i386-unknown-unknown | FileCheck -check-prefix GLOBAL-LP32 %s
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv7-unknown-unknown | FileCheck -check-prefix GLOBAL-ARM %s
+// PNaCl uses the same representation of method pointers as ARM.
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=le32-unknown-nacl | FileCheck -check-prefix GLOBAL-ARM %s
+
struct A { int a; void f(); virtual void vf1(); virtual void vf2(); };
struct B { int b; virtual void g(); };
struct C : B, A { };