mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Integrate obj_includelib into its only caller.
This commit is contained in:
@@ -308,8 +308,6 @@ void AttribDeclaration::codegen(Ir* p)
|
||||
|
||||
/* ================================================================== */
|
||||
|
||||
void obj_includelib(const char* lib);
|
||||
|
||||
void PragmaDeclaration::codegen(Ir* p)
|
||||
{
|
||||
if (ident == Id::lib)
|
||||
@@ -324,7 +322,12 @@ void PragmaDeclaration::codegen(Ir* p)
|
||||
char *name = static_cast<char *>(mem.malloc(se->len + 1));
|
||||
memcpy(name, se->string, se->len);
|
||||
name[se->len] = 0;
|
||||
obj_includelib(name);
|
||||
|
||||
size_t n = strlen(name)+3;
|
||||
char *arg = static_cast<char *>(mem.malloc(n));
|
||||
strcpy(arg, "-l");
|
||||
strncat(arg, name, n);
|
||||
global.params.linkswitches->push(arg);
|
||||
}
|
||||
AttribDeclaration::codegen(p);
|
||||
}
|
||||
|
||||
@@ -3341,15 +3341,6 @@ CONSTSTUB(AssocArrayLiteralExp);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void obj_includelib(const char* lib)
|
||||
{
|
||||
size_t n = strlen(lib)+3;
|
||||
char *arg = static_cast<char *>(mem.malloc(n));
|
||||
strcpy(arg, "-l");
|
||||
strncat(arg, lib, n);
|
||||
global.params.linkswitches->push(arg);
|
||||
}
|
||||
|
||||
void backend_init()
|
||||
{
|
||||
// LLVM_D_InitRuntime is done in Module::genLLVMModule
|
||||
|
||||
Reference in New Issue
Block a user