mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-05 01:20:51 +03:00
[svn r329] Cleaned up a bunch of array code for handling special slice cases no
longer relevant.
This commit is contained in:
parent
86d299a641
commit
ac3744a59d
5 changed files with 92 additions and 247 deletions
|
@ -87,13 +87,8 @@ const LLType* DtoType(Type* t)
|
|||
return DtoComplexType(t);
|
||||
|
||||
// pointers
|
||||
case Tpointer: {
|
||||
assert(t->next);
|
||||
if (t->next->ty == Tvoid)
|
||||
return (const LLType*)getPtrToType(LLType::Int8Ty);
|
||||
else
|
||||
return (const LLType*)getPtrToType(DtoType(t->next));
|
||||
}
|
||||
case Tpointer:
|
||||
return getPtrToType(DtoType(t->next));
|
||||
|
||||
// arrays
|
||||
case Tarray:
|
||||
|
@ -612,6 +607,8 @@ llvm::GlobalVariable* isaGlobalVar(LLValue* v)
|
|||
|
||||
const LLPointerType* getPtrToType(const LLType* t)
|
||||
{
|
||||
if (t == LLType::VoidTy)
|
||||
t = LLType::Int8Ty;
|
||||
return LLPointerType::get(t, 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue