summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2003-06-04 22:02:47 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2003-06-04 22:02:47 +0000
commit44b2d7a56ff2a1d7db22bbcb35a4f8331b13fd48 (patch)
tree9a28f5c11ac22fc140f75892cc77b005a51aa219 /llvm/lib/Target/Sparc
parent365a47bdbb18c0baf50d42a69b32ca6db5d12ea0 (diff)
downloadbcm5719-llvm-44b2d7a56ff2a1d7db22bbcb35a4f8331b13fd48.tar.gz
bcm5719-llvm-44b2d7a56ff2a1d7db22bbcb35a4f8331b13fd48.zip
Add file comment. Include <vector> and <string>. Update include guards
to reflect file's current location. Add definition of class MappingInfo. llvm-svn: 6616
Diffstat (limited to 'llvm/lib/Target/Sparc')
-rw-r--r--llvm/lib/Target/Sparc/MappingInfo.h37
1 files changed, 32 insertions, 5 deletions
diff --git a/llvm/lib/Target/Sparc/MappingInfo.h b/llvm/lib/Target/Sparc/MappingInfo.h
index aa8efaf893e..c3177dec370 100644
--- a/llvm/lib/Target/Sparc/MappingInfo.h
+++ b/llvm/lib/Target/Sparc/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
OpenPOWER on IntegriCloud