File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
3030  // / Note: This is different from what is returned by
3131  // / mlir::Builder::getStringAttr() which is an mlir::StringAttr.
3232  mlir::Attribute getString (llvm::StringRef str, mlir::Type eltTy,
33-                             unsigned  size) {
34-     unsigned  finalSize = size ? size : str.size ();
33+                             std::optional< size_t >  size) {
34+     size_t  finalSize = size ? * size : str.size ();
3535
3636    size_t  lastNonZeroPos = str.find_last_not_of (' \0 '  );
3737    //  If the string is full of null bytes, emit a #cir.zero rather than
@@ -41,7 +41,7 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
4141      return  cir::ZeroAttr::get (arrayTy);
4242    }
4343    //  We emit trailing zeros only if there are multiple trailing zeros.
44-     int  trailingZerosNum = 0 ;
44+     size_t  trailingZerosNum = 0 ;
4545    if  (finalSize > lastNonZeroPos + 2 )
4646      trailingZerosNum = finalSize - lastNonZeroPos - 1 ;
4747    auto  truncatedArrayTy =
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments