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
This commit is contained in:
Chris Lattner
2011-08-12 18:06:37 +00:00
parent 8dcfc74af4
commit 3ebb64946b
7 changed files with 18 additions and 18 deletions
+4 -4
View File
@@ -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));