diff options
| author | Sander de Smalen <sander.desmalen@arm.com> | 2018-02-03 13:55:59 +0000 |
|---|---|---|
| committer | Sander de Smalen <sander.desmalen@arm.com> | 2018-02-03 13:55:59 +0000 |
| commit | 891af03a55d87939f78740ffdf2e318d301384cf (patch) | |
| tree | 581031669066e3ef1f6019f86378efb4d109d067 /clang/lib/CodeGen/CGStmtOpenMP.cpp | |
| parent | 7c11527b0342803b6730ce6b2b66ba02fd182682 (diff) | |
| download | bcm5719-llvm-891af03a55d87939f78740ffdf2e318d301384cf.tar.gz bcm5719-llvm-891af03a55d87939f78740ffdf2e318d301384cf.zip | |
Recommit rL323952: [DebugInfo] Enable debug information for C99 VLA types.
Fixed build issue when building with g++-4.8 (specialization after instantiation).
llvm-svn: 324173
Diffstat (limited to 'clang/lib/CodeGen/CGStmtOpenMP.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGStmtOpenMP.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index fb919d7b028..052ebcaf389 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -237,9 +237,10 @@ llvm::Value *CodeGenFunction::getTypeSize(QualType Ty) { if (SizeInChars.isZero()) { // getTypeSizeInChars() returns 0 for a VLA. while (auto *VAT = C.getAsVariableArrayType(Ty)) { - llvm::Value *ArraySize; - std::tie(ArraySize, Ty) = getVLASize(VAT); - Size = Size ? Builder.CreateNUWMul(Size, ArraySize) : ArraySize; + auto VlaSize = getVLASize(VAT); + Ty = VlaSize.Type; + Size = Size ? Builder.CreateNUWMul(Size, VlaSize.NumElts) + : VlaSize.NumElts; } SizeInChars = C.getTypeSizeInChars(Ty); if (SizeInChars.isZero()) |

