Move Attribute::typeIncompatible inside of the Attributes class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164629 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2012-09-25 20:38:59 +00:00
parent 1a37d7e807
commit 853a8c5f2e
5 changed files with 15 additions and 14 deletions

View File

@@ -94,16 +94,17 @@ std::string Attributes::getAsString() const {
return Result;
}
Attributes Attribute::typeIncompatible(Type *Ty) {
Attributes Incompatible = None;
Attributes Attributes::typeIncompatible(Type *Ty) {
Attributes Incompatible = Attribute::None;
if (!Ty->isIntegerTy())
// Attributes that only apply to integers.
Incompatible |= SExt | ZExt;
Incompatible |= Attribute::SExt | Attribute::ZExt;
if (!Ty->isPointerTy())
// Attributes that only apply to pointers.
Incompatible |= ByVal | Nest | NoAlias | StructRet | NoCapture;
Incompatible |= Attribute::ByVal | Attribute::Nest | Attribute::NoAlias |
Attribute::StructRet | Attribute::NoCapture;
return Incompatible;
}