Make writeNumber() void. Get ready to decouple it from .byte directive output.
authorBrian Gaeke <gaeke@uiuc.edu>
Wed, 4 Jun 2003 18:17:22 +0000 (18:17 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Wed, 4 Jun 2003 18:17:22 +0000 (18:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6609 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SparcV9/MappingInfo.cpp

index 9c51bcf9dbaa9ca5f4efd6f7b913dd2fa112bdfc..b79742d6650910f5ae6993c13f07f5fbd34a128f 100644 (file)
@@ -43,7 +43,7 @@ namespace {
     void create_MI_to_number_Key(Function &FI);
     void writeBBToMImap(Function &FI, unsigned num);
     void writeLLVMToMImap(Function &FI, unsigned num);
-    unsigned writeNumber(unsigned X);
+    void writeNumber(unsigned X);
   };
 }
 
@@ -104,19 +104,24 @@ void getMappingInfoForFunction::writeEpilogue(const std::string &symbolPrefix,
       << num << "\n\n\n\n";
 }
 
+/// outByte -- NOT DONE YET.
+void outByte (unsigned char b) {
+  Out << "\t.byte " << tmp << "\n";
+}
+
+
 /// writeNumber -- Write out the number X as a sequence of .byte
 /// directives to the current output stream Out. This method performs a
 /// run-length encoding of the unsigned integers X that are output.
-unsigned getMappingInfoForFunction::writeNumber(unsigned X) {
+void getMappingInfoForFunction::writeNumber(unsigned X) {
   unsigned i=0;
   do {
     unsigned tmp = X & 127;
     X >>= 7;
     if (X) tmp |= 128;
-    Out << "\t.byte " << tmp << "\n";
+    outByte (tmp);
     ++i;
   } while(X);
-  return i;
 }
 
 /// doInitialization -- Assign a number to each Function, as follows: