mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-01 08:47:42 +00:00
[Debugify] Handled unsized types
llvm-svn: 321918
This commit is contained in:
parent
740b9e13ef
commit
0941370e24
@ -1,5 +1,6 @@
|
||||
; RUN: opt -S -argpromotion < %s | FileCheck %s
|
||||
; RUN: opt -S -passes=argpromotion < %s | FileCheck %s
|
||||
; RUN: opt -S -debugify -o /dev/null < %s
|
||||
target triple = "x86_64-pc-windows-msvc"
|
||||
|
||||
define internal void @callee(i8*) {
|
||||
|
@ -47,7 +47,8 @@ bool applyDebugifyMetadata(Module &M) {
|
||||
// Get a DIType which corresponds to Ty.
|
||||
DenseMap<uint64_t, DIType *> TypeCache;
|
||||
auto getCachedDIType = [&](Type *Ty) -> DIType * {
|
||||
uint64_t Size = M.getDataLayout().getTypeAllocSizeInBits(Ty);
|
||||
uint64_t Size =
|
||||
Ty->isSized() ? M.getDataLayout().getTypeAllocSizeInBits(Ty) : 0;
|
||||
DIType *&DTy = TypeCache[Size];
|
||||
if (!DTy) {
|
||||
std::string Name = "ty" + utostr(Size);
|
||||
|
Loading…
x
Reference in New Issue
Block a user