llvm.org GIT mirror llvm / 0434c3b
[Debugify] Handled unsized types git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321918 91177308-0d34-0410-b5e6-96231b3b80d8 Vedant Kumar 1 year, 8 months ago
2 changed file(s) with 3 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: opt -S -argpromotion < %s | FileCheck %s
11 ; RUN: opt -S -passes=argpromotion < %s | FileCheck %s
2 ; RUN: opt -S -debugify -o /dev/null < %s
23 target triple = "x86_64-pc-windows-msvc"
34
45 define internal void @callee(i8*) {
4646 // Get a DIType which corresponds to Ty.
4747 DenseMap TypeCache;
4848 auto getCachedDIType = [&](Type *Ty) -> DIType * {
49 uint64_t Size = M.getDataLayout().getTypeAllocSizeInBits(Ty);
49 uint64_t Size =
50 Ty->isSized() ? M.getDataLayout().getTypeAllocSizeInBits(Ty) : 0;
5051 DIType *&DTy = TypeCache[Size];
5152 if (!DTy) {
5253 std::string Name = "ty" + utostr(Size);