diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2003-06-04 22:02:47 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2003-06-04 22:02:47 +0000 |
commit | c86b8d5c462cd73a3393d9ab43825969da1ac4cd (patch) | |
tree | 28607b3b3fb6e2f73b6cfd7b93ba3ce1b171e504 | |
parent | e5d4293cbaa8ad76c763e05ac84b4e589a45550b (diff) | |
download | external_llvm-c86b8d5c462cd73a3393d9ab43825969da1ac4cd.zip external_llvm-c86b8d5c462cd73a3393d9ab43825969da1ac4cd.tar.gz external_llvm-c86b8d5c462cd73a3393d9ab43825969da1ac4cd.tar.bz2 |
Add file comment. Include <vector> and <string>. Update include guards
to reflect file's current location. Add definition of class
MappingInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6616 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/SparcV9/MappingInfo.h | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/lib/Target/SparcV9/MappingInfo.h b/lib/Target/SparcV9/MappingInfo.h index aa8efaf..c3177de 100644 --- a/lib/Target/SparcV9/MappingInfo.h +++ b/lib/Target/SparcV9/MappingInfo.h @@ -1,11 +1,38 @@ -#ifndef LLVM_CODEGEN_MAPPINGINFO_H -#define LLVM_CODEGEN_MAPPINGINFO_H +//===- llvm/Reoptimizer/Mapping/MappingInfo.h ------------------*- C++ -*--=//// +// +// Data structures to support the Reoptimizer's Instruction-to-MachineInstr +// mapping information gatherer. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_REOPTIMIZER_MAPPING_MAPPINGINFO_H +#define LLVM_REOPTIMIZER_MAPPING_MAPPINGINFO_H #include <iosfwd> +#include <vector> +#include <string> class Pass; -Pass *MappingInfoForFunction(std::ostream &out); - -#endif +Pass *getMappingInfoCollector(std::ostream &out); +class MappingInfo { + class byteVector : public std::vector <unsigned char> { + public: + void dumpAssembly (std::ostream &Out); + }; + std::string comment; + std::string symbolPrefix; + unsigned functionNumber; + byteVector bytes; +public: + void outByte (unsigned char b) { bytes.push_back (b); } + MappingInfo (std::string _comment, std::string _symbolPrefix, + unsigned _functionNumber) : comment(_comment), + symbolPrefix(_symbolPrefix), functionNumber(_functionNumber) { } + void dumpAssembly (std::ostream &Out); + unsigned char *getBytes (unsigned int &length) { + length = bytes.size(); return &bytes[0]; + } +}; +#endif |