search for: reqty

Displaying 3 results from an estimated 3 matches for "reqty".

Did you mean: reqts
2010 Apr 18
4
[LLVMdev] create two Twine object
...nst char *VarNum = getVarNum(); Twine *x1 = new Twine(StringRef("status"), VarNum); // 1 Twine *x2 = new Twine(StringRef("request"), VarNum); // 2 Instruction *sstatusInst = new AllocaInst(StatusTy, *x1, entry_inst); // 3 Instruction *sreqInst = new AllocaInst(ReqTy, *x2, entry_inst); // 4 with only 1&3, my code works well, I can have status1, status2, status3, ...... with 1&2&3&4 exists at the same time, it compiles without problem, but segmentation fault happens. Instruction *sreqInst = new AllocaInst(ReqTy, "request&qu...
2010 Apr 18
0
[LLVMdev] create two Twine object
...ld be used only for temporary values and not stored, so allocating the in heap sounds wrong. I think all you need here is static int varNum; ++varNum; Instruction *sstatusInst = new AllocaInst(StatusTy, Twine("status") + Twine(varNum), entry_inst); Instruction *sreqInst = new AllocaInst(ReqTy, Twine("request") + Twine(varNum), entry_inst); btw, your getVarNum() leaks. Eugene On Sun, Apr 18, 2010 at 5:55 AM, Yuanfang Chen <tabloid.adroit at gmail.com> wrote: > I need to generate variables like > status1, status2, status3, ...... > request1, request2, request3...
2010 Apr 18
1
[LLVMdev] create two Twine object
...oor style, as they are dangerously subtle. - Daniel > I think all you need here is > > static int varNum; > > ++varNum; > Instruction *sstatusInst = new AllocaInst(StatusTy, Twine("status") + > Twine(varNum), entry_inst); > Instruction *sreqInst = new AllocaInst(ReqTy, Twine("request") + > Twine(varNum), entry_inst); > > > btw, your getVarNum() leaks. > > Eugene > > On Sun, Apr 18, 2010 at 5:55 AM, Yuanfang Chen <tabloid.adroit at gmail.com> wrote: >> I need to generate variables like >> status1, status2, statu...