changeset 177:4cb147291890

fix ImmutableCallSite to CallBase at SelectionDAGBuilder.cpp
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Tue, 26 May 2020 19:15:36 +0900
parents de4ac79aef9d
children ba35c55b642b
files llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
diffstat 1 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp	Mon May 25 17:13:11 2020 +0900
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp	Tue May 26 19:15:36 2020 +0900
@@ -7162,28 +7162,28 @@
           CB.countOperandBundlesOfType(LLVMContext::OB_preallocated) != 0);
 #ifndef noCbC
   // variable arguments check.
-  if (CLI.RetTy->is__CodeTy() && CS.getCaller()->getReturnType()->is__CodeTy() && CLI.IsVarArg) {
+  if (CLI.RetTy->is__CodeTy() && CB.getCaller()->getReturnType()->is__CodeTy() && CLI.IsVarArg) {
     CLI.CallConv = CallingConv::C;
     errs().changeColor(raw_ostream::MAGENTA, true);
-    if (CS.getCalledFunction()) {// if this codesegment call is a direct access; ex)  goto codesegment();
+    if (CB.getCalledFunction()) {// if this codesegment call is a direct access; ex)  goto codesegment();
       errs() << "warning: ";
       errs().resetColor();
-      errs() << CS.getCaller()->getName() + " : Tail call elimination was failed on goto"
-        + CS.getCalledFunction()->getName() + ". Write a exactly prototype declaration.\n";
-    }
-    else if (CS.getCalledValue()->getType()->isPointerTy()) {// if it is a pointer access; ex) goto codesegmentPointer;
+      errs() << CB.getCaller()->getName() + " : Tail call elimination was failed on goto"
+        + CB.getCalledFunction()->getName() + ". Write a exactly prototype declaration.\n";
+    }
+    else if (CB.getCalledValue()->getType()->isPointerTy()) {// if it is a pointer access; ex) goto codesegmentPointer;
       errs() << "warning: ";
       errs().resetColor();
-      errs() << CS.getCaller()->getName() + " : Tail call elimination was failed on pointer accessed goto. Write a exactly prototype declaration.\n";
+      errs() << CB.getCaller()->getName() + " : Tail call elimination was failed on pointer accessed goto. Write a exactly prototype declaration.\n";
     }
   }
   // if code segment's tail call flag was changed false , we report it on error.
-  if (CLI.RetTy->is__CodeTy() && CS.getCaller()->getReturnType()->is__CodeTy() && !isTailCall && !CLI.IsVarArg) {
-    if (CS.getCalledFunction()) { // if this codesegment call is a direct access; ex)  goto codesegment();
-      errs() << "warning: " + CS.getCaller()->getName() + " : Tail call elimination was failed on goto " +
-                                   CS.getCalledFunction()->getName() + " !";
-    } else if (CS.getCalledValue()->getType()->isPointerTy()) { // if it is a pointer access; ex) goto codesegmentPointer;
-      errs() << "warning: " + CS.getCaller()->getName() +
+  if (CLI.RetTy->is__CodeTy() && CB.getCaller()->getReturnType()->is__CodeTy() && !isTailCall && !CLI.IsVarArg) {
+    if (CB.getCalledFunction()) { // if this codesegment call is a direct access; ex)  goto codesegment();
+      errs() << "warning: " + CB.getCaller()->getName() + " : Tail call elimination was failed on goto " +
+                                   CB.getCalledFunction()->getName() + " !";
+    } else if (CB.getCalledValue()->getType()->isPointerTy()) { // if it is a pointer access; ex) goto codesegmentPointer;
+      errs() << "warning: " + CB.getCaller()->getName() +
                                   " : Tail call elimination was failed on codesegment which is accessed by pointer!"; // we can't get name from Type...
     }
   }