mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-08 03:46:02 +03:00
Small harmless refactoring
This commit is contained in:
parent
30b858781b
commit
c7fbdb1a5c
4 changed files with 2 additions and 35 deletions
|
@ -31,13 +31,9 @@ import ddmd.identifier;
|
|||
import ddmd.mtype;
|
||||
import ddmd.opover;
|
||||
import ddmd.tokens;
|
||||
// IN_LLVM import ddmd.typinf;
|
||||
import ddmd.typinf;
|
||||
import ddmd.visitor;
|
||||
|
||||
version(IN_LLVM) {
|
||||
import gen.typinf;
|
||||
}
|
||||
|
||||
/***************************************
|
||||
* Search sd for a member function of the form:
|
||||
* `extern (D) string toString();`
|
||||
|
|
|
@ -1236,9 +1236,7 @@ LLConstant *DtoTypeInfoOf(Type *type, bool base) {
|
|||
type->toChars(), base);
|
||||
LOG_SCOPE
|
||||
|
||||
type = type->merge2(); // needed.. getTypeInfo does the same
|
||||
getTypeInfoType(type, nullptr);
|
||||
TypeInfoDeclaration *tidecl = type->vtinfo;
|
||||
TypeInfoDeclaration *tidecl = getOrCreateTypeInfoDeclaration(type, nullptr);
|
||||
assert(tidecl);
|
||||
Declaration_codegen(tidecl);
|
||||
assert(getIrGlobal(tidecl)->value != NULL);
|
||||
|
|
26
gen/typinf.d
26
gen/typinf.d
|
@ -1,26 +0,0 @@
|
|||
//===-- gen/typinf.d - TypeInfo declaration codegen ---------------*- D -*-===//
|
||||
//
|
||||
// LDC – the LLVM D compiler
|
||||
//
|
||||
// This file is distributed under the BSD-style LDC license. See the LICENSE
|
||||
// file for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Codegen for the TypeInfo types/constants required by the D run-time type
|
||||
// information system.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
module gen.typinf;
|
||||
|
||||
import ddmd.mtype;
|
||||
import ddmd.dscope;
|
||||
|
||||
//class TypeInfoDeclaration;
|
||||
|
||||
//extern (C++) void DtoResolveTypeInfo(TypeInfoDeclaration *tid);
|
||||
//extern (C++) TypeInfoDeclaration *getOrCreateTypeInfoDeclaration(Type *t, Scope *sc);
|
||||
//extern (C++) void TypeInfoDeclaration_codegen(TypeInfoDeclaration *decl, IRState *p);
|
||||
extern (C++) Type getTypeInfoType(Type t, Scope* sc);
|
||||
|
|
@ -26,7 +26,6 @@ void TypeInfoDeclaration_codegen(TypeInfoDeclaration *decl, IRState *p);
|
|||
void TypeInfoClassDeclaration_codegen(TypeInfoDeclaration *decl, IRState *p);
|
||||
|
||||
// defined in ddmd/typinf.d:
|
||||
Type *getTypeInfoType(Type *t, Scope *sc);
|
||||
bool isSpeculativeType(Type *t);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue