diff options
author | Owen Anderson <resistor@mac.com> | 2008-07-01 21:16:27 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-07-01 21:16:27 +0000 |
commit | 1d952533c201d2dc8c297c71cafbcd850f92d722 (patch) | |
tree | e4959a2abdb3f381efce716359ccf99236d20489 /llvm/lib/CodeGen | |
parent | c362465dad7ce69fb763156d4ab99af7e0a6dfe5 (diff) | |
download | bcm5719-llvm-1d952533c201d2dc8c297c71cafbcd850f92d722.tar.gz bcm5719-llvm-1d952533c201d2dc8c297c71cafbcd850f92d722.zip |
Add a version of AsmPrinter::EOL that takes a const char* so that we don't have to do as many implicit std::string constructions.
Unfortunately, this doesn't appear to translate to a real speedup in practice.
llvm-svn: 52981
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp index a682a3f5a88..13206633972 100644 --- a/llvm/lib/CodeGen/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter.cpp @@ -551,6 +551,7 @@ void AsmPrinter::PrintHex(int Value) const { void AsmPrinter::EOL() const { O << '\n'; } + void AsmPrinter::EOL(const std::string &Comment) const { if (AsmVerbose && !Comment.empty()) { O << '\t' @@ -561,6 +562,16 @@ void AsmPrinter::EOL(const std::string &Comment) const { O << '\n'; } +void AsmPrinter::EOL(const char* Comment) const { + if (AsmVerbose && *Comment) { + O << '\t' + << TAI->getCommentString() + << ' ' + << Comment; + } + O << '\n'; +} + /// EmitULEB128Bytes - Emit an assembler byte data directive to compose an /// unsigned leb128 value. void AsmPrinter::EmitULEB128Bytes(unsigned Value) const { |