[llvm] 42487ea - [CallSite removal][CodeGen] Use CallBase instead of ImmutableCallSite in SwiftErrorValueTracking. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 00:20:37 PDT 2020


Author: Craig Topper
Date: 2020-04-13T00:19:27-07:00
New Revision: 42487eafa6cfe83a8467e02bfdb50cd980ccb87c

URL: https://github.com/llvm/llvm-project/commit/42487eafa6cfe83a8467e02bfdb50cd980ccb87c
DIFF: https://github.com/llvm/llvm-project/commit/42487eafa6cfe83a8467e02bfdb50cd980ccb87c.diff

LOG: [CallSite removal][CodeGen] Use CallBase instead of ImmutableCallSite in SwiftErrorValueTracking. NFC

Added: 
    

Modified: 
    llvm/lib/CodeGen/SwiftErrorValueTracking.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/SwiftErrorValueTracking.cpp b/llvm/lib/CodeGen/SwiftErrorValueTracking.cpp
index c72a04276a4f..dd0b9d4c2e48 100644
--- a/llvm/lib/CodeGen/SwiftErrorValueTracking.cpp
+++ b/llvm/lib/CodeGen/SwiftErrorValueTracking.cpp
@@ -264,11 +264,10 @@ void SwiftErrorValueTracking::preassignVRegs(
 
   // Iterator over instructions and assign vregs to swifterror defs and uses.
   for (auto It = Begin; It != End; ++It) {
-    ImmutableCallSite CS(&*It);
-    if (CS) {
+    if (auto *CB = dyn_cast<CallBase>(&*It)) {
       // A call-site with a swifterror argument is both use and def.
       const Value *SwiftErrorAddr = nullptr;
-      for (auto &Arg : CS.args()) {
+      for (auto &Arg : CB->args()) {
         if (!Arg->isSwiftError())
           continue;
         // Use of swifterror.


        


More information about the llvm-commits mailing list