diff options
author | Ahmed Charles <ahmedcharles@gmail.com> | 2014-03-09 11:34:25 +0000 |
---|---|---|
committer | Ahmed Charles <ahmedcharles@gmail.com> | 2014-03-09 11:34:25 +0000 |
commit | facff14381fb9f680be94df36f06de68dd05b49a (patch) | |
tree | 7a44e4f208dc0e23d0fc03dca76422da9e5a3d74 /examples | |
parent | f47666e2ffb701c546caaeaf035add60b5d915e6 (diff) |
[C++11] Remove the remaining uses of OwningPtr.
Replace OwningArrayPtr with std::unique_ptr<T[]>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203388 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples')
-rw-r--r-- | examples/analyzer-plugin/MainCallChecker.cpp | 2 | ||||
-rw-r--r-- | examples/clang-interpreter/main.cpp | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/examples/analyzer-plugin/MainCallChecker.cpp b/examples/analyzer-plugin/MainCallChecker.cpp index 66e105f119..2ad8c8416a 100644 --- a/examples/analyzer-plugin/MainCallChecker.cpp +++ b/examples/analyzer-plugin/MainCallChecker.cpp @@ -8,7 +8,7 @@ using namespace ento; namespace { class MainCallChecker : public Checker < check::PreStmt<CallExpr> > { - mutable OwningPtr<BugType> BT; + mutable std::unique_ptr<BugType> BT; public: void checkPreStmt(const CallExpr *CE, CheckerContext &C) const; diff --git a/examples/clang-interpreter/main.cpp b/examples/clang-interpreter/main.cpp index e00583d1a1..46c614bd3f 100644 --- a/examples/clang-interpreter/main.cpp +++ b/examples/clang-interpreter/main.cpp @@ -46,8 +46,8 @@ static int Execute(llvm::Module *Mod, char * const *envp) { llvm::InitializeNativeTarget(); std::string Error; - OwningPtr<llvm::ExecutionEngine> EE( - llvm::ExecutionEngine::createJIT(Mod, &Error)); + std::unique_ptr<llvm::ExecutionEngine> EE( + llvm::ExecutionEngine::createJIT(Mod, &Error)); if (!EE) { llvm::errs() << "unable to make execution engine: " << Error << "\n"; return 255; @@ -83,7 +83,7 @@ int main(int argc, const char **argv, char * const *envp) { // (basically, exactly one input, and the operation mode is hard wired). SmallVector<const char *, 16> Args(argv, argv + argc); Args.push_back("-fsyntax-only"); - OwningPtr<Compilation> C(TheDriver.BuildCompilation(Args)); + std::unique_ptr<Compilation> C(TheDriver.BuildCompilation(Args)); if (!C) return 0; @@ -108,7 +108,7 @@ int main(int argc, const char **argv, char * const *envp) { // Initialize a compiler invocation object from the clang (-cc1) arguments. const driver::ArgStringList &CCArgs = Cmd->getArguments(); - OwningPtr<CompilerInvocation> CI(new CompilerInvocation); + std::unique_ptr<CompilerInvocation> CI(new CompilerInvocation); CompilerInvocation::CreateFromArgs(*CI, const_cast<const char **>(CCArgs.data()), const_cast<const char **>(CCArgs.data()) + @@ -140,7 +140,7 @@ int main(int argc, const char **argv, char * const *envp) { CompilerInvocation::GetResourcesPath(argv[0], MainAddr); // Create and execute the frontend to generate an LLVM bitcode module. - OwningPtr<CodeGenAction> Act(new EmitLLVMOnlyAction()); + std::unique_ptr<CodeGenAction> Act(new EmitLLVMOnlyAction()); if (!Clang.ExecuteAction(*Act)) return 1; |