I am new to llvm and I am trying to generate .ll file using below command.
clang -S -O0 -emit-llvm 1.c
But in the generated 1.ll file, basic blocks & instructions have no name.So when I try to print names of basic blocks using basicblock.getName()
in my code it will print nothing. Can someone please help me to generate names on .ll file?
AFAIK, the Clang code generator (the part that creates the LLVM IR) only name the LLVM registers if clang itself is compiled in debug mode.
Be aware that the names are not relevant for the semantics of the program, so aren't really needed.