Update LLVM to latest upstream. (#1080)

Also change header guards to WPI header guards.
Remove StringRef::c_str() customization, replacing the handful of uses with Twine or SmallString.
TCPStream: Include errno.h and make Windows includes lowercase for consistency.

Upstream LLVM version: eb4186cca7924fb1706357545311a2fa3de40c59
This commit is contained in:
Peter Johnson
2018-05-22 23:31:08 -07:00
committed by GitHub
parent 680aabbe7c
commit a2ecb1027a
62 changed files with 5956 additions and 2522 deletions

View File

@@ -262,9 +262,9 @@ std::shared_ptr<Value> LoadPersistentImpl::ReadBooleanValue() {
std::shared_ptr<Value> LoadPersistentImpl::ReadDoubleValue() {
// need to convert to null-terminated string for std::strtod()
wpi::SmallString<64> buf;
wpi::SmallString<64> buf = m_line;
char* end;
double v = std::strtod(m_line.c_str(buf), &end);
double v = std::strtod(buf.c_str(), &end);
if (*end != '\0') {
Warn("invalid double value");
return nullptr;
@@ -318,9 +318,9 @@ std::shared_ptr<Value> LoadPersistentImpl::ReadDoubleArrayValue() {
std::tie(tok, m_line) = m_line.split(',');
tok = tok.trim(" \t");
// need to convert to null-terminated string for std::strtod()
wpi::SmallString<64> buf;
wpi::SmallString<64> buf = tok;
char* end;
double v = std::strtod(tok.c_str(buf), &end);
double v = std::strtod(buf.c_str(), &end);
if (*end != '\0') {
Warn("invalid double value");
return nullptr;

View File

@@ -9,6 +9,7 @@
#include <string>
#include <wpi/Base64.h>
#include <wpi/FileSystem.h>
#include <wpi/Format.h>
#include <wpi/SmallString.h>
#include <wpi/StringExtras.h>