IR: Extract a function 'printLLVMNameWithoutPrefix' from 'PrintLLVMName'. NFC.
authorAlex Lorenz <arphaman@gmail.com>
Tue, 21 Jul 2015 16:50:35 +0000 (16:50 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Tue, 21 Jul 2015 16:50:35 +0000 (16:50 +0000)
commit476706ed9453409422723e1ac40e8c7d5cd732e3
treec24aa9e65ad9127761ff44bb162a28ec253d5687
parenta33feabe7a8ee90e83badf4e4b3e0ffbfa46882f
IR: Extract a function 'printLLVMNameWithoutPrefix' from 'PrintLLVMName'. NFC.

This commit extracts the code that prints out a name of an LLVM value without a
prefix from a function 'PrintLLVMName' into a publicly accessible function named
'printLLVMNameWithoutPrefix'.

This change would be useful for MIR serialization, as it would allow the MIR
printer to reuse this function to print out the names of the external symbol
machine operands.

Reviewers: Duncan P. N. Exon Smith

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242803 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/IRPrintingPasses.h
lib/IR/AsmWriter.cpp