Dale Johannesen | 36ccdd4 | 2009-11-25 23:50:09 +0000 | [diff] [blame^] | 1 | // RUN: %llvmgxx %s -S -o - | FileCheck %s |
2 | // Make sure pointers are passed as pointers, not converted to int. | ||||
3 | // The first load should be of type i8** in either 32 or 64 bit mode. | ||||
4 | // This formerly happened on x86-64, 7375899. | ||||
5 | |||||
6 | class StringRef { | ||||
7 | public: | ||||
8 | const char *Data; | ||||
9 | long Len; | ||||
10 | }; | ||||
11 | void foo(StringRef X); | ||||
12 | void bar(StringRef &A) { | ||||
13 | // CHECK: @_Z3barR9StringRef | ||||
14 | // CHECK: load i8** | ||||
15 | foo(A); | ||||
16 | // CHECK: ret void | ||||
17 | } |