MCRegisterClass should be returned by const ref, not by value.
authorLang Hames <lhames@gmail.com>
Fri, 26 Oct 2012 22:14:10 +0000 (22:14 +0000)
committerLang Hames <lhames@gmail.com>
Fri, 26 Oct 2012 22:14:10 +0000 (22:14 +0000)
llvm-svn: 166822

llvm/include/llvm/MC/MCRegisterInfo.h

index 6749bdffc2f563fe8e0e7cd5a2e90b694a779562..f05baeaaf6899b7313c9bed548c0a96d28a0b8bc 100644 (file)
@@ -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];
   }