All
I want to know how an ALVVM pass output defined by the input source is a fixed four array. Here is an example that I Want to do
Test Input Source llvm pass snippet With the source, the following LL.M. will print the following output. Output Can anyone print me tell how to apply it? Thank you very much for your help! First, the first logic not is a fixed character array; This is an indicator, so
char * msg = "Hello, World \ n"; Zero msg_out (four * in) {printf ("msg:% s \ n", in); } Main () {... msg_out (msg); ...}
... const callinst * ci = dyn_cast & lt; CallInst & gt; (Val); Const function * func = ci-> GetCalledFunction (); If (fancy-> getName () == "msg_out") {errs () & lt; & Lt; Ci- & gt; GetOperand (0); } ...
i8 * getelementptr inbounds ([8 x i8] * @ 10, i32 0, i32 0) <
getelementptr (GEP). In any case, the proper way to do this is to dereference GEP's pointer, if it is a global, then get its initial information. In your case (and gep actually since A), it should look like this:
value * op0 = ci-> GetOperand (0); If (Global Vibrant * Global = Darkcast & gt; GlobalWeible> (GP- & amp;; GetOperand (0))) (if (ConstantDataArray * array = dyn_cast & lt; ConstantDataArea (Global-to- & Gt ; GetInitializer ())) Click on {if (array-> isCString ()) Return ARAR-> GetAsCString ();}}}
No comments:
Post a Comment