mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-08-19 12:50:04 +02:00
DtoConstSymbolAddress still returns NULL.
This fixes a failure in test ldc_github_248.d. It would be better if DtoConstSymbolAddress would return undef but this leads to bitcast assertion.
This commit is contained in:
@@ -1291,6 +1291,8 @@ llvm::Constant* SymOffExp::toConstElem(IRState* p)
|
|||||||
LOG_SCOPE;
|
LOG_SCOPE;
|
||||||
|
|
||||||
llvm::Constant* base = DtoConstSymbolAddress(loc, var);
|
llvm::Constant* base = DtoConstSymbolAddress(loc, var);
|
||||||
|
if (base == 0) return llvm::UndefValue::get(DtoType(type));
|
||||||
|
|
||||||
llvm::Constant* result;
|
llvm::Constant* result;
|
||||||
if (offset == 0)
|
if (offset == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user