| 205 | } |
| 206 | |
| 207 | retdec::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 |