[llvm] r241646 - Redirect DataLayout from TargetMachine to Module in StackProtector
Mehdi Amini
mehdi.amini at apple.com
Tue Jul 7 16:38:49 PDT 2015
Author: mehdi_amini
Date: Tue Jul 7 18:38:49 2015
New Revision: 241646
URL: http://llvm.org/viewvc/llvm-project?rev=241646&view=rev
Log:
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 at apple.com>
Modified:
llvm/trunk/lib/CodeGen/StackProtector.cpp
Modified: llvm/trunk/lib/CodeGen/StackProtector.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/StackProtector.cpp?rev=241646&r1=241645&r2=241646&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/StackProtector.cpp (original)
+++ llvm/trunk/lib/CodeGen/StackProtector.cpp Tue Jul 7 18:38:49 2015
@@ -122,7 +122,7 @@ bool StackProtector::ContainsProtectable
// 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;
}
More information about the llvm-commits
mailing list