search for: push_back

Displaying 20 results from an estimated 1049 matches for "push_back".

2017 Apr 26
0
[PATCH 2/2] v2v: -o glance: factorize common properties
...| "sles" -> "sled" + | x -> x (* everything else is the same in libguestfs and OpenStack*) + ) + ] in + if source.s_cpu_sockets <> None || source.s_cpu_cores <> None || + source.s_cpu_threads <> None then ( + push_back properties ("hw_cpu_sockets", + match source.s_cpu_sockets with + | None -> "1" + | Some v -> string_of_int v); + push_back properties ("hw_cpu_cores", +...
2005 Aug 24
1
[LLVMdev] CallInst constructor interface
Hi, Inserting a call instruction is a bit of a pain. The only way I know how to do it is to write a bunch of code like the following: std::vector<const Type*> formalArgs; formalArgs.push_back(arg1->getType()); formalArgs.push_back(arg2->getType()); ... formalArgs.push_back(argn->getType()); std::vector<Value*> args; args.push_back(arg1); args.push_back(arg2); ... args.push_back(argn); FunctionType *FType = FunctionType::get(RetTy, formalArgs, false); Module...
2017 Nov 21
2
[PATCH v3 0/2] common/mlstdutils: Extend the List module.
v2 -> v3: - Renamed List.assoc_ -> List.assoc_lbl. - Rebased on top of current master branch. Rich.
2017 Apr 26
2
[PATCH 1/2] v2v: -o glance: add property for UEFI firmware (RHBZ#1445659)
...uestname-disk2" etc. The manual strongly @@ -143,6 +140,11 @@ object (* XXX Neither memory balloon nor pvpanic are supported by * Glance at this time. *) + (match target_firmware with + | TargetBIOS -> () + | TargetUEFI -> + push_back properties ("hw_firmware_type", "uefi") + ); let properties = List.flatten ( -- 2.9.3
2016 Dec 30
3
[cfe-dev] Modernizing LLVM Coding Style Guide and enforcing Clang-tidy
...>> Thanks for very accurate responses. >> - I totally agree what Dave and Chandler said about explicit and implicit >> operations, this is what I meant my first email. >> I believe there are places like >> v.emplace_back(A, B); >> istead of >> v.push_back(make_pair(A, B));b >> That can make code simpler. >> > > Do you have examples? The only ones i can come up with are the ones where > the push_back variant literally can't compile because the type isn't > movable. > > Perhaps it would be useful to break down c...
2016 Dec 30
0
[cfe-dev] Modernizing LLVM Coding Style Guide and enforcing Clang-tidy
...lists.llvm.org> wrote: > Thanks for very accurate responses. > - I totally agree what Dave and Chandler said about explicit and implicit > operations, this is what I meant my first email. > I believe there are places like > v.emplace_back(A, B); > istead of > v.push_back(make_pair(A, B));b > That can make code simpler. > Do you have examples? The only ones i can come up with are the ones where the push_back variant literally can't compile because the type isn't movable. Perhaps it would be useful to break down categories of can happen here... Cas...
2012 Jul 04
2
[LLVMdev] Bogus assert in VMCore/Instructions.cpp CallInst::Create?
...true, GlobalValue::PrivateLinkage, 0, ""); g2->setAlignment(1); vector<Constant*> s1_id; vector<Constant*> s2_id; s1_id.push_back(ConstantInt::get( block->getContext(), APInt(64, StringRef("0"), 10))); s1_id.push_back(ConstantInt::get( block->getContext(), APInt(64, StringRef("0"), 10))); s2_id.push_back(Cons...
2017 Jan 09
2
[cfe-dev] Modernizing LLVM Coding Style Guide and enforcing Clang-tidy
...f" > - use default member initialization > struct A { > void *ptr = nullptr; > }; > > (instead of doing it in constructor) > > - use default, override, delete > - skip "virtual" with override > > The last point is to get to consensus with > > push_back({first, second}) > or > emplace_back(first ,second); > It might be a bit noisy, but I'd be inclined to start a separate thread for each of these on llvm-dev with a clear subject line relevant to each one. So they don't get lost and some of them don't get drowned out by the di...
2015 Jul 22
2
[LLVMdev] (no subject)
Hello, I have tried a lot fix this error but am not able to can you please find me a solution am trying to compile the SAFECode in Cygwin Environment to work for windows. used make -j4 command to make the files in cygwin i have got this error make[5]: Leaving directory '/home/uidr7475/Work/LLVM_OBJ/projects/safecode/tools/clang/include' /usr/bin/cp: cannot stat
2016 Dec 29
2
[cfe-dev] Modernizing LLVM Coding Style Guide and enforcing Clang-tidy
Somewhat unfortunately, we have two discussions here: - Clang-tidy has checks that might improve code -- should we deploy them? If so which? I'll address this in a separate email, and focus this one on: - Should we have coding standards around 'push_back' and 'emplace_back', and if so, what should they say? I think the amount of confusion makes a coding standard useful. As for what it should say, I tend to agree with Dave here. In particular: On Thu, Dec 29, 2016 at 12:03 PM David Blaikie via cfe-dev < cfe-dev at lists.llvm.org&gt...
2013 Apr 16
1
[LLVMdev] creating and inserting a function with variable arguments
The code that I have written to get the function type is: const std::vector<Type *> ParamTys; ParamTys.push_back(IntegerType::getInt32Ty(Context)); ParamTys.push_back(IntegerType::getInt32Ty(Context)); ParamTys.push_back(IntegerType::getInt32Ty(Context)); ParamTys.push_back(PointerType::get(Type::getVoidTy(Context), 0)); ParamTys.push_back(PointerType::get(Type::getVoidTy(Context), 0)); FunctionType *ftype =...
2017 Oct 08
4
[PATCH 0/3] common/mlstdutils: Add Std_utils List and Option modules.
In Std_utils we already extend Char and String. These commits take it a little further by extending List and adding a new Option submodule. All basically simple refactoring. Rich.
2011 Sep 04
1
[LLVMdev] correct types for ArgumentList?
...* objects for me to use) I need to pass it to my anonymous function so it can carry out the assignment. I can not get the correct types, at runtime I get a bad signature error. So basically the function is setup to take arguments like this: vector<Type *> v_params; v_params.push_back(ptrType); /* Shadow */ v_params.push_back(ptrType); /* New Value */ v_params.push_back(ptrType); /* Pointer */ ArrayRef<Type *> a_params(v_params); Where the assignment will look something like this: Value *val = newFunc->arg_begin(); Value *ptr = ++(ne...
2017 Oct 08
7
[[PATCH v2 0/4] common/mlstdutils: Add Std_utils List and Option modules.
This time including the first commit ...
2016 Dec 29
0
[cfe-dev] Modernizing LLVM Coding Style Guide and enforcing Clang-tidy
Dave pointed out that I didn't complete one aspect of my argument on the push_back vs. emplace_back: On Thu, Dec 29, 2016 at 2:04 PM Chandler Carruth <chandlerc at gmail.com> wrote: > Still another way to see the consequence of this is to look at the nature > of compiler errors when a programmer makes a mistake. > > With emplace_back, if you fail to call the c...
2006 Mar 03
0
[LLVMdev] Re: Re: New GCC4-based C/C++/ObjC front-end for LLVM
...ot;llvm.memcpy.i32" : "llvm.memcpy.i64"; + MemCpy = TheModule->getOrInsertFunction(Name, Type::VoidTy, SBP, + SBP, IntPtr, Type::UIntTy, NULL); + } std::vector<Value*> Ops; Ops.push_back(CastToType(DestPtr, SBP)); Ops.push_back(CastToType(SrcPtr, SBP)); - Ops.push_back(CastToType(Size, Type::UIntTy)); + Ops.push_back(CastToType(Size, IntPtr)); Ops.push_back(ConstantUInt::get(Type::UIntTy, Align)); new CallInst(MemCpy, Ops, "", CurBB); } @@ -811,14 +815,17 @@ v...
2018 Feb 16
2
ThinLTO and linkonce_odr + unnamed_addr
...sure. > 2. ld64 does treat these two type of symbols differently. For example, ld64 will deduplicate all the can_be_hidden symbols to reduce code size. This can't be achieved when the symbols is private external. If I understand you correctly, ld64 will deduplicate std::vector<int>::push_back and std::vector<unsigned>::push_back, but it will not deduplicate std::vector<HiddenClassA>::push_back and std::vector<HiddenClassB>::push_back. Is that correct? Do you know why it has that limitation? Thanks, Rafael
2012 Jul 04
0
[LLVMdev] Bogus assert in VMCore/Instructions.cpp CallInst::Create?
...GlobalValue::PrivateLinkage, > 0, > ""); > g2->setAlignment(1); > > vector<Constant*> s1_id; > vector<Constant*> s2_id; > s1_id.push_back(ConstantInt::get( block->getContext(), > APInt(64, StringRef("0"), 10))); > s1_id.push_back(ConstantInt::get( block->getContext(), > APInt(64, StringRef("0"), 10))); > &g...
2004 Aug 17
5
[LLVMdev] JIT API example (fibonacci)
...ont(); // Get the arg > > ArgX.setName("AnArg"); // Give it a nice symbolic name for fun. > > > > SetCondInst* CondInst > > = new SetCondInst( Instruction::SetLE, > > &ArgX, Two ); > > > > BB->getInstList().push_back(CondInst); > > > > // Create the true_block > > BasicBlock* true_bb = new BasicBlock("arg<=2"); > > > > > > // Create the return instruction and add it > > // to the basic block for true case: > > true_bb->getInstLi...
2009 Jun 29
2
[LLVMdev] Inserting nodes into SelectionDAG (X86)
Sorry to ask again, but I still can't get it right. The following code compiles and runs, but produces no instructions: Ops.push_back(DAG.getRegister(X86::EAX, MVT::i32)); Ops.push_back(DAG.getConstant(1, MVT::i32)); DAG.getNode(ISD::ADD, DAG.getVTList(MVT::i32), &Ops[0], Ops.size()); I reckon that has something to do with the fact that I am not using the Chain object. But as soon as I try to chain that node, llc tells m...