Bring in a BumpPtrStringSaver from lld and simplify the interface.
authorRafael Espindola <rafael.espindola@gmail.com>
Sat, 13 Jun 2015 12:49:52 +0000 (12:49 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sat, 13 Jun 2015 12:49:52 +0000 (12:49 +0000)
commit454adf645480245725c74fdbe8840ceff039ef64
tree0412a6ae637df95d5eb30d87e35bb26cd220069c
parentd9ad0cbd70426f1b85d37d9059e66b2e5f1f0c8b
Bring in a BumpPtrStringSaver from lld and simplify the interface.

StringSaver now always saves to a BumpPtrAllocator.

The only reason for having the virtual saveImpl is so lld can have a
thread safe version.

The reason for the distinct BumpPtrStringSaver class is to avoid the
virtual destructor.

llvm-svn: 239669
llvm/include/llvm/Support/CommandLine.h
llvm/include/llvm/Support/StringSaver.h [new file with mode: 0644]
llvm/lib/LibDriver/LibDriver.cpp
llvm/lib/Support/CMakeLists.txt
llvm/lib/Support/CommandLine.cpp
llvm/lib/Support/StringSaver.cpp [new file with mode: 0644]
llvm/unittests/Support/CommandLineTest.cpp