Merge pull request #3000 from dgryski/master

Fix formatting of multiline code blocks in asm-comments
This commit is contained in:
Tim Chevalier 2012-07-23 14:39:08 -07:00
commit 4806a4f120
1 changed files with 1 additions and 1 deletions

View File

@ -653,7 +653,7 @@ fn add_comment(bcx: block, text: ~str) {
let ccx = bcx.ccx();
if !ccx.sess.no_asm_comments() {
let sanitized = str::replace(text, ~"$", ~"");
let comment_text = ~"# " + sanitized;
let comment_text = ~"# " + str::replace(sanitized, ~"\n", ~"\n\t# ");
let asm = str::as_c_str(comment_text, |c| {
str::as_c_str(~"", |e| {
count_insn(bcx, ~"inlineasm");