aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/iMemory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/iMemory.cpp')
-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 4226a69615..7280998a17 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
//===----------------------------------------------------------------------===//