[llvm-branch-commits] [llvm-branch] r133701 - /llvm/branches/type-system-rewrite/lib/CodeGen/ShadowStackGC.cpp
Chris Lattner
sabre at nondot.org
Wed Jun 22 23:26:56 PDT 2011
Author: lattner
Date: Thu Jun 23 01:26:56 2011
New Revision: 133701
URL: http://llvm.org/viewvc/llvm-project?rev=133701&view=rev
Log:
fix my rework of this code to use consistent types. test/CodeGen now all passes.
Modified:
llvm/branches/type-system-rewrite/lib/CodeGen/ShadowStackGC.cpp
Modified: llvm/branches/type-system-rewrite/lib/CodeGen/ShadowStackGC.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/type-system-rewrite/lib/CodeGen/ShadowStackGC.cpp?rev=133701&r1=133700&r2=133701&view=diff
==============================================================================
--- llvm/branches/type-system-rewrite/lib/CodeGen/ShadowStackGC.cpp (original)
+++ llvm/branches/type-system-rewrite/lib/CodeGen/ShadowStackGC.cpp Thu Jun 23 01:26:56 2011
@@ -46,6 +46,7 @@
/// StackEntryTy - Abstract type of a link in the shadow stack.
///
StructType *StackEntryTy;
+ StructType *FrameMapTy;
/// Roots - GC roots in the current function. Each is a pair of the
/// intrinsic call and its corresponding alloca.
@@ -210,7 +211,7 @@
};
Constant *DescriptorElts[] = {
- ConstantStruct::get(StructType::get(Int32Ty, Int32Ty, NULL), BaseElts),
+ ConstantStruct::get(FrameMapTy, BaseElts),
ConstantArray::get(ArrayType::get(VoidPtr, NumMeta),
Metadata.begin(), NumMeta)
};
@@ -267,7 +268,7 @@
EltTys.push_back(Type::getInt32Ty(M.getContext()));
// Specifies length of variable length array.
EltTys.push_back(Type::getInt32Ty(M.getContext()));
- StructType *FrameMapTy = StructType::createNamed("gc_map", EltTys);
+ FrameMapTy = StructType::createNamed("gc_map", EltTys);
PointerType *FrameMapPtrTy = PointerType::getUnqual(FrameMapTy);
// struct StackEntry {
@@ -389,7 +390,7 @@
Instruction *CurrentHead = AtEntry.CreateLoad(Head, "gc_currhead");
Instruction *EntryMapPtr = CreateGEP(Context, AtEntry, StackEntry,
0,1,"gc_frame.map");
- AtEntry.CreateStore(FrameMap, EntryMapPtr);
+ AtEntry.CreateStore(FrameMap, EntryMapPtr);
// After all the allocas...
for (unsigned I = 0, E = Roots.size(); I != E; ++I) {
More information about the llvm-branch-commits
mailing list