OSDN Git Service

[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)
commitd8f586869a9ec1fcfe14d53045fc5b2de33ad5f9
tree59035b822ee47604ee8070e7a5435ef6b5cab487
parent9a1106c09e9beeb0f0f881b4ccab8b0879532124
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278251 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/ScopeExit.h [new file with mode: 0644]
unittests/ADT/CMakeLists.txt
unittests/ADT/ScopeExitTest.cpp [new file with mode: 0644]