X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=unittests%2FAnalysis%2FLazyCallGraphTest.cpp;h=5f73d83f0927ba95d6d2f4aaad5751f83cda5a94;hb=eaa85e20272f77fd2b914cd76ab25ebc95b54d41;hp=d7c70453c9b06052a51f74bd6915af97343d8270;hpb=0e8c40d6439acdc2a31f2c1c4eab5d547baa01a6;p=oota-llvm.git diff --git a/unittests/Analysis/LazyCallGraphTest.cpp b/unittests/Analysis/LazyCallGraphTest.cpp index d7c70453c9b..5f73d83f092 100644 --- a/unittests/Analysis/LazyCallGraphTest.cpp +++ b/unittests/Analysis/LazyCallGraphTest.cpp @@ -22,18 +22,16 @@ using namespace llvm; namespace { std::unique_ptr parseAssembly(const char *Assembly) { - auto M = make_unique("Module", getGlobalContext()); - SMDiagnostic Error; - bool Parsed = - ParseAssemblyString(Assembly, M.get(), Error, M->getContext()) == M.get(); + std::unique_ptr M = + parseAssemblyString(Assembly, Error, getGlobalContext()); std::string ErrMsg; raw_string_ostream OS(ErrMsg); Error.print("", OS); // A failure here means that the test itself is buggy. - if (!Parsed) + if (!M) report_fatal_error(OS.str().c_str()); return M;