mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 08:01:11 +03:00
Don't set TypePointer::isunsigned to true in the frontend.
The previous solution was problematic because the change was language- visble via the isUnsigned trait. Now, pointers are simply explicitly checked for in the relevant places. (Note that there might be cases in the diff where a direct isunsigned() call would have been appropriate – I only checked for instances where the type clearly cannot be a pointer, but chose to go the safe route in replicating existing behavior otherwise). Fixes DMD testcase 'traits'.
This commit is contained in:
parent
e7c72b072b
commit
c6abdcf4a4
7 changed files with 19 additions and 11 deletions
|
@ -462,9 +462,9 @@ void TypeInfoEnumDeclaration::llvmDefine()
|
|||
{
|
||||
LLType* memty = DtoType(sd->memtype);
|
||||
#if DMDV2
|
||||
LLConstant* C = LLConstantInt::get(memty, sd->defaultval->toInteger(), !sd->memtype->isunsigned());
|
||||
LLConstant* C = LLConstantInt::get(memty, sd->defaultval->toInteger(), !isLLVMUnsigned(sd->memtype));
|
||||
#else
|
||||
LLConstant* C = LLConstantInt::get(memty, sd->defaultval, !sd->memtype->isunsigned());
|
||||
LLConstant* C = LLConstantInt::get(memty, sd->defaultval, !isLLVMUnsigned(sd->memtype));
|
||||
#endif
|
||||
b.push_void_array(C, sd->memtype, sd);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue