summaryrefslogtreecommitdiff
path: root/lib/CodeGen/ShadowStackGC.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-08-12 18:06:37 +0000
committerChris Lattner <sabre@nondot.org>2011-08-12 18:06:37 +0000
commit3ebb64946bc8e7c8feba1b2044e7a47f80b3a83f (patch)
treee4efc3e54eb1eb577da0946a1d223030101839b5 /lib/CodeGen/ShadowStackGC.cpp
parent8dcfc74af42cca1feecd3331dd11b494b0f02792 (diff)
downloadllvm-3ebb64946bc8e7c8feba1b2044e7a47f80b3a83f.tar.gz
llvm-3ebb64946bc8e7c8feba1b2044e7a47f80b3a83f.tar.bz2
llvm-3ebb64946bc8e7c8feba1b2044e7a47f80b3a83f.tar.xz
switch to use the new api for structtypes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137480 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ShadowStackGC.cpp')
-rw-r--r--lib/CodeGen/ShadowStackGC.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/ShadowStackGC.cpp b/lib/CodeGen/ShadowStackGC.cpp
index daab89b8f2..bccb3b9927 100644
--- a/lib/CodeGen/ShadowStackGC.cpp
+++ b/lib/CodeGen/ShadowStackGC.cpp
@@ -218,7 +218,7 @@ Constant *ShadowStackGC::GetFrameMap(Function &F) {
};
Type *EltTys[] = { DescriptorElts[0]->getType(),DescriptorElts[1]->getType()};
- StructType *STy = StructType::createNamed("gc_map."+utostr(NumMeta), EltTys);
+ StructType *STy = StructType::create(EltTys, "gc_map."+utostr(NumMeta));
Constant *FrameMap = ConstantStruct::get(STy, DescriptorElts);
@@ -253,7 +253,7 @@ Type* ShadowStackGC::GetConcreteStackEntryType(Function &F) {
for (size_t I = 0; I != Roots.size(); I++)
EltTys.push_back(Roots[I].second->getAllocatedType());
- return StructType::createNamed("gc_stackentry."+F.getName().str(), EltTys);
+ return StructType::create(EltTys, "gc_stackentry."+F.getName().str());
}
/// doInitialization - If this module uses the GC intrinsics, find them now. If
@@ -269,7 +269,7 @@ bool ShadowStackGC::initializeCustomLowering(Module &M) {
EltTys.push_back(Type::getInt32Ty(M.getContext()));
// Specifies length of variable length array.
EltTys.push_back(Type::getInt32Ty(M.getContext()));
- FrameMapTy = StructType::createNamed("gc_map", EltTys);
+ FrameMapTy = StructType::create(EltTys, "gc_map");
PointerType *FrameMapPtrTy = PointerType::getUnqual(FrameMapTy);
// struct StackEntry {
@@ -278,7 +278,7 @@ bool ShadowStackGC::initializeCustomLowering(Module &M) {
// void *Roots[]; // Stack roots (in-place array, so we pretend).
// };
- StackEntryTy = StructType::createNamed(M.getContext(), "gc_stackentry");
+ StackEntryTy = StructType::create(M.getContext(), "gc_stackentry");
EltTys.clear();
EltTys.push_back(PointerType::getUnqual(StackEntryTy));