diff options
| author | Chris Lattner <sabre@nondot.org> | 2002-02-19 21:24:17 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2002-02-19 21:24:17 +0000 |
| commit | 480fa41d2ce8775dd7cd831e89858d56d995baa7 (patch) | |
| tree | 292e6c785dd68a072a10174063db90af3aa4168b /llvm/lib | |
| parent | a92055e3206bd3bdf42773fda58b94080d979f50 (diff) | |
| download | bcm5719-llvm-480fa41d2ce8775dd7cd831e89858d56d995baa7.tar.gz bcm5719-llvm-480fa41d2ce8775dd7cd831e89858d56d995baa7.zip | |
Fix isArrayAllocation() to be correct
llvm-svn: 1779
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/VMCore/iMemory.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/iMemory.cpp b/llvm/lib/VMCore/iMemory.cpp index 4226a696157..7280998a17d 100644 --- a/llvm/lib/VMCore/iMemory.cpp +++ b/llvm/lib/VMCore/iMemory.cpp @@ -5,12 +5,18 @@ //===----------------------------------------------------------------------===// #include "llvm/iMemory.h" +#include "llvm/ConstantVals.h" static inline const Type *checkType(const Type *Ty) { assert(Ty && "Invalid indices for type!"); return Ty; } +bool AllocationInst::isArrayAllocation() const { + return getNumOperands() == 1 && + getOperand(0) != ConstantUInt::get(Type::UIntTy, 1); +} + //===----------------------------------------------------------------------===// // MemAccessInst Implementation //===----------------------------------------------------------------------===// |

