Displaying 2 results from an estimated 2 matches for "note_stor".
Did you mean:
note_store
2017 Apr 29
0
How to pass a StringRef to a function call inserted as instrumentation?
...ameter to a function `func(char* s)`. I can allocate some space on stack
> using `AllocaInst` to generate an `alloca` instruction. But, how can I copy
> the `StringRef` to the stack space?
I think this is usually done via anonymous globals. For example if you
use Clang to compile this:
void note_store(char *LocName, void *Addr);
void foo(int *Ptr) {
note_store("store in foo", (void *)Ptr);
*Ptr = 42;
}
you get (essentially):
@.str = private unnamed_addr constant [13 x i8] c"store in foo\00", align 1
define void @foo(i32* %Ptr) {
%Ptr8 = bitcast i32* %Ptr to i8*
ca...
2017 Apr 28
4
How to pass a StringRef to a function call inserted as instrumentation?
I am wriitng an LLVM pass to insert instrumentation at certain points of
the program. I want to pass the `StringRef` obtained from `getName()` as a
parameter to a function `func(char* s)`. I can allocate some space on stack
using `AllocaInst` to generate an `alloca` instruction. But, how can I copy
the `StringRef` to the stack space?
--
Thanks & Regards,
Dipanjan
-------------- next part