summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ShadowStackGC.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-06-22 09:24:39 +0000
committerJay Foad <jay.foad@gmail.com>2011-06-22 09:24:39 +0000
commit83be361b8a995f1b234ac5728f4d120488a9c886 (patch)
tree6789e7a4e8b7bf396f5b1792d5099dc5ff0eb98d /llvm/lib/CodeGen/ShadowStackGC.cpp
parentb8a8bed30117db3f80076edc66cb032dc20d2949 (diff)
downloadbcm5719-llvm-83be361b8a995f1b234ac5728f4d120488a9c886.tar.gz
bcm5719-llvm-83be361b8a995f1b234ac5728f4d120488a9c886.zip
Replace the existing forms of ConstantArray::get() with a single form
that takes an ArrayRef. llvm-svn: 133615
Diffstat (limited to 'llvm/lib/CodeGen/ShadowStackGC.cpp')
-rw-r--r--llvm/lib/CodeGen/ShadowStackGC.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/ShadowStackGC.cpp b/llvm/lib/CodeGen/ShadowStackGC.cpp
index 94dc3ed4755..ff58b221cb0 100644
--- a/llvm/lib/CodeGen/ShadowStackGC.cpp
+++ b/llvm/lib/CodeGen/ShadowStackGC.cpp
@@ -201,6 +201,7 @@ Constant *ShadowStackGC::GetFrameMap(Function &F) {
NumMeta = I + 1;
Metadata.push_back(ConstantExpr::getBitCast(C, VoidPtr));
}
+ Metadata.resize(NumMeta);
const Type *Int32Ty = Type::getInt32Ty(F.getContext());
@@ -211,8 +212,7 @@ Constant *ShadowStackGC::GetFrameMap(Function &F) {
Constant *DescriptorElts[] = {
ConstantStruct::get(StructType::get(Int32Ty, Int32Ty, NULL), BaseElts),
- ConstantArray::get(ArrayType::get(VoidPtr, NumMeta),
- Metadata.begin(), NumMeta)
+ ConstantArray::get(ArrayType::get(VoidPtr, NumMeta), Metadata)
};
Constant *FrameMap =
OpenPOWER on IntegriCloud