mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-08 20:06:03 +03:00
Simplify code by using the right type.
Removes some comditional compiling by replacing unsigned with llvm::Attributes.
This commit is contained in:
parent
dbb5a34eda
commit
b53544b389
7 changed files with 1 additions and 57 deletions
|
@ -277,11 +277,7 @@ void DtoBuildDVarArgList(std::vector<LLValue*>& args,
|
|||
llvm::AttributeWithIndex Attr;
|
||||
// specify arguments
|
||||
args.push_back(DtoLoad(typeinfoarrayparam));
|
||||
#if LDC_LLVM_VER == 300
|
||||
if (unsigned atts = tf->fty.arg_arguments->attrs) {
|
||||
#else
|
||||
if (llvm::Attributes atts = tf->fty.arg_arguments->attrs) {
|
||||
#endif
|
||||
Attr.Index = argidx;
|
||||
Attr.Attrs = atts;
|
||||
attrs.push_back(Attr);
|
||||
|
@ -289,11 +285,7 @@ void DtoBuildDVarArgList(std::vector<LLValue*>& args,
|
|||
++argidx;
|
||||
|
||||
args.push_back(gIR->ir->CreateBitCast(mem, getPtrToType(LLType::getInt8Ty(gIR->context())), "tmp"));
|
||||
#if LDC_LLVM_VER == 300
|
||||
if (unsigned atts = tf->fty.arg_argptr->attrs) {
|
||||
#else
|
||||
if (llvm::Attributes atts = tf->fty.arg_argptr->attrs) {
|
||||
#endif
|
||||
Attr.Index = argidx;
|
||||
Attr.Attrs = atts;
|
||||
attrs.push_back(Attr);
|
||||
|
@ -505,13 +497,7 @@ DValue* DtoCallFunction(Loc& loc, Type* resulttype, DValue* fnval, Expressions*
|
|||
}
|
||||
|
||||
size_t n = Parameter::dim(tf->parameters);
|
||||
|
||||
#if LDC_LLVM_VER == 300
|
||||
LLSmallVector<unsigned, 10> attrptr(n, 0);
|
||||
#else
|
||||
LLSmallVector<llvm::Attributes, 10> attrptr(n, llvm::Attribute::None);
|
||||
#endif
|
||||
|
||||
std::vector<DValue*> argvals;
|
||||
if (dfnval && dfnval->func->isArrayOp) {
|
||||
// slightly different approach for array operators
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue