diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-07-23 15:58:24 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-07-23 15:58:24 +0000 |
commit | 5cc2c8b9c307edd156cc4622490a2f9447d90702 (patch) | |
tree | 831021265eb313e4753dedf04ae1eb95ca19e4aa /clang/lib/CodeGen/CGCall.cpp | |
parent | 572404311a67b22557f3716bc0e8842250e05c85 (diff) | |
download | bcm5719-llvm-5cc2c8b9c307edd156cc4622490a2f9447d90702.tar.gz bcm5719-llvm-5cc2c8b9c307edd156cc4622490a2f9447d90702.zip |
Vectors are not integer types, so the type system should not classify
them as such. Type::is(Signed|Unsigned|)IntegerType() now return false
for vector types, and new functions
has(Signed|Unsigned|)IntegerRepresentation() cover integer types and
vector-of-integer types. This fixes a bunch of latent bugs.
Patch from Anton Yartsev!
llvm-svn: 109229
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index b22e349d952..30b2b6e1201 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -730,9 +730,9 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, const ABIArgInfo &RetAI = FI.getReturnInfo(); switch (RetAI.getKind()) { case ABIArgInfo::Extend: - if (RetTy->isSignedIntegerType()) { + if (RetTy->hasSignedIntegerRepresentation()) { RetAttrs |= llvm::Attribute::SExt; - } else if (RetTy->isUnsignedIntegerType()) { + } else if (RetTy->hasUnsignedIntegerRepresentation()) { RetAttrs |= llvm::Attribute::ZExt; } // FALLTHROUGH |