// If we ever want to support other ABIs this needs to be abstracted.
QualType ETy = cast<MemberPointerType>(Ty).getPointeeType();
+ const llvm::Type *PtrDiffTy =
+ ConvertTypeRecursive(Context.getPointerDiffType());
if (ETy->isFunctionType()) {
- return llvm::StructType::get(TheModule.getContext(),
- ConvertType(Context.getPointerDiffType()),
- ConvertType(Context.getPointerDiffType()),
+ return llvm::StructType::get(TheModule.getContext(), PtrDiffTy, PtrDiffTy,
NULL);
} else
- return ConvertType(Context.getPointerDiffType());
+ return PtrDiffTy;
}
case Type::TemplateSpecialization:
--- /dev/null
+// RUN: clang-cc -emit-llvm %s -o - | FileCheck %s
+
+struct A;
+typedef int A::*param_t;
+struct {
+ const char *name;
+ param_t par;
+} *ptr;
+
+// CHECK: type { i8*, i32 }