mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-04-17 09:19:03 +02:00
Added pragma insertelement.
This commit is contained in:
@@ -127,6 +127,17 @@ Pragma DtoGetPragma(Scope *sc, PragmaDeclaration *decl, std::string &arg1str)
|
||||
return LLVMextractelement;
|
||||
}
|
||||
|
||||
// pragma(insertelement) { funcdecl(s) }
|
||||
else if (ident == Id::Insertelement)
|
||||
{
|
||||
if (args && args->dim > 0)
|
||||
{
|
||||
error("takes no parameters");
|
||||
fatal();
|
||||
}
|
||||
return LLVMinsertelement;
|
||||
}
|
||||
|
||||
// pragma(va_start) { templdecl(s) }
|
||||
else if (ident == Id::vastart)
|
||||
{
|
||||
@@ -398,6 +409,18 @@ void DtoCheckPragma(PragmaDeclaration *decl, Dsymbol *s,
|
||||
}
|
||||
break;
|
||||
|
||||
case LLVMinsertelement:
|
||||
if (FuncDeclaration* fd = s->isFuncDeclaration())
|
||||
{
|
||||
fd->llvmInternal = llvm_internal;
|
||||
}
|
||||
else
|
||||
{
|
||||
error("the '%s' pragma must only be used on function declarations.", ident->toChars());
|
||||
fatal();
|
||||
}
|
||||
break;
|
||||
|
||||
case LLVMinline_asm:
|
||||
if (TemplateDeclaration* td = s->isTemplateDeclaration())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user