Peng Yu via llvm-dev
2019-Jan-22 19:52 UTC
[llvm-dev] What characters can be assumed never appear in a .ll converted from .bc file?
Hi, I check some .bc converted .ll files. The only have characters from \x20 (ASCII space) and ~ (ASCII code \x7e or 126 in decimal) plus newline. (So only newline from the 32 control characters appears plus the rest ASCII code.) Can I assume .ll converted from .bc only have the ASCII code from 20 to 126 plus newline? Thanks. -- Regards, Peng
Eli Friedman via llvm-dev
2019-Jan-22 19:59 UTC
[llvm-dev] What characters can be assumed never appear in a .ll converted from .bc file?
On 1/22/2019 11:52 AM, Peng Yu via llvm-dev wrote:> Hi, > > I check some .bc converted .ll files. The only have characters from > \x20 (ASCII space) and ~ (ASCII code \x7e or 126 in decimal) plus > newline. (So only newline from the 32 control characters appears plus > the rest ASCII code.) > > Can I assume .ll converted from .bc only have the ASCII code from 20 > to 126 plus newline? Thanks.Yes, that should be safe. Strings/symbols/etc. go through llvm::printLLVMNameWithoutPrefix, which will escape anything outside of that range. -Eli -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project