<div dir="ltr">Hello,<div><br></div><div>I'm new to LLVM, and am experimenting with the viability of the use of function passes for the sanitization of content in c strings.</div><div><br></div><div>This is an excerpt from the IR of some code which performs a strcpy on between two char arrays buf1 and buf2.</div><div><br></div><div><div>if.else:                                          ; preds = %entry</div><div>  %1 = load i8** %buf1, align 8</div><div>  %2 = load i8** %buf2, align 8</div><div>  %call2 = call i8* @strcpy(i8* %1, i8* %2) #3</div><div>  br label %if.end</div></div><div><br></div><div>I would like to know if there is some way to retrieve:</div><div>1. The sizes of buffers buf1 and buf2</div><div>2. The actual strings in buf1 and buf2</div><div><br></div><div>I've tried performing a dyn_cast on the first 2 assignments to LoadInst, and then printing out the output of the function getOperand(0) on the LoadInst variable. However, all that I'm seeing are assignment instructions in the form of:</div><div><br></div><div><div>%buf1 = alloca i8*, align 8</div></div><div><div>%buf2 = alloca i8*, align 8</div></div><div><br></div><div>Do hope that I can receive some advice. Thanks in advance!</div><div><br></div><div>Roy A.</div></div>