annotate clang/test/CodeGenCXX/m64-ptr.cpp @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 %s -emit-llvm -triple x86_64-apple-darwin -o - | FileCheck %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 // Make sure pointers are passed as pointers, not converted to int.
anatofuz
parents:
diff changeset
4 // The first load should be of type i8** in either 32 or 64 bit mode.
anatofuz
parents:
diff changeset
5 // This formerly happened on x86-64, 7375899.
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 class StringRef {
anatofuz
parents:
diff changeset
8 public:
anatofuz
parents:
diff changeset
9 const char *Data;
anatofuz
parents:
diff changeset
10 long Len;
anatofuz
parents:
diff changeset
11 };
anatofuz
parents:
diff changeset
12 void foo(StringRef X);
anatofuz
parents:
diff changeset
13 void bar(StringRef &A) {
anatofuz
parents:
diff changeset
14 // CHECK: @_Z3barR9StringRef
anatofuz
parents:
diff changeset
15 // CHECK: load i8*, i8**
anatofuz
parents:
diff changeset
16 foo(A);
anatofuz
parents:
diff changeset
17 // CHECK: ret void
anatofuz
parents:
diff changeset
18 }