X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=unittests%2FAnalysis%2FLazyCallGraphTest.cpp;h=6caccb892395e32352d6d7317898ae2e60c5f896;hb=f2bc179203d0e17bfcfa28bd5b9c1ba1d04cd6fe;hp=d7c70453c9b06052a51f74bd6915af97343d8270;hpb=0e8c40d6439acdc2a31f2c1c4eab5d547baa01a6;p=oota-llvm.git diff --git a/unittests/Analysis/LazyCallGraphTest.cpp b/unittests/Analysis/LazyCallGraphTest.cpp index d7c70453c9b..6caccb89239 100644 --- a/unittests/Analysis/LazyCallGraphTest.cpp +++ b/unittests/Analysis/LazyCallGraphTest.cpp @@ -22,38 +22,38 @@ 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; } -// IR forming a call graph with a diamond of triangle-shaped SCCs: -// -// d1 -// / \ -// d3--d2 -// / \ -// b1 c1 -// / \ / \ -// b3--b2 c3--c2 -// \ / -// a1 -// / \ -// a3--a2 -// -// All call edges go up between SCCs, and clockwise around the SCC. +/* + IR forming a call graph with a diamond of triangle-shaped SCCs: + + d1 + / \ + d3--d2 + / \ + b1 c1 + / \ / \ + b3--b2 c3--c2 + \ / + a1 + / \ + a3--a2 + + All call edges go up between SCCs, and clockwise around the SCC. + */ static const char DiamondOfTriangles[] = "define void @a1() {\n" "entry:\n"