mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-30 00:31:25 +00:00
c86b8d5c46
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
39 lines
1.1 KiB
C++
39 lines
1.1 KiB
C++
//===- 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 *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
|