diff options
author | John McCall <rjmccall@apple.com> | 2010-02-24 07:14:12 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-02-24 07:14:12 +0000 |
commit | 0b0ef0a70b8010c66fad2603e4423ef1c1dc7015 (patch) | |
tree | 966868d3abb3d5a6fbd635c376ea266afe069a19 /test/CodeGen/functions.c | |
parent | 152e785ce6cbbc068a5240daf7f3daacc7000bf4 (diff) |
Canonicalize parameter and return types before computing ABI info. Eliminates
a common source of oddities and, in theory, removes some redundant ABI
computations. Also fixes a miscompile I introduced yesterday by refactoring
some code and causing a slightly different code path to be taken that
didn't perform *parameter* type canonicalization, just normal type
canonicalization; this in turn caused a bit of ABI code to misfire because
it was looking for 'double' or 'float' but received 'const float'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97030 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/functions.c')
-rw-r--r-- | test/CodeGen/functions.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/CodeGen/functions.c b/test/CodeGen/functions.c index cb9a4ef81f..d9c87d53ed 100644 --- a/test/CodeGen/functions.c +++ b/test/CodeGen/functions.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -emit-llvm -o %t +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s int g(); @@ -38,3 +38,12 @@ struct foo { int X, Y, Z; } f3() { // PR4423 - This shouldn't crash in codegen void f4() {} void f5() { f4(42); } + +// Qualifiers on parameter types shouldn't make a difference. +static void f6(const float f, const float g) { +} +void f7(float f, float g) { + f6(f, g); +// CHECK: define void @f7(float{{.*}}, float{{.*}}) +// CHECK: call void @f6(float{{.*}}, float{{.*}}) +} |