From d79a726dc3c8af61b486948c97a183c7fe5b0179 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 22 May 2008 22:12:56 +0000 Subject: Change uses of llvm::Type::isFirstClassType to use the new llvm::Type::isSingleValueType. Currently these two functions have the same behavior, but soon isFirstClassType will return true for struct and array types. Clang may some day want to use of isFirstClassType for some of these some day as an optimization, but it'll require some consideration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51446 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenTypes.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/CodeGenTypes.cpp') diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp index 1544050155..bd375ee6a9 100644 --- a/lib/CodeGen/CodeGenTypes.cpp +++ b/lib/CodeGen/CodeGenTypes.cpp @@ -279,7 +279,7 @@ const llvm::Type *CodeGenTypes::ConvertNewType(QualType T) { std::vector ArgTys; // Struct return passes the struct byref. - if (!ResultType->isFirstClassType() && ResultType != llvm::Type::VoidTy) { + if (!ResultType->isSingleValueType() && ResultType != llvm::Type::VoidTy) { ArgTys.push_back(llvm::PointerType::get(ResultType, FP.getResultType().getAddressSpace())); ResultType = llvm::Type::VoidTy; @@ -352,7 +352,7 @@ void CodeGenTypes::DecodeArgumentTypes(const FunctionTypeProto &FTP, std::vector &ArgTys) { for (unsigned i = 0, e = FTP.getNumArgs(); i != e; ++i) { const llvm::Type *Ty = ConvertTypeRecursive(FTP.getArgType(i)); - if (Ty->isFirstClassType()) + if (Ty->isSingleValueType()) ArgTys.push_back(Ty); else // byval arguments are always on the stack, which is addr space #0. -- cgit v1.2.3-18-g5258