[PATCH] D99017: [NFC][Kaleidoscope] Modify a char type typo
    David Blaikie via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Mar 22 14:56:48 PDT 2021
    
    
  
dblaikie added a comment.
Yeah, the code is correct as-is, changing it to char would be incorrect.
`getchar` returns int ( https://linux.die.net/man/3/getchar ) and needs to so it can return EOF, which isn't a char value (otherwise there'd be no way to distinguish between that char value correctly being read from the file, and the case where it indicates the end of the file)
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99017/new/
https://reviews.llvm.org/D99017
    
    
More information about the llvm-commits
mailing list