[PATCH] D15365: Cross-DSO control flow integrity (LLVM part)
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 14 16:02:53 PST 2015
pcc added a comment.
Sorry, a few other nits I noticed.
================
Comment at: lib/Transforms/IPO/CrossDSOCFI.cpp:121
@@ +120,3 @@
+ Argument &Arg0 = *(args++);
+ Value *TypeId = dyn_cast<Value>(&Arg0);
+ TypeId->setName("CallSiteTypeId");
----------------
You don't need to cast this.
================
Comment at: lib/Transforms/IPO/CrossDSOCFI.cpp:124
@@ +123,3 @@
+ Argument &Arg1 = *(args++);
+ Value *Addr = dyn_cast<Value>(&Arg1);
+ Addr->setName("Addr");
----------------
Same here.
================
Comment at: lib/Transforms/IPO/CrossDSOCFI.cpp:144
@@ +143,3 @@
+ SwitchInst *SI = IRB.CreateSwitch(TypeId, TrapBB, BitSetIds.size());
+ for (uint64_t TypeId : BitSetIds) {
+ ConstantInt *CaseTypeId = ConstantInt::get(Type::getInt64Ty(Ctx), TypeId);
----------------
Don't shadow `TypeId`.
Repository:
rL LLVM
http://reviews.llvm.org/D15365
More information about the llvm-commits
mailing list