mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-04 05:17:07 +00:00 
			
		
		
		
	[CodeGen] Report error rather than crash when unable to makeLibCall.
Also, make the assumption explicit in the header. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233329 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		@@ -2030,6 +2030,7 @@ public:
 | 
			
		||||
                           ISD::CondCode &CCCode, SDLoc DL) const;
 | 
			
		||||
 | 
			
		||||
  /// Returns a pair of (return value, chain).
 | 
			
		||||
  /// It is an error to pass RTLIB::UNKNOWN_LIBCALL as \p LC.
 | 
			
		||||
  std::pair<SDValue, SDValue> makeLibCall(SelectionDAG &DAG, RTLIB::Libcall LC,
 | 
			
		||||
                                          EVT RetVT, const SDValue *Ops,
 | 
			
		||||
                                          unsigned NumOps, bool isSigned,
 | 
			
		||||
 
 | 
			
		||||
@@ -100,6 +100,8 @@ TargetLowering::makeLibCall(SelectionDAG &DAG,
 | 
			
		||||
    Entry.isZExt = !shouldSignExtendTypeInLibCall(Ops[i].getValueType(), isSigned);
 | 
			
		||||
    Args.push_back(Entry);
 | 
			
		||||
  }
 | 
			
		||||
  if (LC == RTLIB::UNKNOWN_LIBCALL)
 | 
			
		||||
    report_fatal_error("Unsupported library call operation!");
 | 
			
		||||
  SDValue Callee = DAG.getExternalSymbol(getLibcallName(LC), getPointerTy());
 | 
			
		||||
 | 
			
		||||
  Type *RetTy = RetVT.getTypeForEVT(*DAG.getContext());
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user