Skip to content

Commit a2ce97c

Browse files
author
Snehasish Kumar
committed
[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.
1 parent ad45df9 commit a2ce97c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

compiler-rt/lib/memprof/tests/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ set(MEMPROF_UNITTESTS
2323
rawprofile.cpp
2424
driver.cpp)
2525

26+
include_directories(../../../include)
27+
2628
set(MEMPROF_UNIT_TEST_HEADERS
2729
${MEMPROF_HEADERS})
2830

compiler-rt/lib/memprof/tests/rawprofile.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
#include "memprof/memprof_rawprofile.h"
22

3+
#include <cstdint>
4+
#include <memory>
5+
36
#include "memprof/memprof_meminfoblock.h"
7+
#include "profile/MemProfData.inc"
48
#include "sanitizer_common/sanitizer_common.h"
59
#include "sanitizer_common/sanitizer_procmaps.h"
610
#include "sanitizer_common/sanitizer_stackdepot.h"
711
#include "sanitizer_common/sanitizer_stacktrace.h"
812
#include "gmock/gmock.h"
913
#include "gtest/gtest.h"
1014

11-
#include <memory>
12-
1315
namespace {
1416

1517
using ::__memprof::MemInfoBlock;

0 commit comments

Comments
 (0)