aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-07-01 21:16:27 +0000
committerOwen Anderson <resistor@mac.com>2008-07-01 21:16:27 +0000
commit367bfbb1143c437fd1733d985d260513303d2e85 (patch)
tree29874cdf27f76747f32bd0732854fd53d9b925d0 /lib
parentbc0fafc9774f58d517fdb1c3ec189f5d0b219f8d (diff)
downloadexternal_llvm-367bfbb1143c437fd1733d985d260513303d2e85.zip
external_llvm-367bfbb1143c437fd1733d985d260513303d2e85.tar.gz
external_llvm-367bfbb1143c437fd1733d985d260513303d2e85.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52981 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/AsmPrinter.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp
index a682a3f..1320663 100644
--- a/lib/CodeGen/AsmPrinter.cpp
+++ b/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 {