projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "Disable the fix for pr20793 because of a gnu ld bug."
[oota-llvm.git]
/
unittests
/
Analysis
/
LazyCallGraphTest.cpp
diff --git
a/unittests/Analysis/LazyCallGraphTest.cpp
b/unittests/Analysis/LazyCallGraphTest.cpp
index d7c70453c9b06052a51f74bd6915af97343d8270..5f73d83f0927ba95d6d2f4aaad5751f83cda5a94 100644
(file)
--- a/
unittests/Analysis/LazyCallGraphTest.cpp
+++ b/
unittests/Analysis/LazyCallGraphTest.cpp
@@
-22,18
+22,16
@@
using namespace llvm;
namespace {
std::unique_ptr<Module> parseAssembly(const char *Assembly) {
namespace {
std::unique_ptr<Module> parseAssembly(const char *Assembly) {
- auto M = make_unique<Module>("Module", getGlobalContext());
-
SMDiagnostic Error;
SMDiagnostic Error;
-
bool Parsed
=
-
ParseAssemblyString(Assembly, M.get(), Error, M->getContext()) == M.get(
);
+
std::unique_ptr<Module> 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.
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;
report_fatal_error(OS.str().c_str());
return M;