IRCanonicalization: Add MakeLocalVariables pass

This commit is contained in:
Alvise de Faveri
2022-06-15 17:45:05 +02:00
committed by Pietro Fezzardi
parent da46b38644
commit f7866ddd85
7 changed files with 179 additions and 1 deletions
+6
View File
@@ -287,6 +287,12 @@ static TypeVector getReturnTypes(const llvm::CallInst *Call,
ReturnTypes.push_back(It->second);
}
} else if (FunctionTags::LocalVariable.isTagOf(CalledFunc)) {
StringRef StringOp = extractFromConstantStringPtr(Call->getArgOperand(0));
const model::QualifiedType VarType = parseQualifiedType(StringOp, Model);
ReturnTypes.push_back(VarType);
} else if (FunctionTags::StructInitializer.isTagOf(CalledFunc)) {
// Struct initializers are only used to pack together return values of
// RawFunctionTypes that return multiple values, therefore they have the