mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Use null instead of undef for unneeded nested context pointers.
This commit is contained in:
@@ -235,7 +235,10 @@ LLValue* DtoNestedContext(Loc loc, Dsymbol* sym)
|
||||
}
|
||||
else
|
||||
{
|
||||
return llvm::UndefValue::get(getVoidPtrType());
|
||||
// Use null instead of e.g. LLVM's undef to not break bitwise
|
||||
// comparison for instances of nested struct types which don't have any
|
||||
// nested references.
|
||||
return llvm::ConstantPointerNull::get(getVoidPtrType());
|
||||
}
|
||||
|
||||
struct FuncDeclaration* fd = 0;
|
||||
|
||||
Reference in New Issue
Block a user