[llvm-branch-commits] [libunwind] 816988d - [libunwind] Avoid a warning in 32 bit builds. NFC.

Fangrui Song via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Feb 9 13:55:11 PST 2022


Author: Martin Storsjö
Date: 2022-02-09T13:55:02-08:00
New Revision: 816988d19a7a2bb72daf4a62a59e96384bf5f2e1

URL: https://github.com/llvm/llvm-project/commit/816988d19a7a2bb72daf4a62a59e96384bf5f2e1
DIFF: https://github.com/llvm/llvm-project/commit/816988d19a7a2bb72daf4a62a59e96384bf5f2e1.diff

LOG: [libunwind] Avoid a warning in 32 bit builds. NFC.

The warning was introduced with the recently merged SPARCv9
support in 2b9554b8850192bdd86c02eb671de1d866df8d87.

The cast matches the existing surrounding cases.

Differential Revision: https://reviews.llvm.org/D119353

(cherry picked from commit dfa5ab7b2b510e68ca2b11b043898c192633c0f6)

Added: 
    

Modified: 
    libunwind/src/DwarfInstructions.hpp

Removed: 
    


################################################################################
diff  --git a/libunwind/src/DwarfInstructions.hpp b/libunwind/src/DwarfInstructions.hpp
index c1a241c55ce66..ab83b0c87acdc 100644
--- a/libunwind/src/DwarfInstructions.hpp
+++ b/libunwind/src/DwarfInstructions.hpp
@@ -91,8 +91,8 @@ typename A::pint_t DwarfInstructions<A, R>::getSavedRegister(
     return (pint_t)addressSpace.getRegister(cfa + (pint_t)savedReg.value);
 
   case CFI_Parser<A>::kRegisterInCFADecrypt: // sparc64 specific
-    return addressSpace.getP(cfa + (pint_t)savedReg.value) ^
-           getSparcWCookie(registers, 0);
+    return (pint_t)(addressSpace.getP(cfa + (pint_t)savedReg.value) ^
+           getSparcWCookie(registers, 0));
 
   case CFI_Parser<A>::kRegisterAtExpression:
     return (pint_t)addressSpace.getRegister(evaluateExpression(


        


More information about the llvm-branch-commits mailing list