[llvm] r258276 - Fix a bug in test

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 19 18:49:53 PST 2016


Author: davidxl
Date: Tue Jan 19 20:49:53 2016
New Revision: 258276

URL: http://llvm.org/viewvc/llvm-project?rev=258276&view=rev
Log:
Fix a bug in test

Modified:
    llvm/trunk/unittests/ProfileData/InstrProfTest.cpp

Modified: llvm/trunk/unittests/ProfileData/InstrProfTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ProfileData/InstrProfTest.cpp?rev=258276&r1=258275&r2=258276&view=diff
==============================================================================
--- llvm/trunk/unittests/ProfileData/InstrProfTest.cpp (original)
+++ llvm/trunk/unittests/ProfileData/InstrProfTest.cpp Tue Jan 19 20:49:53 2016
@@ -688,8 +688,8 @@ TEST_F(InstrProfTest, instr_prof_symtab_
   for (unsigned I = 0; I < sizeof(Funcs) / sizeof(*Funcs); I++) {
     Function *F = M->getFunction(Funcs[I]);
     ASSERT_TRUE(F != NULL);
-    StringRef PGOName = getPGOFuncName(*F);
-    ASSERT_EQ(PGOName,
+    std::string PGOName = getPGOFuncName(*F);
+    ASSERT_EQ(StringRef(PGOName),
               ProfSymtab.getFuncName(IndexedInstrProf::ComputeHash(PGOName)));
   }
 }




More information about the llvm-commits mailing list