[memprof] Fix unit test build after refactoring shared header. The memprof unittest also needs to include the MemProfData.inc header directly to have access to MEMPROF_RAW_MAGIC and MEMPROF_RAW_VERSION globals. GitOrigin-RevId: a2ce97cc3f99c8af80b2325acf03a4c171ffb48f
diff --git a/lib/memprof/tests/CMakeLists.txt b/lib/memprof/tests/CMakeLists.txt index 1dfd783..ab6c716 100644 --- a/lib/memprof/tests/CMakeLists.txt +++ b/lib/memprof/tests/CMakeLists.txt
@@ -23,6 +23,8 @@ rawprofile.cpp driver.cpp) +include_directories(../../../include) + set(MEMPROF_UNIT_TEST_HEADERS ${MEMPROF_HEADERS})
diff --git a/lib/memprof/tests/rawprofile.cpp b/lib/memprof/tests/rawprofile.cpp index 4404ab8..29bc3b5 100644 --- a/lib/memprof/tests/rawprofile.cpp +++ b/lib/memprof/tests/rawprofile.cpp
@@ -1,6 +1,10 @@ #include "memprof/memprof_rawprofile.h" +#include <cstdint> +#include <memory> + #include "memprof/memprof_meminfoblock.h" +#include "profile/MemProfData.inc" #include "sanitizer_common/sanitizer_common.h" #include "sanitizer_common/sanitizer_procmaps.h" #include "sanitizer_common/sanitizer_stackdepot.h" @@ -8,8 +12,6 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#include <memory> - namespace { using ::__memprof::MemInfoBlock;