Corrections.

This commit is contained in:
Jernej Krempuš
2012-10-03 15:26:43 +02:00
parent 047dcb5591
commit fd3e79b7bb
2 changed files with 3 additions and 27 deletions

View File

@@ -116,26 +116,15 @@ Pragma DtoGetPragma(Scope *sc, PragmaDeclaration *decl, std::string &arg1str)
return LLVMshufflevector;
}
// pragma(extractelement) { funcdecl(s) }
else if (ident == Id::Extractelement)
// pragma(extractelement or insertelement) { funcdecl(s) }
else if (ident == Id::Extractelement || ident == Id::Insertelement)
{
if (args && args->dim > 0)
{
error("takes no parameters");
fatal();
}
return LLVMextractelement;
}
// pragma(insertelement) { funcdecl(s) }
else if (ident == Id::Insertelement)
{
if (args && args->dim > 0)
{
error("takes no parameters");
fatal();
}
return LLVMinsertelement;
return ident == Id::Extractelement ? LLVMextractelement : LLVMinsertelement;
}
// pragma(va_start) { templdecl(s) }
@@ -398,17 +387,6 @@ void DtoCheckPragma(PragmaDeclaration *decl, Dsymbol *s,
break;
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:
if (FuncDeclaration* fd = s->isFuncDeclaration())
{

View File

@@ -45,8 +45,6 @@
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/raw_ostream.h"
llvm::cl::opt<bool> checkPrintf("check-printf-calls",
llvm::cl::desc("Validate printf call format strings against arguments"),
llvm::cl::ZeroOrMore);