diff options
| author | Brian Gaeke <gaeke@uiuc.edu> | 2003-06-04 18:17:22 +0000 |
|---|---|---|
| committer | Brian Gaeke <gaeke@uiuc.edu> | 2003-06-04 18:17:22 +0000 |
| commit | 49833da4bf2cdf22d7ee01dc12d5fb76c7f5ca9e (patch) | |
| tree | 4b19507c8820dca95ac86077688a7a62f3941a64 /llvm/lib | |
| parent | 1f5392eb1eff88ad436735448757bec26d466672 (diff) | |
| download | bcm5719-llvm-49833da4bf2cdf22d7ee01dc12d5fb76c7f5ca9e.tar.gz bcm5719-llvm-49833da4bf2cdf22d7ee01dc12d5fb76c7f5ca9e.zip | |
Make writeNumber() void. Get ready to decouple it from .byte directive output.
llvm-svn: 6609
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/Sparc/MappingInfo.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/llvm/lib/Target/Sparc/MappingInfo.cpp b/llvm/lib/Target/Sparc/MappingInfo.cpp index 9c51bcf9dba..b79742d6650 100644 --- a/llvm/lib/Target/Sparc/MappingInfo.cpp +++ b/llvm/lib/Target/Sparc/MappingInfo.cpp @@ -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: |

