From dc024674ff96820d6020757b48d47f46d4c07db2 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Tue, 27 Nov 2007 13:23:08 +0000 Subject: Fix PR1146: parameter attributes are longer part of the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44359 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/Verifier.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/VMCore/Verifier.cpp') diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index a547721d68..eb7c90f01c 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -390,12 +390,12 @@ void Verifier::visitFunction(Function &F) { F.getReturnType() == Type::VoidTy, "Functions cannot return aggregate values!", &F); - Assert1(!FT->isStructReturn() || FT->getReturnType() == Type::VoidTy, + Assert1(!F.isStructReturn() || FT->getReturnType() == Type::VoidTy, "Invalid struct-return function!", &F); bool SawSRet = false; - if (const ParamAttrsList *Attrs = FT->getParamAttrs()) { + if (const ParamAttrsList *Attrs = F.getParamAttrs()) { bool SawNest = false; for (unsigned Idx = 0; Idx <= FT->getNumParams(); ++Idx) { @@ -448,7 +448,7 @@ void Verifier::visitFunction(Function &F) { } } - Assert1(SawSRet == FT->isStructReturn(), + Assert1(SawSRet == F.isStructReturn(), "StructReturn function with no sret attribute!", &F); // Check that this function meets the restrictions on this calling convention. -- cgit v1.2.3-70-g09d2