[llvm-commits] [llvm] r94228 - in /llvm/trunk: include/llvm/CodeGen/AsmPrinter.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Chris Lattner sabre at nondot.org
Fri Jan 22 13:57:56 PST 2010


Author: lattner
Date: Fri Jan 22 15:57:56 2010
New Revision: 94228

URL: http://llvm.org/viewvc/llvm-project?rev=94228&view=rev
Log:
inline AsmPrinter::PrintHex into its two trivial callers.

Modified:
    llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
    llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=94228&r1=94227&r2=94228&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/AsmPrinter.h (original)
+++ llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Fri Jan 22 15:57:56 2010
@@ -260,10 +260,6 @@
     // Emission and print routines
     //
 
-    /// PrintHex - Print a value as a hexidecimal value.
-    ///
-    void PrintHex(uint64_t Value) const;
-
     /// EOL - Print a newline character to asm stream.  If a comment is present
     /// then it will be printed first.  Comments should not contain '\n'.
     void EOL() const;

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=94228&r1=94227&r2=94228&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Fri Jan 22 15:57:56 2010
@@ -666,7 +666,8 @@
     unsigned char Byte = static_cast<unsigned char>(Value & 0x7f);
     Value >>= 7;
     if (Value) Byte |= 0x80;
-    PrintHex(Byte);
+    O << "0x";
+    O.write_hex(Byte);
     if (Value) O << ", ";
   } while (Value);
 }
@@ -682,7 +683,8 @@
     Value >>= 7;
     IsMore = Value != Sign || ((Byte ^ Sign) & 0x40) != 0;
     if (IsMore) Byte |= 0x80;
-    PrintHex(Byte);
+    O << "0x";
+    O.write_hex(Byte);
     if (IsMore) O << ", ";
   } while (IsMore);
 }
@@ -691,13 +693,6 @@
 // Emission and print routines
 //
 
-/// PrintHex - Print a value as a hexadecimal value.
-///
-void AsmPrinter::PrintHex(uint64_t Value) const {
-  O << "0x";
-  O.write_hex(Value);
-}
-
 /// EOL - Print a newline character to asm stream.  If a comment is present
 /// then it will be printed first.  Comments should not contain '\n'.
 void AsmPrinter::EOL() const {





More information about the llvm-commits mailing list