mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-17 05:13:14 +01:00
Workaround for LLVM PR 3861 (http://llvm.org/PR3861).
(LLVM abort()s in codegen if the second integer in a return value is <= i8 on x86/x86-64) This was breaking native compilation of Tango's TempFile module on x86-64.
This commit is contained in:
@@ -400,6 +400,15 @@ namespace x86_64_D_cc {
|
||||
bool retStructInRegs(TypeStruct* st) {
|
||||
// 'fastcc' allows returns in up to two registers of each kind:
|
||||
DRegCount state(2, 2, 2);
|
||||
#if 1
|
||||
// TODO: Disable this if and when LLVM PR 3861 gets fixed.
|
||||
|
||||
// LLVM currently doesn't allow a second int to be an i1 or i8.
|
||||
// (See <http://llvm.org/PR3861>)
|
||||
// Rather than complicating shouldPassStructInRegs(), just disallow
|
||||
// second integers for now.
|
||||
state.ints = 1;
|
||||
#endif
|
||||
return shouldPassStructInRegs(st, state);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user