mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 16:43:13 +01:00
Corrections.
This commit is contained in:
@@ -116,26 +116,15 @@ Pragma DtoGetPragma(Scope *sc, PragmaDeclaration *decl, std::string &arg1str)
|
|||||||
return LLVMshufflevector;
|
return LLVMshufflevector;
|
||||||
}
|
}
|
||||||
|
|
||||||
// pragma(extractelement) { funcdecl(s) }
|
// pragma(extractelement or insertelement) { funcdecl(s) }
|
||||||
else if (ident == Id::Extractelement)
|
else if (ident == Id::Extractelement || ident == Id::Insertelement)
|
||||||
{
|
{
|
||||||
if (args && args->dim > 0)
|
if (args && args->dim > 0)
|
||||||
{
|
{
|
||||||
error("takes no parameters");
|
error("takes no parameters");
|
||||||
fatal();
|
fatal();
|
||||||
}
|
}
|
||||||
return LLVMextractelement;
|
return ident == Id::Extractelement ? LLVMextractelement : LLVMinsertelement;
|
||||||
}
|
|
||||||
|
|
||||||
// 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) }
|
// pragma(va_start) { templdecl(s) }
|
||||||
@@ -398,17 +387,6 @@ void DtoCheckPragma(PragmaDeclaration *decl, Dsymbol *s,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case LLVMextractelement:
|
case LLVMextractelement:
|
||||||
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 LLVMinsertelement:
|
case LLVMinsertelement:
|
||||||
if (FuncDeclaration* fd = s->isFuncDeclaration())
|
if (FuncDeclaration* fd = s->isFuncDeclaration())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -45,8 +45,6 @@
|
|||||||
|
|
||||||
#include "llvm/Support/ManagedStatic.h"
|
#include "llvm/Support/ManagedStatic.h"
|
||||||
|
|
||||||
#include "llvm/Support/raw_ostream.h"
|
|
||||||
|
|
||||||
llvm::cl::opt<bool> checkPrintf("check-printf-calls",
|
llvm::cl::opt<bool> checkPrintf("check-printf-calls",
|
||||||
llvm::cl::desc("Validate printf call format strings against arguments"),
|
llvm::cl::desc("Validate printf call format strings against arguments"),
|
||||||
llvm::cl::ZeroOrMore);
|
llvm::cl::ZeroOrMore);
|
||||||
|
|||||||
Reference in New Issue
Block a user