From 67c32a98315f785a9ec9d531c1f571a0196c7463 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 18 Jan 2015 16:17:27 +0000 Subject: Vendor import of llvm RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1): https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_360/rc1@226102 --- unittests/Analysis/LazyCallGraphTest.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'unittests/Analysis/LazyCallGraphTest.cpp') diff --git a/unittests/Analysis/LazyCallGraphTest.cpp b/unittests/Analysis/LazyCallGraphTest.cpp index 7eb87dc02d64..6caccb892395 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; -- cgit v1.2.3