mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 16:43:13 +01:00
Return void* from _d_allocclass so LLVM doesn't do weird things with it...
This allows `-instcombine` followed by `-gvn` to do devirtualization, so add `-gvn` in strategic places in the default pass order.
This commit is contained in:
@@ -107,7 +107,7 @@ private
|
||||
/**
|
||||
*
|
||||
*/
|
||||
extern (C) Object _d_allocclass(ClassInfo ci)
|
||||
extern (C) void* _d_allocclass(ClassInfo ci)
|
||||
{
|
||||
void* p;
|
||||
|
||||
@@ -150,7 +150,7 @@ extern (C) Object _d_allocclass(ClassInfo ci)
|
||||
//(cast(byte*) p)[0 .. ci.init.length] = ci.init[];
|
||||
|
||||
debug(PRINTF) printf("initialization done\n");
|
||||
return cast(Object) p;
|
||||
return p;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user