aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-05-08 22:02:43 +0000
committerEric Fiselier <eric@efcs.ca>2017-05-08 22:02:43 +0000
commitb4ddab26bce7a30b05d4e21b648927dd1571ca7e (patch)
tree3f02bda16e3c781e1979223f1d70ec332d1aea93 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent362ea7329fc8bd5a7080a78d606066024ac40b11 (diff)
downloadllvm-b4ddab26bce7a30b05d4e21b648927dd1571ca7e.zip
llvm-b4ddab26bce7a30b05d4e21b648927dd1571ca7e.tar.gz
llvm-b4ddab26bce7a30b05d4e21b648927dd1571ca7e.tar.bz2
Refactor <locale> RAII guards to aid upcoming Windows locale changes.
Previously <locale> used std::unique_ptr<remove_ptr<locale_t>, locale-mgmt-function> as a scope guard for (A) creating new locales, and (B) setting the thread specific locale in RAII safe manner. However using unique_ptr has some problems, first it requires that locale_t is a pointer type, which may not be the case (Windows will need a non-pointer locale_t type that emulates _locale_t). The second problem is that users of the guards had to supply the locale management function to the custom deleter at every call site. However these locale management functions don't exist natively Windows, making a good Windows implementation of locale more difficult. This patch creates distinct and simply RAII guards that replace unique_ptr. These guards handle calling the correct locale management function so that callers don't have too. This simplification will aid in upcoming Windows fixes. llvm-svn: 302474
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions