Exemple #1
0
ArrayRef<EnumEntry<uint16_t>> getExportSymFlagNames() {
  return makeArrayRef(ExportSymFlagNames);
}
Exemple #2
0
ArrayRef<EnumEntry<uint32_t>> getModuleSubstreamKindNames() {
  return makeArrayRef(ModuleSubstreamKindNames);
}
Exemple #3
0
ArrayRef<EnumEntry<unsigned>> getCPUTypeNames() {
  return makeArrayRef(CPUTypeNames);
}
Exemple #4
0
ArrayRef<EnumEntry<uint32_t>> getFrameProcSymFlagNames() {
  return makeArrayRef(FrameProcSymFlagNames);
}
Exemple #5
0
ArrayRef<EnumEntry<SymbolKind>> getSymbolTypeNames() {
  return makeArrayRef(SymbolTypeNames);
}
Exemple #6
0
ArrayRef<EnumEntry<uint32_t>> getFileChecksumNames() {
  return makeArrayRef(FileChecksumNames);
}
Exemple #7
0
ArrayRef<EnumEntry<uint8_t>> getFrameCookieKindNames() {
  return makeArrayRef(FrameCookieKinds);
}
Exemple #8
0
ArrayRef<EnumEntry<COFF::SectionCharacteristics>>
getImageSectionCharacteristicNames() {
  return makeArrayRef(ImageSectionCharacteristicNames);
}
Exemple #9
0
ArrayRef<EnumEntry<uint8_t>> getProcSymFlagNames() {
  return makeArrayRef(ProcSymFlagNames);
}
Exemple #10
0
ArrayRef<EnumEntry<uint16_t>> getLocalFlagNames() {
  return makeArrayRef(LocalFlags);
}
Exemple #11
0
ArrayRef<EnumEntry<uint32_t>> getPublicSymFlagNames() {
  return makeArrayRef(PublicSymFlagNames);
}
Exemple #12
0
ArrayRef<EnumEntry<uint16_t>> getRegisterNames() {
  return makeArrayRef(RegisterNames);
}
Exemple #13
0
ArrayRef<EnumEntry<TypeLeafKind>> getTypeLeafNames() {
  return makeArrayRef(TypeLeafNames);
}
Exemple #14
0
ArrayRef<EnumEntry<uint8_t>> getThunkOrdinalNames() {
  return makeArrayRef(ThunkOrdinalNames);
}
Exemple #15
0
ArrayRef<EnumEntry<SourceLanguage>> getSourceLanguageNames() {
  return makeArrayRef(SourceLanguages);
}
Exemple #16
0
ArrayRef<EnumEntry<uint16_t>> getTrampolineNames() {
  return makeArrayRef(TrampolineNames);
}
Exemple #17
0
ArrayRef<EnumEntry<uint32_t>> getCompileSym3FlagNames() {
  return makeArrayRef(CompileSym3FlagNames);
}
Exemple #18
0
SEXP
R_IRBuilder_CreateGEP(SEXP r_builder, SEXP r_val, SEXP r_idx, SEXP r_id)
{
    llvm::IRBuilder<> *builder;
    builder = GET_REF(r_builder, IRBuilder<>);

    llvm::Value *val = GET_REF(r_val, Value);
    llvm::Value *ans;

    if(TYPEOF(r_idx) == VECSXP) {
        int nargs = Rf_length(r_idx);
        std::vector<llvm::Value *> args; // does this disappear and we lose the elements?
        for(int i = 0; i < nargs; i++) 
            args.push_back(GET_REF(VECTOR_ELT(r_idx, i), Value));


        llvm::ArrayRef<llvm::Value *> idxs = makeArrayRef(args);
#ifdef USE_EXCEPTIONS
        try {	
#endif


#if 1
             ans = builder->CreateGEP(val, idxs);
#else
	 fprintf(stderr, "Calling GetElementPtrInst::Create()\n");
              ans = llvm::GetElementPtrInst::Create(val, args); // idxs
              ans = builder->Insert(ans, "");
#endif

#ifdef USE_EXCEPTIONS
        } catch(std::exception &e) {
            PROBLEM "failed to create GEP"
                ERROR;
        }
#else
	if(!ans) {
            PROBLEM "failed to create GEP"
                ERROR;
	}
#endif

    } else {
        llvm::Value *idx = GET_REF(r_idx, Value);
#ifdef USE_EXCEPTIONS
        try {	
#endif
            ans = builder->CreateGEP(val, idx);

#ifdef USE_EXCEPTIONS
        }  catch(std::exception &e) {
            PROBLEM "failed to create GEP"
                ERROR;
        }
#else
	if(!ans) {
            PROBLEM "failed to create GEP"
                ERROR;
	}
#endif
    }

    if(Rf_length(r_id))
        ans->setName(makeTwine(r_id));

    return(R_createRef(ans, "Value"));
}
static ArrayRef<MCPhysReg> CC_X86_64_VectorCallGetGPRs() {
  static const MCPhysReg RegListGPR[] = {X86::RCX, X86::RDX, X86::R8, X86::R9};
  return makeArrayRef(std::begin(RegListGPR), std::end(RegListGPR));
}