gollvm: sync with trunk at 09629215c272

Adapt to some additional changes in the IR builder and
remark header files.

Change-Id: I47ec6bd2d271a2367b39253e15cd1920379b6bd0
Reviewed-on: https://go-review.googlesource.com/c/gollvm/+/384694
Trust: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
diff --git a/driver/CompileGo.cpp b/driver/CompileGo.cpp
index 9a241fa..6affe49 100644
--- a/driver/CompileGo.cpp
+++ b/driver/CompileGo.cpp
@@ -51,6 +51,7 @@
 #include "llvm/Option/OptTable.h"
 #include "llvm/Option/Option.h"
 #include "llvm/Passes/PassBuilder.h"
+#include "llvm/Remarks/RemarkStreamer.h"
 #include "llvm/Remarks/YAMLRemarkSerializer.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Debug.h"
diff --git a/passes/GoStatepoints.cpp b/passes/GoStatepoints.cpp
index e1279e9..3542a4f 100644
--- a/passes/GoStatepoints.cpp
+++ b/passes/GoStatepoints.cpp
@@ -1511,8 +1511,10 @@
     // the "gc arg" slots, of the statepoint. Both are recorded in the stack
     // map the same way. The difference is that "deopt arg" doesn't need
     // relocation. We're implementing non-moving GC (for now).
+    FunctionCallee FCallTarget(Call->getFunctionType(),
+                              Call->getCalledOperand());
     InvokeInst *Invoke = Builder.CreateGCStatepointInvoke(
-        StatepointID, NumPatchBytes, CallTarget, ToReplace->getNormalDest(),
+        StatepointID, NumPatchBytes, FCallTarget, ToReplace->getNormalDest(),
         ToReplace->getUnwindDest(), CallArgs, GCArgs, ArrayRef<Value*>(),
         "statepoint_token");