Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Implementation of Programming Languages / Transpiler / src / LLVMVisitor / Register.h
blob: ff5112937d3128b911e52970f1eee06fe0ad9b36 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef LLVMVISITOR_REGISTER
#define LLVMVISITOR_REGISTER

#include <string>
#include <ostream>

class Register {
	std::string prepend;
	unsigned counter;

public:
	Register(std::string prepend);
	Register& operator++();
	Register operator++(int);
	std::string operator*() const;
	void reset();
};

std::ostream& operator<<(std::ostream& ostr, const Register& reg);

#endif