llvm-6502/include/llvm
Sean Silva 3f8a26f6fe [Support] Promote cl::StringSaver to a separate utility
This class is generally useful.

In breaking it out, the primary change is that it has been made
non-virtual. It seems like being abstract led to there being 3 different
(2 in llvm + 1 in clang) concrete implementations which disagreed about
the ownership of the saved strings (see the manual call to free() in the
unittest StrDupSaver; yes this is different from the CommandLine.cpp
StrDupSaver which owns the stored strings; which is different from
Clang's StringSetSaver which just holds a reference to a
std::set<std::string> which owns the strings).

I've identified 2 other places in the
codebase that are open-coding this pattern:

  memcpy(Alloc.Allocate<char>(strlen(S)+1), S, strlen(S)+1)

I'll be switching them over. They are
* llvm::sys::Process::GetArgumentVector
* The StringAllocator member of YAMLIO's Input class
This also will allow simplifying Clang's driver.cpp quite a bit.

Let me know if there are any other places that could benefit from
StringSaver. I'm also thinking of adding a saveStringRef member for
getting a stable StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215784 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-15 23:18:33 +00:00
..
ADT Delete support for AuroraUX. 2014-08-14 15:15:09 +00:00
Analysis Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
AsmParser Move the LLVM IR asm writer header files into the IR directory, as they 2014-01-07 12:34:26 +00:00
Bitcode Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
CodeGen Delete dead code. NFC. 2014-08-15 14:58:22 +00:00
Config Regenerate autoconf, previous updates to the configury haven't 2014-07-28 22:00:44 +00:00
DebugInfo Use a reference instead of a pointer. 2014-07-31 20:19:36 +00:00
ExecutionEngine Simplify ownership with std::unique_ptr. NFC. 2014-08-13 18:49:01 +00:00
IR Add two helper functions: isAtLeastAcquire, isAtLeastRelease 2014-08-15 22:25:12 +00:00
IRReader Make a helper function static. No functionality change. 2014-07-05 00:39:08 +00:00
LineEditor [C++11] Replace OwningPtr with std::unique_ptr in places where it doesn't break the API. 2014-04-21 09:34:48 +00:00
Linker IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
LTO Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
MC Make EmitAbsValue an static helper. 2014-08-15 15:12:13 +00:00
Object Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
Option Option: Propagate flags from groups to options in each group 2014-07-12 00:18:58 +00:00
ProfileData Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
Support [Support] Promote cl::StringSaver to a separate utility 2014-08-15 23:18:33 +00:00
TableGen Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
Target [PowerPC] Implement PPCTargetLowering::getTgtMemIntrinsic 2014-08-13 01:15:40 +00:00
Transforms Introduce a helper to combine instruction metadata. 2014-08-15 15:46:38 +00:00
CMakeLists.txt Remove llvm_headers_do_not_build for the benefit of XCode and Visual Studio users. 2014-08-14 00:51:47 +00:00
InitializePasses.h MachineCombiner Pass for selecting faster instruction 2014-08-03 21:35:39 +00:00
LinkAllIR.h [cleanup] Move the Dominators.h and Verifier.h headers into the IR 2014-01-13 09:26:24 +00:00
LinkAllPasses.h Move -verify-use-list-order into llvm-uselistorder 2014-07-25 17:13:03 +00:00
module.modulemap [modules] Update module map workaround to cope with the problematic file having 2014-08-07 20:27:08 +00:00
module.modulemap.build [modules] Add module maps for LLVM. These are not quite ready for prime-time 2014-05-21 02:46:14 +00:00
Pass.h Revert "[PM] Add pass run listeners to the pass manager." 2014-05-15 17:49:20 +00:00
PassAnalysisSupport.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-14 00:51:57 +00:00
PassInfo.h Remove pimpl class from PassRegistry. 2014-06-12 16:06:51 +00:00
PassManager.h Move the old pass manager infrastructure into a legacy namespace and 2013-11-09 12:26:54 +00:00
PassRegistry.h Remove pimpl class from PassRegistry. 2014-06-12 16:06:51 +00:00
PassSupport.h Move GlobalMerge from Transform to CodeGen. 2014-06-13 22:57:59 +00:00