Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Corrections.

  • Loading branch information...
commit fd3e79b7bb2c19081c8ef69ad2a6632e5b52156f 1 parent 047dcb5
@jkrempus jkrempus authored
Showing with 3 additions and 27 deletions.
  1. +3 −25 gen/pragma.cpp
  2. +0 −2  gen/toir.cpp
View
28 gen/pragma.cpp
@@ -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
2  gen/toir.cpp
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.