Create temporary variables to increase readibility

This commit is contained in:
Alessandro Di Federico
2018-04-23 08:46:46 +02:00
parent a566130825
commit 34d216eb0a
13 changed files with 91 additions and 85 deletions
+3 -3
View File
@@ -40,9 +40,9 @@ bool FunctionCallIdentification::runOnFunction(llvm::Function &F) {
PCPtrTy
};
using FT = FunctionType;
auto *FunctionCallFT = FT::get(Type::getVoidTy(C), FunctionArgsTy, false);
FunctionCall = cast<Function>(M->getOrInsertFunction("function_call",
FunctionCallFT));
auto *Ty = FT::get(Type::getVoidTy(C), FunctionArgsTy, false);
Constant *FunctionCallC = M->getOrInsertFunction("function_call", Ty);
FunctionCall = cast<Function>(FunctionCallC);
// Initialize the function, if necessary
if (FunctionCall->empty()) {