File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -2182,11 +2182,6 @@ void IRGenDebugInfoImpl::emitVariableDeclaration(
2182
2182
if (Indirection)
2183
2183
Operands.push_back (llvm::dwarf::DW_OP_deref);
2184
2184
2185
- // There are variables without storage, such as "struct { func foo() {}
2186
- // }". Emit them as constant 0.
2187
- if (isa<llvm::UndefValue>(Piece))
2188
- Piece = llvm::ConstantInt::get (IGM.Int64Ty , 0 );
2189
-
2190
2185
if (IsPiece) {
2191
2186
// Advance the offset and align it for the next piece.
2192
2187
OffsetInBits += llvm::alignTo (SizeInBits, AlignInBits);
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ struct AStruct {}
25
25
26
26
// CHECK2: define{{.*}}app
27
27
public func app( ) {
28
- // No members? No storage! Emitted as a constant 0, because.
29
- // CHECK2: call void @llvm.dbg.value(metadata i {{.*}} 0 ,
28
+ // No members? No storage!
29
+ // CHECK2: call void @llvm.dbg.value(metadata {{.*}}* undef ,
30
30
// CHECK2-SAME: metadata ![[AT:.*]], metadata
31
31
// CHECK2: ![[AT]] = !DILocalVariable(name: "at",{{.*}}line: [[@LINE+1]]
32
32
var at = AStruct ( )
You can’t perform that action at this time.
0 commit comments