MCPcopy Create free account
hub / github.com/avast/retdec / getConfigStackVariable

Method getConfigStackVariable

src/bin2llvmir/providers/config.cpp:207–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207retdec::common::Object* Config::getConfigStackVariable(
208 const llvm::Value* val)
209{
210 auto* a = dyn_cast_or_null<AllocaInst>(val);
211 if (a == nullptr)
212 {
213 return nullptr;
214 }
215 auto* cf = getConfigFunction(a->getFunction());
216 if (cf == nullptr)
217 {
218 return nullptr;
219 }
220 auto* cl = const_cast<retdec::common::Object*>(
221 cf->locals.getObjectByName(a->getName()));
222 return cl && cl->getStorage().isStack() ? cl : nullptr;
223}
224
225/**
226 * @return LLVM alloca instruction for stack variable with offset @a offset in

Callers 2

getStackVariableMethod · 0.45
TEST_FFunction · 0.45

Calls 4

getObjectByNameMethod · 0.80
isStackMethod · 0.80
getFunctionMethod · 0.45
getNameMethod · 0.45

Tested by 1

TEST_FFunction · 0.36