diff options
author | John McCall <rjmccall@apple.com> | 2016-10-26 23:46:34 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2016-10-26 23:46:34 +0000 |
commit | b92ab1afd5aa1418402918ef70380ccb9470af7b (patch) | |
tree | 5d650c681c9a1aa0865add5522af59e98e39d023 /clang/lib/CodeGen/CGDecl.cpp | |
parent | 48ef6ca0c381cf7b90592ceba9239757b54723cb (diff) | |
download | bcm5719-llvm-b92ab1afd5aa1418402918ef70380ccb9470af7b.tar.gz bcm5719-llvm-b92ab1afd5aa1418402918ef70380ccb9470af7b.zip |
Refactor call emission to package the function pointer together with
abstract information about the callee. NFC.
The goal here is to make it easier to recognize indirect calls and
trigger additional logic in certain cases. That logic will come in
a later patch; in the meantime, I felt that this was a significant
improvement to the code.
llvm-svn: 285258
Diffstat (limited to 'clang/lib/CodeGen/CGDecl.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDecl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index 7eaa6f62f0a..d527ac47e82 100644 --- a/clang/lib/CodeGen/CGDecl.cpp +++ b/clang/lib/CodeGen/CGDecl.cpp @@ -535,7 +535,8 @@ namespace { CallArgList Args; Args.add(RValue::get(Arg), CGF.getContext().getPointerType(Var.getType())); - CGF.EmitCall(FnInfo, CleanupFn, ReturnValueSlot(), Args); + auto Callee = CGCallee::forDirect(CleanupFn); + CGF.EmitCall(FnInfo, Callee, ReturnValueSlot(), Args); } }; } // end anonymous namespace |