summaryrefslogtreecommitdiff
path: root/unittests/ProfileData/InstrProfTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/ProfileData/InstrProfTest.cpp')
-rw-r--r--unittests/ProfileData/InstrProfTest.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/unittests/ProfileData/InstrProfTest.cpp b/unittests/ProfileData/InstrProfTest.cpp
index 24e2a4ecc3a..a80be3d444a 100644
--- a/unittests/ProfileData/InstrProfTest.cpp
+++ b/unittests/ProfileData/InstrProfTest.cpp
@@ -180,7 +180,8 @@ TEST_F(InstrProfTest, get_profile_summary) {
VerifySummary(PS);
// Test that conversion of summary to and from Metadata works.
- Metadata *MD = PS.getMD(getGlobalContext());
+ LLVMContext Context;
+ Metadata *MD = PS.getMD(Context);
ASSERT_TRUE(MD);
ProfileSummary *PSFromMD = ProfileSummary::getFromMD(MD);
ASSERT_TRUE(PSFromMD);
@@ -190,7 +191,7 @@ TEST_F(InstrProfTest, get_profile_summary) {
delete IPS;
// Test that summary can be attached to and read back from module.
- Module M("my_module", getGlobalContext());
+ Module M("my_module", Context);
M.setProfileSummary(MD);
MD = M.getProfileSummary();
ASSERT_TRUE(MD);