summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenTypes.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-02-26 00:48:12 +0000
committerJohn McCall <rjmccall@apple.com>2010-02-26 00:48:12 +0000
commitead608af31b6c9abeae1ca6d0b75094dac4641c0 (patch)
tree88bbdebfe43b5a44920a1f2d72d7e037068a261a /lib/CodeGen/CodeGenTypes.cpp
parent1af745143eb3066660d8855c17ccec6b38f5d789 (diff)
downloadclang-ead608af31b6c9abeae1ca6d0b75094dac4641c0.tar.gz
clang-ead608af31b6c9abeae1ca6d0b75094dac4641c0.tar.bz2
clang-ead608af31b6c9abeae1ca6d0b75094dac4641c0.tar.xz
Use the power of types to track down another canonicalization bug in
the ABI-computation interface. Fixes <rdar://problem/7691046>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97197 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.cpp')
-rw-r--r--lib/CodeGen/CodeGenTypes.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp
index 3c20934baf..f30e03c8c9 100644
--- a/lib/CodeGen/CodeGenTypes.cpp
+++ b/lib/CodeGen/CodeGenTypes.cpp
@@ -313,10 +313,14 @@ const llvm::Type *CodeGenTypes::ConvertNewType(QualType T) {
// The function type can be built; call the appropriate routines to
// build it.
if (const FunctionProtoType *FPT = dyn_cast<FunctionProtoType>(&Ty))
- return GetFunctionType(getFunctionInfo(FPT), FPT->isVariadic());
+ return GetFunctionType(getFunctionInfo(
+ CanQual<FunctionProtoType>::CreateUnsafe(QualType(FPT,0))),
+ FPT->isVariadic());
const FunctionNoProtoType *FNPT = cast<FunctionNoProtoType>(&Ty);
- return GetFunctionType(getFunctionInfo(FNPT), true);
+ return GetFunctionType(getFunctionInfo(
+ CanQual<FunctionNoProtoType>::CreateUnsafe(QualType(FNPT,0))),
+ true);
}
case Type::ObjCInterface: {