Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Implementation of Programming Languages / Transpiler / src / LLVMVisitor / Register.h
blob: 40592e7ad63854d63db2cd318e982a19bd80d451 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#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::string headless();
};

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

#endif