diff options
author | Lang Hames <lhames@gmail.com> | 2012-10-26 22:14:10 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2012-10-26 22:14:10 +0000 |
commit | a312bb0879e95ec119a6555919ab66a29bce6a6a (patch) | |
tree | 675baf1d9a7c97c9d4542ab0cf8df3c7346cb380 | |
parent | 2962d9599e463265edae599285bbc6351f1cc0ef (diff) | |
download | bcm5719-llvm-a312bb0879e95ec119a6555919ab66a29bce6a6a.tar.gz bcm5719-llvm-a312bb0879e95ec119a6555919ab66a29bce6a6a.zip |
MCRegisterClass should be returned by const ref, not by value.
llvm-svn: 166822
-rw-r--r-- | llvm/include/llvm/MC/MCRegisterInfo.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/include/llvm/MC/MCRegisterInfo.h b/llvm/include/llvm/MC/MCRegisterInfo.h index 6749bdffc2f..f05baeaaf68 100644 --- a/llvm/include/llvm/MC/MCRegisterInfo.h +++ b/llvm/include/llvm/MC/MCRegisterInfo.h @@ -370,7 +370,7 @@ public: /// getRegClass - Returns the register class associated with the enumeration /// value. See class MCOperandInfo. - const MCRegisterClass getRegClass(unsigned i) const { + const MCRegisterClass& getRegClass(unsigned i) const { assert(i < getNumRegClasses() && "Register Class ID out of range"); return Classes[i]; } |