LLVM  6.0.0svn
Functions
StringMatcher.cpp File Reference
#include "llvm/TableGen/StringMatcher.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <map>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for StringMatcher.cpp:

Go to the source code of this file.

Functions

static unsigned FindFirstNonCommonLetter (const std::vector< const StringMatcher::StringPair *> &Matches)
 FindFirstNonCommonLetter - Find the first character in the keys of the string pairs that is not shared across the whole set of strings. More...
 

Function Documentation

◆ FindFirstNonCommonLetter()

static unsigned FindFirstNonCommonLetter ( const std::vector< const StringMatcher::StringPair *> &  Matches)
static

FindFirstNonCommonLetter - Find the first character in the keys of the string pairs that is not shared across the whole set of strings.

All strings are assumed to have the same length.

Definition at line 29 of file StringMatcher.cpp.

References assert(), E, llvm::StringRef::empty(), first, llvm::report_fatal_error(), Split(), and llvm::StringRef::split().