r231739 - Update for LLVM API change: getOrEnforceKnownAlignment() requires a DataLayout

Mehdi Amini mehdi.amini at apple.com
Mon Mar 9 19:36:43 PDT 2015


Author: mehdi_amini
Date: Mon Mar  9 21:36:43 2015
New Revision: 231739

URL: http://llvm.org/viewvc/llvm-project?rev=231739&view=rev
Log:
Update for LLVM API change: getOrEnforceKnownAlignment() requires a DataLayout

From: Mehdi Amini <mehdi.amini at apple.com>

Modified:
    cfe/trunk/lib/CodeGen/CGCall.cpp

Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=231739&r1=231738&r2=231739&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Mon Mar  9 21:36:43 2015
@@ -3102,8 +3102,8 @@ RValue CodeGenFunction::EmitCall(const C
                  : 0);
         if ((!ArgInfo.getIndirectByVal() && I->NeedsCopy) ||
             (ArgInfo.getIndirectByVal() && TypeAlign.getQuantity() < Align &&
-             llvm::getOrEnforceKnownAlignment(Addr, Align, TD) < Align) ||
-             (ArgInfo.getIndirectByVal() && (RVAddrSpace != ArgAddrSpace))) {
+             llvm::getOrEnforceKnownAlignment(Addr, Align, *TD) < Align) ||
+            (ArgInfo.getIndirectByVal() && (RVAddrSpace != ArgAddrSpace))) {
           // Create an aligned temporary, and copy to it.
           llvm::AllocaInst *AI = CreateMemTemp(I->Ty);
           if (Align > AI->getAlignment())





More information about the cfe-commits mailing list