diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-13 12:49:52 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-13 12:49:52 +0000 |
commit | 454adf645480245725c74fdbe8840ceff039ef64 (patch) | |
tree | 0412a6ae637df95d5eb30d87e35bb26cd220069c /llvm/include/llvm/Support/CommandLine.h | |
parent | d9ad0cbd70426f1b85d37d9059e66b2e5f1f0c8b (diff) | |
download | bcm5719-llvm-454adf645480245725c74fdbe8840ceff039ef64.tar.gz bcm5719-llvm-454adf645480245725c74fdbe8840ceff039ef64.zip |
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
Diffstat (limited to 'llvm/include/llvm/Support/CommandLine.h')
-rw-r--r-- | llvm/include/llvm/Support/CommandLine.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h index 1ad8a3bfd93..ed809211ea9 100644 --- a/llvm/include/llvm/Support/CommandLine.h +++ b/llvm/include/llvm/Support/CommandLine.h @@ -33,6 +33,9 @@ namespace llvm { +class BumpPtrStringSaver; +class StringSaver; + /// cl Namespace - This namespace contains all of the command line option /// processing machinery. It is intentionally a short name to make qualified /// usage concise. @@ -1676,16 +1679,6 @@ StringMap<Option *> &getRegisteredOptions(); // Standalone command line processing utilities. // -/// \brief Saves strings in the inheritor's stable storage and returns a stable -/// raw character pointer. -class StringSaver { - virtual void anchor(); - -public: - virtual const char *SaveString(const char *Str) = 0; - virtual ~StringSaver(){}; // Pacify -Wnon-virtual-dtor. -}; - /// \brief Tokenizes a command line that can contain escapes and quotes. // /// The quoting rules match those used by GCC and other tools that use |