Teach the target parsing framework to directly compute the length of all
authorChandler Carruth <chandlerc@gmail.com>
Sun, 30 Aug 2015 07:51:04 +0000 (07:51 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 30 Aug 2015 07:51:04 +0000 (07:51 +0000)
commit599ae7ee1c1b51989e430b7edc24eb1ac6cc5b3a
tree01f0ed78f20ff745448be9bb4e2e51ebccb6f046
parent673129f5d53592a18470d999a65b1ab4f80a86a7
Teach the target parsing framework to directly compute the length of all
of its strings when expanding the string literals from the macros, and
push all of the APIs to be StringRef instead of C-string APIs.

This (remarkably) removes a very non-trivial number of strlen calls. It
even deletes code and complexity from one of the primary users -- Clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246374 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/Triple.h
include/llvm/Support/TargetParser.h
lib/Support/TargetParser.cpp
lib/Support/Triple.cpp
unittests/ADT/TripleTest.cpp