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 @@ -2169,11 +2169,6 @@ void IRGenDebugInfoImpl::emitVariableDeclaration(
2169
2169
if (Indirection)
2170
2170
Operands.push_back (llvm::dwarf::DW_OP_deref);
2171
2171
2172
- // There are variables without storage, such as "struct { func foo() {}
2173
- // }". Emit them as constant 0.
2174
- if (isa<llvm::UndefValue>(Piece))
2175
- Piece = llvm::ConstantInt::get (IGM.Int64Ty , 0 );
2176
-
2177
2172
if (IsPiece) {
2178
2173
// Advance the offset and align it for the next piece.
2179
2174
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