aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/GlobalISel/RegisterBank.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/GlobalISel/RegisterBank.h')
-rw-r--r--include/llvm/CodeGen/GlobalISel/RegisterBank.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/llvm/CodeGen/GlobalISel/RegisterBank.h b/include/llvm/CodeGen/GlobalISel/RegisterBank.h
index e886382fd8e83..075677d30179a 100644
--- a/include/llvm/CodeGen/GlobalISel/RegisterBank.h
+++ b/include/llvm/CodeGen/GlobalISel/RegisterBank.h
@@ -37,15 +37,16 @@ private:
/// initialized yet.
static const unsigned InvalidID;
- /// Only the RegisterBankInfo can create RegisterBank.
+ /// Only the RegisterBankInfo can initialize RegisterBank properly.
+ friend RegisterBankInfo;
+
+public:
/// The default constructor will leave the object in
/// an invalid state. I.e. isValid() == false.
- /// The field must be updated to fix that.
+ /// The fields must be updated to fix that and only
+ /// RegisterBankInfo instances are allowed to do that
RegisterBank();
- friend RegisterBankInfo;
-
-public:
/// Get the identifier of this register bank.
unsigned getID() const { return ID; }