]> granicus.if.org Git - llvm/commitdiff
[MC] Fix MachineLocation constructor broken in r294685 (NFC).
authorEugene Zelenko <eugene.zelenko@gmail.com>
Wed, 1 Mar 2017 22:28:23 +0000 (22:28 +0000)
committerEugene Zelenko <eugene.zelenko@gmail.com>
Wed, 1 Mar 2017 22:28:23 +0000 (22:28 +0000)
Problem spotted by Frej Drejhammar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296697 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MachineLocation.h

index 000ab2998ed826b52d220d4d9683fabcc753023f..f4fc6ee2fd19cc85537dfdbcb2bc43b5df23128e 100644 (file)
@@ -36,7 +36,7 @@ public:
   /// Create a direct register location.
   explicit MachineLocation(unsigned R) : IsRegister(true), Register(R) {}
   /// Create a register-indirect location with an offset.
-  MachineLocation(unsigned R, int O) : Register(R) {}
+  MachineLocation(unsigned R, int O) : Register(R), Offset(O) {}
 
   bool operator==(const MachineLocation &Other) const {
       return IsRegister == Other.IsRegister && Register == Other.Register &&