[PATCH] D11010: Redirect DataLayout from TargetMachine to Module in SjLjEHPrepare

Mehdi AMINI mehdi.amini at apple.com
Tue Jul 7 12:51:28 PDT 2015


joker.eph added a reviewer: echristo.
joker.eph added subscribers: yaron.keren, rafael, llvm-commits.

This change is part of a series of commits dedicated to have a single
DataLayout during compilation by using always the one owned by the
module.

http://reviews.llvm.org/D11010

Files:
  lib/CodeGen/StackProtector.cpp

Index: lib/CodeGen/StackProtector.cpp
===================================================================
--- lib/CodeGen/StackProtector.cpp
+++ lib/CodeGen/StackProtector.cpp
@@ -122,7 +122,7 @@
 
     // If an array has more than SSPBufferSize bytes of allocated space, then we
     // emit stack protectors.
-    if (SSPBufferSize <= TLI->getDataLayout()->getTypeAllocSize(AT)) {
+    if (SSPBufferSize <= M->getDataLayout().getTypeAllocSize(AT)) {
       IsLarge = true;
       return true;
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11010.29204.patch
Type: text/x-patch
Size: 502 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150707/44a7fd2c/attachment.bin>


More information about the llvm-commits mailing list