[PATCH] D19407: [SafeStack] [SSP] Use llvm.stackguard intrinsic.

Tim Shen via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 22 11:27:58 PDT 2016


timshen added a comment.

Sorry about insertSSPDeclarations - I don't like it neither, but I didn't know a better solution.


================
Comment at: lib/CodeGen/SafeStack.cpp:400
@@ +399,3 @@
+    TL->insertSSPDeclarations(*M);
+    Function *SG = Intrinsic::getDeclaration(M, Intrinsic::stackguard);
+    return IRB.CreateCall(SG);
----------------
You may want to take a look at "getStackGuard()" in lib/CodeGen/StackProtector.cpp and possible factor it out (SupportsSelectionDAGSP is a bit weird, sorry), since it also takes care of IR form SSP.


Repository:
  rL LLVM

http://reviews.llvm.org/D19407





More information about the llvm-commits mailing list