aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-02-19 21:24:17 +0000
committerChris Lattner <sabre@nondot.org>2002-02-19 21:24:17 +0000
commita9a16c712ea4af90546ab3b3d36e54dcdd9fe356 (patch)
tree8664c525995e78439f2d687f5a500e6d7b0456e9 /lib/VMCore
parentb41f94b828d12caa0ae6f3eae34d8a2d7c93eeb1 (diff)
downloadexternal_llvm-a9a16c712ea4af90546ab3b3d36e54dcdd9fe356.zip
external_llvm-a9a16c712ea4af90546ab3b3d36e54dcdd9fe356.tar.gz
external_llvm-a9a16c712ea4af90546ab3b3d36e54dcdd9fe356.tar.bz2
Fix isArrayAllocation() to be correct
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1779 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/iMemory.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/VMCore/iMemory.cpp b/lib/VMCore/iMemory.cpp
index 4226a69..7280998 100644
--- a/lib/VMCore/iMemory.cpp
+++ b/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
//===----------------------------------------------------------------------===//