[ADT] Add make_scope_exit().
authorTim Shen <timshen91@gmail.com>
Wed, 10 Aug 2016 17:52:09 +0000 (17:52 +0000)
committerTim Shen <timshen91@gmail.com>
Wed, 10 Aug 2016 17:52:09 +0000 (17:52 +0000)
commit64afe23528483a49eaa561d12c6440b1352531bd
treec2ef32b61661d1e7c3e61953577b65f580a04b3d
parent63f970ee2484d39782cb9686fdeca00d55e866ca
[ADT] Add make_scope_exit().

Summary: make_scope_exit() is described in C++ proposal p0052r2, which uses RAII to do cleanup works at scope exit.

Reviewers: chandlerc

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D22796

llvm-svn: 278251
llvm/include/llvm/ADT/ScopeExit.h [new file with mode: 0644]
llvm/unittests/ADT/CMakeLists.txt
llvm/unittests/ADT/ScopeExitTest.cpp [new file with mode: 0644]