HomePhabricator

[IR] Properly handle escape characters in Attribute::getAsString()

Description

[IR] Properly handle escape characters in Attribute::getAsString()

If an attribute name has special characters such as '\01', it is not
properly printed in LLVM assembly language format. Since the format
expects the special characters are printed as it is, it has to contain
escape characters to make it printable.

Before:

attributes #0 = { ... "counting-function"="^A__gnu_mcount_nc" ...

After:

attributes #0 = { ... "counting-function"="\01__gnu_mcount_nc" ...

Reviewers: hfinkel, rengolin, rjmccall, compnerd

Subscribers: nemanjai, mcrosier, hans, shenhan, majnemer, llvm-commits

Differential Revision: https://reviews.llvm.org/D23792

Details

Committed
honggyu.kimSep 1 2016, 4:44 AM
Differential Revision
D23792: IR: Properly handle escape characters in Attribute::getAsString()
Parents
rL280356: Minidump parsing
Branches
Unknown
Tags
Unknown