diff options
author | Devang Patel <dpatel@apple.com> | 2008-10-01 23:41:25 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2008-10-01 23:41:25 +0000 |
commit | 7c31085b1c95290c834bc3d8d25d7b3b61b90c7b (patch) | |
tree | 724a5c4ed279c22d397e7909d8323eccaeb9e2ca /lib/VMCore/Verifier.cpp | |
parent | 4ae641f4d12c60ee1aaca5e42b6de231c6a02c40 (diff) | |
download | external_llvm-7c31085b1c95290c834bc3d8d25d7b3b61b90c7b.zip external_llvm-7c31085b1c95290c834bc3d8d25d7b3b61b90c7b.tar.gz external_llvm-7c31085b1c95290c834bc3d8d25d7b3b61b90c7b.tar.bz2 |
Attributes noinline alwaysinline are incompatible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56939 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Verifier.cpp')
-rw-r--r-- | lib/VMCore/Verifier.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 42d76ef..527b1da 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -475,6 +475,23 @@ void Verifier::VerifyFunctionAttrs(const FunctionType *FT, if (Attr.Attrs & Attribute::StructRet) Assert1(Attr.Index == 1, "Attribute sret not on first parameter!", V); } + + Attributes FAttrs = Attrs.getFnAttributes(); + for (unsigned i = 0; + i < array_lengthof(Attribute::MutuallyIncompatible); ++i) { + Attributes MutI = FAttrs & Attribute::MutuallyIncompatible[i]; + Assert1(!(MutI & (MutI - 1)), "Attributes " + + Attribute::getAsString(MutI) + " are incompatible!", V); + } + + Attributes RAttrs = Attrs.getRetAttributes(); + for (unsigned i = 0; + i < array_lengthof(Attribute::MutuallyIncompatible); ++i) { + Attributes MutI = RAttrs & Attribute::MutuallyIncompatible[i]; + Assert1(!(MutI & (MutI - 1)), "Attributes " + + Attribute::getAsString(MutI) + " are incompatible!", V); + } + } static bool VerifyAttributeCount(const AttrListPtr &Attrs, unsigned Params) { |