[llvm-dev] What characters can be assumed never appear in a .ll converted from .bc file?

Eli Friedman via llvm-dev llvm-dev at lists.llvm.org
Tue Jan 22 11:59:45 PST 2019

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.


Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

More information about the llvm-dev mailing list