llvm.org GIT mirror llvm / e0ff9ae
Change from llvm::SmallSet<std::string> to llvm::StringMap<char>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50766 91177308-0d34-0410-b5e6-96231b3b80d8 Mikhail Glushenkov 11 years ago
3 changed file(s) with 18 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
4949 MaxEdge = E;
5050 MaxWeight = EW;
5151 SingleMax = true;
52 }
53 else if (EW == MaxWeight) {
52 } else if (EW == MaxWeight) {
5453 SingleMax = false;
5554 }
5655 }
1919 #include "llvm/ADT/GraphTraits.h"
2020 #include "llvm/ADT/IntrusiveRefCntPtr.h"
2121 #include "llvm/ADT/iterator"
22 #include "llvm/ADT/SmallSet.h"
2322 #include "llvm/ADT/SmallVector.h"
2423 #include "llvm/ADT/StringMap.h"
2524 #include "llvm/System/Path.h"
2625
26 #include
2727 #include
2828
2929 namespace llvmc {
3030
31 typedef llvm::SmallSet InputLanguagesSet;
31 // A wrapper for StringMap that provides set-like functionality.
32 // Only insert() and count() methods are used by my code.
33 template
34 class StringSet : public llvm::StringMap {
35 typedef llvm::StringMap base;
36 public:
37 void insert (const std::string& InLang) {
38 assert(!InLang.empty());
39 const char* KeyStart = &InLang[0];
40 const char* KeyEnd = KeyStart + InLang.size();
41 base::insert(llvm::StringMapEntry::
42 Create(KeyStart, KeyEnd, base::getAllocator(), '+'));
43 }
44 };
45 typedef StringSet<> InputLanguagesSet;
3246
3347 // An edge of the compilation graph.
3448 class Edge : public llvm::RefCountedBaseVPTR {
947947 throw OptName + ": incorrect option type!";
948948 O << OptDesc.GenVariableName();
949949 return true;
950 }
951 else if (PropName == "if_input_languages_contain") {
950 } else if (PropName == "if_input_languages_contain") {
952951 O << "InLangs.count(\"" << OptName << "\") != 0";
953952 return true;
954953 }