aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Verifier.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2007-11-27 13:23:08 +0000
committerDuncan Sands <baldrick@free.fr>2007-11-27 13:23:08 +0000
commitdc024674ff96820d6020757b48d47f46d4c07db2 (patch)
tree843dfcaeb8f6c99de930a32020148b563005c2fd /lib/VMCore/Verifier.cpp
parentf19341dec7361451f100a882a023b14583454d7e (diff)
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
Diffstat (limited to 'lib/VMCore/Verifier.cpp')
-rw-r--r--lib/VMCore/Verifier.cpp6
1 files changed, 3 insertions, 3 deletions
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.