[llvm] 8bea83b - [NFC][GlobalISel] Fix case of local variable
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 13 14:12:04 PST 2023
Author: Vitaly Buka
Date: 2023-12-13T14:10:28-08:00
New Revision: 8bea83b8f5adae8abc5d6a6695c756a616201aa7
URL: https://github.com/llvm/llvm-project/commit/8bea83b8f5adae8abc5d6a6695c756a616201aa7
DIFF: https://github.com/llvm/llvm-project/commit/8bea83b8f5adae8abc5d6a6695c756a616201aa7.diff
LOG: [NFC][GlobalISel] Fix case of local variable
Added:
Modified:
llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutor.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutor.h b/llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutor.h
index 724f39634297a4..694d3d8004afff 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutor.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutor.h
@@ -690,9 +690,9 @@ class GIMatchTableExecutor {
bool isObviouslySafeToFold(MachineInstr &MI, MachineInstr &IntoMI) const;
template <typename Ty> static Ty readBytesAs(const uint8_t *MatchTable) {
- Ty res;
- memcpy(&res, MatchTable, sizeof(res));
- return res;
+ Ty Ret;
+ memcpy(&Ret, MatchTable, sizeof(Ret));
+ return Ret;
}
};
More information about the llvm-commits
mailing list