[compiler-rt] 84a64df - [memprof] Fix rawprofile test on 32-bit architectures
Marco Elver via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 8 04:08:07 PDT 2023
Author: Marco Elver
Date: 2023-06-08T13:03:08+02:00
New Revision: 84a64df3a0f6c2495cf0db420fcaf8f37dbad353
URL: https://github.com/llvm/llvm-project/commit/84a64df3a0f6c2495cf0db420fcaf8f37dbad353
DIFF: https://github.com/llvm/llvm-project/commit/84a64df3a0f6c2495cf0db420fcaf8f37dbad353.diff
LOG: [memprof] Fix rawprofile test on 32-bit architectures
The first argument of StackTrace constructor is a pointer to uptr. Match
the type accordingly.
This fixes builds on 32-bit architectures.
Added:
Modified:
compiler-rt/lib/memprof/tests/rawprofile.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/memprof/tests/rawprofile.cpp b/compiler-rt/lib/memprof/tests/rawprofile.cpp
index 3c7372afaedaa..0637ed914058d 100644
--- a/compiler-rt/lib/memprof/tests/rawprofile.cpp
+++ b/compiler-rt/lib/memprof/tests/rawprofile.cpp
@@ -19,10 +19,10 @@ using ::__sanitizer::StackDepotPut;
using ::__sanitizer::StackTrace;
using ::llvm::memprof::MemInfoBlock;
-uint64_t PopulateFakeMap(const MemInfoBlock &FakeMIB, uint64_t StackPCBegin,
+uint64_t PopulateFakeMap(const MemInfoBlock &FakeMIB, uintptr_t StackPCBegin,
MIBMapTy &FakeMap) {
constexpr int kSize = 5;
- uint64_t array[kSize];
+ uintptr_t array[kSize];
for (int i = 0; i < kSize; i++) {
array[i] = StackPCBegin + i;
}
More information about the llvm-commits
mailing list