summaryrefslogtreecommitdiffstats
path: root/test/FrontendC++/m64-ptr.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2009-12-01 11:07:05 +0000
committerrdivacky <rdivacky@FreeBSD.org>2009-12-01 11:07:05 +0000
commite7908924d847e63b02bc82bfaa1709ab9c774dcd (patch)
treeffe0478472eaa0686f11cb02c6df7d257b8719b0 /test/FrontendC++/m64-ptr.cpp
parentbf68f1ea49e39c4194f339ddd4421b0c3a31988b (diff)
downloadFreeBSD-src-e7908924d847e63b02bc82bfaa1709ab9c774dcd.zip
FreeBSD-src-e7908924d847e63b02bc82bfaa1709ab9c774dcd.tar.gz
Update LLVM to r90226.
Diffstat (limited to 'test/FrontendC++/m64-ptr.cpp')
-rw-r--r--test/FrontendC++/m64-ptr.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/FrontendC++/m64-ptr.cpp b/test/FrontendC++/m64-ptr.cpp
new file mode 100644
index 0000000..7685cfe
--- /dev/null
+++ b/test/FrontendC++/m64-ptr.cpp
@@ -0,0 +1,18 @@
+// RUN: %llvmgxx %s -S -o - | FileCheck %s
+
+// Make sure pointers are passed as pointers, not converted to int.
+// The first load should be of type i8** in either 32 or 64 bit mode.
+// This formerly happened on x86-64, 7375899.
+
+class StringRef {
+public:
+ const char *Data;
+ long Len;
+};
+void foo(StringRef X);
+void bar(StringRef &A) {
+// CHECK: @_Z3barR9StringRef
+// CHECK: load i8**
+ foo(A);
+// CHECK: ret void
+}
OpenPOWER on IntegriCloud