1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

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
This commit is contained in:
Mehdi Amini 2015-07-07 23:38:49 +00:00
parent 30bc25f375
commit 3ed1a17e45

View File

@ -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;
}