http://llvm.org/bugs/show_bug.cgi?id=20095
Bug ID: 20095
Summary: opt -print-callgraph outputs unescaped \x01 characters
from symbol names.
Product: tools
Version: 3.4
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: opt
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Apparently OSX (or maybe LLVM) uses \01 (SOH) characters for some symbol names,
e.g. @"\01_fputs" (I'm curious why such strange symbols are used?). These are
escaped in the IR from clang -S -emit-llvm. However, when opt prints them out
using -print-callgraph it does not escape them, which seems wrong. below is a
repro shell script. grep will output lines that contain actual SOH characters;
these are not visible on the command line but cause my post-processing script
to choke.
printf "#include <stdio.h>\nint main() { fputs(\"hi\\\\n\", stdout); return
0; }\n" > hi.c
clang -S -emit-llvm -o hi.llvm hi.c
opt -analyze -print-callgraph hi.llvm 2> hi.cg
grep $'\x01' hi.cg
also, despite the fact that the -print-callgraph option is clearly working, opt
is outputting the following weird message to stdout:
Printing analysis 'Print a call graph':
Pass::print not implemented for pass: 'Print a call graph'!
this is with the clang 3.4.1 binary build for darwin distributed by llvm.org.
$ clang --version
clang version 3.4.1 (tags/RELEASE_34/dot1-rc2)
Target: x86_64-apple-darwin13.2.0
Thread model: posix
$ opt --version
LLVM (http://llvm.org/):
LLVM version 3.4.1
Optimized build.
Default target: x86_64-apple-darwin13.2.0
Host CPU: core-avx-i
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs