[llvm-commits] CVS: llvm/lib/CodeGen/Mapping/MappingInfo.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Wed Jun 4 13:18:01 PDT 2003
Changes in directory llvm/lib/CodeGen/Mapping:
MappingInfo.cpp updated: 1.6 -> 1.7
---
Log message:
Make writeNumber() void. Get ready to decouple it from .byte directive output.
---
Diffs of the changes:
Index: llvm/lib/CodeGen/Mapping/MappingInfo.cpp
diff -u llvm/lib/CodeGen/Mapping/MappingInfo.cpp:1.6 llvm/lib/CodeGen/Mapping/MappingInfo.cpp:1.7
--- llvm/lib/CodeGen/Mapping/MappingInfo.cpp:1.6 Tue Jun 3 14:30:15 2003
+++ llvm/lib/CodeGen/Mapping/MappingInfo.cpp Wed Jun 4 13:17:22 2003
@@ -43,7 +43,7 @@
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 @@
<< 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:
More information about the llvm-commits
mailing list