Unbreak the build after r211244.
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 19 Jun 2014 00:43:19 +0000 (00:43 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 19 Jun 2014 00:43:19 +0000 (00:43 +0000)
These operator overloads were unneeded (once the const correctness in
PooledStringPtr was corrected) and inefficient (since the strings are
pooled the pointers can just be compared for equality instead of doing
strcmp).

llvm-svn: 211245

clang-tools-extra/modularize/PreprocessorTracker.cpp

index e71a2b0..0b99f21 100644 (file)
@@ -535,19 +535,6 @@ ConditionValueKindStrings[] = {
   "(not evaluated)", "false", "true"
 };
 
-// We need some operator overloads for string handles.
-bool operator==(const StringHandle &H1, const StringHandle &H2) {
-  const char *S1 = (H1 ? *H1 : "");
-  const char *S2 = (H2 ? *H2 : "");
-  int Diff = strcmp(S1, S2);
-  return Diff == 0;
-}
-bool operator!=(const StringHandle &H1, const StringHandle &H2) {
-  const char *S1 = (H1 ? *H1 : "");
-  const char *S2 = (H2 ? *H2 : "");
-  int Diff = strcmp(S1, S2);
-  return Diff != 0;
-}
 bool operator<(const StringHandle &H1, const StringHandle &H2) {
   const char *S1 = (H1 ? *H1 : "");
   const char *S2 = (H2 ? *H2 : "");