10
10
#include " llvm/Support/Debug.h"
11
11
#include < sstream>
12
12
13
- using namespace llvm ;
14
- using namespace sandboxir ;
13
+ using namespace llvm ::sandboxir;
15
14
16
- sandboxir:: Value::Value (ClassID SubclassID, llvm::Value *Val, Context &Ctx)
15
+ Value::Value (ClassID SubclassID, llvm::Value *Val, Context &Ctx)
17
16
: SubclassID(SubclassID), Val(Val), Ctx(Ctx) {
18
17
#ifndef NDEBUG
19
18
UID = 0 ; // FIXME: Once SBContext is available.
20
19
#endif
21
20
}
22
21
23
22
#ifndef NDEBUG
24
- std::string sandboxir:: Value::getName () const {
23
+ std::string Value::getName () const {
25
24
std::stringstream SS;
26
25
SS << " SB" << UID << " ." ;
27
26
return SS.str ();
28
27
}
29
28
30
- void sandboxir:: Value::dumpCommonHeader (raw_ostream &OS) const {
29
+ void Value::dumpCommonHeader (raw_ostream &OS) const {
31
30
OS << getName () << " " << getSubclassIDStr (SubclassID) << " " ;
32
31
}
33
32
34
- void sandboxir:: Value::dumpCommonFooter (raw_ostream &OS) const {
33
+ void Value::dumpCommonFooter (raw_ostream &OS) const {
35
34
OS.indent (2 ) << " Val: " ;
36
35
if (Val)
37
36
OS << *Val;
@@ -40,26 +39,26 @@ void sandboxir::Value::dumpCommonFooter(raw_ostream &OS) const {
40
39
OS << " \n " ;
41
40
}
42
41
43
- void sandboxir:: Value::dumpCommonPrefix (raw_ostream &OS) const {
42
+ void Value::dumpCommonPrefix (raw_ostream &OS) const {
44
43
if (Val)
45
44
OS << *Val;
46
45
else
47
46
OS << " NULL " ;
48
47
}
49
48
50
- void sandboxir:: Value::dumpCommonSuffix (raw_ostream &OS) const {
49
+ void Value::dumpCommonSuffix (raw_ostream &OS) const {
51
50
OS << " ; " << getName () << " (" << getSubclassIDStr (SubclassID) << " ) "
52
51
<< this ;
53
52
}
54
53
55
- void sandboxir:: Value::printAsOperandCommon (raw_ostream &OS) const {
54
+ void Value::printAsOperandCommon (raw_ostream &OS) const {
56
55
if (Val)
57
56
Val->printAsOperand (OS);
58
57
else
59
58
OS << " NULL " ;
60
59
}
61
60
62
- void sandboxir:: User::dumpCommonHeader (raw_ostream &OS) const {
61
+ void User::dumpCommonHeader (raw_ostream &OS) const {
63
62
Value::dumpCommonHeader (OS);
64
63
// TODO: This is incomplete
65
64
}
0 commit comments