From 20268a4725828e708649d483bba702209eb9aa0e Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Fri, 1 Sep 2017 08:29:32 -0700 Subject: [PATCH] Code cleanup. --- lib/Transforms/Scalar/ScalarReplAggregatesHLSL.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/Scalar/ScalarReplAggregatesHLSL.cpp b/lib/Transforms/Scalar/ScalarReplAggregatesHLSL.cpp index 933fbfe88..8b8c5c82d 100644 --- a/lib/Transforms/Scalar/ScalarReplAggregatesHLSL.cpp +++ b/lib/Transforms/Scalar/ScalarReplAggregatesHLSL.cpp @@ -1541,7 +1541,7 @@ bool SROA_HLSL::performScalarRepl(Function &F, DxilTypeSystem &typeSys) { // alloca. Big alloca will be split to smaller piece first, when process the // alloca, it will be alloca flattened from big alloca instead of a GEP of big // alloca. - auto size_cmp = [&](AllocaInst *a0, AllocaInst *a1) -> bool { + auto size_cmp = [&DL](const AllocaInst *a0, const AllocaInst *a1) -> bool { return DL.getTypeAllocSize(a0->getAllocatedType()) > DL.getTypeAllocSize(a1->getAllocatedType()); };