diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2015-07-07 23:38:49 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2015-07-07 23:38:49 +0000 |
commit | ed6edbf17a09f49c0e5415ff5bc119c938f23398 (patch) | |
tree | ec1a33409bf5bd01c852e175ce3213e02328bfac /llvm/lib/CodeGen/StackProtector.cpp | |
parent | 900b5cb2aba6a212f3e3b98e26248df242b8a0aa (diff) | |
download | bcm5719-llvm-ed6edbf17a09f49c0e5415ff5bc119c938f23398.tar.gz bcm5719-llvm-ed6edbf17a09f49c0e5415ff5bc119c938f23398.zip |
Redirect DataLayout from TargetMachine to Module in StackProtector
Summary:
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.
Reviewers: echristo
Subscribers: llvm-commits, rafael, yaron.keren
Differential Revision: http://reviews.llvm.org/D11010
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 241646
Diffstat (limited to 'llvm/lib/CodeGen/StackProtector.cpp')
-rw-r--r-- | llvm/lib/CodeGen/StackProtector.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/StackProtector.cpp b/llvm/lib/CodeGen/StackProtector.cpp index 0824d6f91db..bcea37a3aaf 100644 --- a/llvm/lib/CodeGen/StackProtector.cpp +++ b/llvm/lib/CodeGen/StackProtector.cpp @@ -122,7 +122,7 @@ bool StackProtector::ContainsProtectableArray(Type *Ty, bool &IsLarge, // 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; } |