[llvm-dev] [RFC] llvm-strings tool
Strahinja Petrovic via llvm-dev
llvm-dev at lists.llvm.org
Wed Nov 2 09:09:27 PDT 2016
Hi everyone,
I have implemented llvm-strings tool, it's similar to GNU strings tool.
Input is LLVM IR file (.bc) it dumps on stdout strings from IR file,
there is also option for printing input file name (-f).
Example:
$cat test.c
#include <stdio.h>
int main() {
printf("\n\n\n\nHello world\n\n");
printf("123456789");
return 0;
}
$clang -emit-llvm -c -o test.bc test.c
$llvm-strings -f test.bc
test.bc: .str
test.bc: Hello world
test.bc: .str.1
test.bc: 123456789
test.bc: main
test.bc: printf
If someone is interested I can post patch on phabricator.
Regards,
Strahinja
More information about the llvm-dev
mailing list