search for: setfoo

Displaying 10 results from an estimated 10 matches for "setfoo".

Did you mean: getfoo
2014 Mar 03
3
[LLVMdev] [cfe-dev] C++11 reverse iterators (was C++11 is here)
...iterate over operands, and assign through the iterator to mutate them. > > Really, these operate as range-views over some sequence. It seems particularly easy to teach foo_begin(), foo_end() -> foos() as well. That's a very objective-c thing to do :-), they use the pattern foo() and setFoo() for the getter and setter, respectively (and the naming is baked into the property model). I don't feel strongly against it, but we pretty consistently use the Java style 'get' prefix everywhere else. -Chris -------------- next part -------------- An HTML attachment was scrubbed......
2017 Jun 07
2
[newbie] trouble with global variables and CreateLoad/Store in JIT
...32-S32" target triple = "i686-pc-windows-msvc" @foo = global { i8*, i32 } undef $ cat jit-1-clobber.ll target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32" target triple = "i686-pc-windows-msvc" @foo = external global { i8*, i32 } define void @setfoo() { entry: %p = inttoptr i32 42 to i8* store i8* %p, i8** getelementptr inbounds ({ i8*, i32 }, { i8*, i32 }* @foo, i32 0, i32 0), align 4 store i32 13, i32* getelementptr inbounds ({ i8*, i32 }, { i8*, i32 }* @foo, i32 0, i32 1), align 4 ret void } $ cat jit-1-noclobber.ll target datalayo...
2017 Jun 06
2
[newbie] trouble with global variables and CreateLoad/Store in JIT
...useful though as this code does what it should... > > $ llvm-objdump.exe -r -d test.o > > test.o: file format COFF-i386 > > Disassembly of section .text: > .text: > 0: 00 00 addb %al, (%eax) > 00000000: IMAGE_REL_I386_DIR32 _XEP:setfoo > 2: 00 00 addb %al, (%eax) > > _setfoo: > 4: 56 pushl %esi > 5: 83 ec 40 subl $64, %esp > 8: 89 e0 movl %esp, %eax > a: c7 00 00 00 00 00 movl $0, (%eax) >...
2002 Sep 06
3
explict sharing of symbols between packages
Hi everyone, I'm thinking about breaking up a large package I have to avoid loading some of the more specialised parts when it isn't necessary. The package is dependent on shared libraries. The base one will keep all of the core stuff like constructors etc and the specialised parts will need to access these. It is obviously possible to set the "local" flag to false, however
2017 Jun 06
2
[newbie] trouble with global variables and CreateLoad/Store in JIT
On Mon, Jun 5, 2017 at 1:34 PM, Nikodemus Siivola < nikodemus at random-state.net> wrote: > Uh. Turns out that if I hide the pointer to @foo from LLVM by passing it > through an opaque identity function ... then everything works fine. > > Is this a bug in LLVM or is there some magic involving globals I'm > misunderstanding? > This looks like a bug in the handling of
2011 Jul 24
0
[LLVMdev] Correct use of StringRef and Twine
...the path that needs the value. That seems optimal to me. 1.1) We probably want a better way to get a Twine into a std::string - while the change to Triple's ctor works because returning a std::string from a function into a ctor can do fancy in-place construction - in any other case like "SetFoo(const Twine& t) { this->s = t; }" we'd want something better. Perhaps simply t.AssignTo(s); 2) This one isn't quite as fleshed out, but see if the general outline makes sense: Introduce an extra type that's Twine-esque, but is only the top level (so it's implicitly cons...
2014 Mar 04
2
[LLVMdev] [cfe-dev] C++11 reverse iterators (was C++11 is here)
...'s getting the range though, just like Function::getArgumentList() returns the argument list. > > I really disagree (and I disagree with getArgumentList for the same reason). > > getFoo should return something with value semantics (even if its a const reference to delay the copy). setFoo should directly mutate something. > > What we're really doing is making the equivalent of a "member-like accessor" method. Ok, can this be generalized into guidance we can put in the coding standards? -Chris -------------- next part -------------- An HTML attachment was scru...
2011 Jul 23
2
[LLVMdev] Correct use of StringRef and Twine
On Jul 22, 2011, at 2:59 PM, David Blaikie wrote: >> The dangerous part of this is that characters are integers, so "foo" + 'x' is very likely to cause serious problems. > > std::string already provides such overloads though, doesn't it? So the > code isn't any safer from accidental "foo" + 'x' expressions that > don't include
2014 Mar 03
3
[LLVMdev] [cfe-dev] C++11 reverse iterators (was C++11 is here)
On Mar 2, 2014, at 10:47 PM, Chandler Carruth <chandlerc at google.com> wrote: >> I'm not aware of the prior art or standards are here, but I think that a global reverse() adapter is the way to go. Likewise, we should have a standard "enumerate()" adaptor like python. >> >> I definitely prefer the global adaptor pattern. As for prior art, I had played with
2011 Jul 24
2
[LLVMdev] Correct use of StringRef and Twine
...ed by value, this could be expensive. > 1.1) We probably want a better way to get a Twine into a std::string - > while the change to Triple's ctor works because returning a > std::string from a function into a ctor can do fancy in-place > construction - in any other case like "SetFoo(const Twine& t) { > this->s = t; }" we'd want something better. Perhaps simply > t.AssignTo(s); Adding a Twine::assignTo method would make sense to me! > 2) This one isn't quite as fleshed out, but see if the general outline > makes sense: Introduce an extra type t...