summaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2013-07-15 13:46:24 +0000
committerReid Kleckner <reid@kleckner.net>2013-07-15 13:46:24 +0000
commit95695c8bb3fcfdf0c728c59d03bb89b2cea80f07 (patch)
tree7b507a6f899b0cf8ceae2abfb316aa17ead25343 /include/llvm
parent4c275c31aa2a4aa357daa518505a199580d15309 (diff)
downloadllvm-95695c8bb3fcfdf0c728c59d03bb89b2cea80f07.tar.gz
llvm-95695c8bb3fcfdf0c728c59d03bb89b2cea80f07.tar.bz2
llvm-95695c8bb3fcfdf0c728c59d03bb89b2cea80f07.tar.xz
[Option] Store arg strings in a set backed by a BumpPtrAllocator
No functionality change. This is preparing to move response file parsing into lib/Option so it can be shared between clang and lld. This change isn't just a micro-optimization. Clang's driver uses a std::set<std::string> to unique arguments while parsing response files, so this matches that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186319 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Option/ArgList.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/Option/ArgList.h b/include/llvm/Option/ArgList.h
index 06ba679c2b..2f4d85295b 100644
--- a/include/llvm/Option/ArgList.h
+++ b/include/llvm/Option/ArgList.h
@@ -12,9 +12,10 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/ADT/StringSet.h"
#include "llvm/Option/OptSpecifier.h"
#include "llvm/Option/Option.h"
-#include <list>
+#include "llvm/Support/Allocator.h"
#include <string>
#include <vector>
@@ -298,7 +299,7 @@ private:
/// This is mutable since we treat the ArgList as being the list
/// of Args, and allow routines to add new strings (to have a
/// convenient place to store the memory) via MakeIndex.
- mutable std::list<std::string> SynthesizedStrings;
+ mutable StringSet<BumpPtrAllocator> SynthesizedStrings;
/// The number of original input argument strings.
unsigned NumInputArgStrings;