r207799 - Revert "Use make_unique<T>(...) rather than unique_ptr<T>(new T(...))"
David Blaikie
dblaikie at gmail.com
Thu May 1 14:40:37 PDT 2014
Author: dblaikie
Date: Thu May 1 16:40:37 2014
New Revision: 207799
URL: http://llvm.org/viewvc/llvm-project?rev=207799&view=rev
Log:
Revert "Use make_unique<T>(...) rather than unique_ptr<T>(new T(...))"
Seems to be crashing clang (3.3 and 3.4) on some buildbots...
This reverts commit r207792.
Modified:
cfe/trunk/include/clang/Tooling/Tooling.h
Modified: cfe/trunk/include/clang/Tooling/Tooling.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Tooling/Tooling.h?rev=207799&r1=207798&r2=207799&view=diff
==============================================================================
--- cfe/trunk/include/clang/Tooling/Tooling.h (original)
+++ cfe/trunk/include/clang/Tooling/Tooling.h Thu May 1 16:40:37 2014
@@ -39,7 +39,6 @@
#include "clang/Tooling/CompilationDatabase.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/Twine.h"
-#include "llvm/ADT/STLExtras.h"
#include <memory>
#include <string>
#include <vector>
@@ -312,7 +311,8 @@ std::unique_ptr<FrontendActionFactory> n
clang::FrontendAction *create() override { return new T; }
};
- return llvm::make_unique<SimpleFrontendActionFactory>();
+ return std::unique_ptr<FrontendActionFactory>(
+ new SimpleFrontendActionFactory);
}
template <typename FactoryT>
@@ -363,8 +363,8 @@ inline std::unique_ptr<FrontendActionFac
SourceFileCallbacks *Callbacks;
};
- return llvm::make_unique<FrontendActionFactoryAdapter>(ConsumerFactory,
- Callbacks);
+ return std::unique_ptr<FrontendActionFactory>(
+ new FrontendActionFactoryAdapter(ConsumerFactory, Callbacks));
}
/// \brief Returns the absolute path of \c File, by prepending it with
More information about the cfe-commits
mailing list