diff options
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenTypes.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp index 1402af14a5..5ab65c5779 100644 --- a/lib/CodeGen/CodeGenTypes.cpp +++ b/lib/CodeGen/CodeGenTypes.cpp @@ -402,17 +402,7 @@ const llvm::Type *CodeGenTypes::ConvertNewType(QualType T) { } case Type::MemberPointer: { - // FIXME: This is ABI dependent. We use the Itanium C++ ABI. - // http://www.codesourcery.com/public/cxx-abi/abi.html#member-pointers - // 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(), PtrDiffTy, PtrDiffTy, - NULL); - return PtrDiffTy; + return getCXXABI().ConvertMemberPointerType(cast<MemberPointerType>(&Ty)); } } |