MCPcopy Create free account
hub / github.com/Samsung/UTopia / isInitializedLocalVariable

Method isInitializedLocalVariable

lib/inputanalysis/DefAnalyzer.cpp:260–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260bool DefAnalyzer::isInitializedLocalVariable(const RDNode &Node) const {
261 auto &IR = Node.getTarget().getIR();
262 if (!llvm::isa<llvm::AllocaInst>(&IR))
263 return false;
264
265 auto D = Node.getDefinition();
266 if (!D.first)
267 return false;
268
269 auto *ADN = ASTMap->getASTDefNode(*D.first, D.second);
270 if (!ADN || !ADN->getAssigned())
271 return false;
272
273 return true;
274}
275
276bool DefAnalyzer::isInvalidRDNode(ASTIRMap &Map, const RDNode &Node) const {
277 auto D = Node.getDefinition();

Callers

nothing calls this directly

Calls 3

getDefinitionMethod · 0.80
getAssignedMethod · 0.80
getASTDefNodeMethod · 0.45

Tested by

no test coverage detected