Skip to content

Commit

Permalink
Export of internal Abseil changes.
Browse files Browse the repository at this point in the history
--
3febef1a42d092676134bd0b0d54d13a878198a2 by Derek Mauro <[email protected]>:

Update to LLVM r361107 and Bazel 0.26.1

PiperOrigin-RevId: 252463968

--
0408a7f5c1f990414b2ee6efb615238fc44bcd3a by Gennadiy Civil <[email protected]>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 252432385
GitOrigin-RevId: 3febef1a42d092676134bd0b0d54d13a878198a2
Change-Id: I9edade19982dfe490c7c4b894e094c4e7d80adb1
  • Loading branch information
Abseil Team authored and gennadiycivil committed Jun 11, 2019
1 parent 361cb8a commit b1dd425
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 18 deletions.
2 changes: 0 additions & 2 deletions absl/copts/GENERATED_AbseilCopts.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ list(APPEND ABSL_CLANG_CL_TEST_FLAGS
"-Wno-unused-template"
"-Wno-used-but-marked-unused"
"-Wno-zero-as-null-pointer-constant"
"-Wno-gnu-include-next"
"-Wno-gnu-zero-variadic-macro-arguments"
)

Expand Down Expand Up @@ -181,7 +180,6 @@ list(APPEND ABSL_LLVM_TEST_FLAGS
"-Wno-unused-template"
"-Wno-used-but-marked-unused"
"-Wno-zero-as-null-pointer-constant"
"-Wno-gnu-include-next"
"-Wno-gnu-zero-variadic-macro-arguments"
)

Expand Down
2 changes: 0 additions & 2 deletions absl/copts/GENERATED_copts.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ ABSL_CLANG_CL_TEST_FLAGS = [
"-Wno-unused-template",
"-Wno-used-but-marked-unused",
"-Wno-zero-as-null-pointer-constant",
"-Wno-gnu-include-next",
"-Wno-gnu-zero-variadic-macro-arguments",
]

Expand Down Expand Up @@ -182,7 +181,6 @@ ABSL_LLVM_TEST_FLAGS = [
"-Wno-unused-template",
"-Wno-used-but-marked-unused",
"-Wno-zero-as-null-pointer-constant",
"-Wno-gnu-include-next",
"-Wno-gnu-zero-variadic-macro-arguments",
]

Expand Down
2 changes: 0 additions & 2 deletions absl/copts/copts.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@
"-Wno-unused-template",
"-Wno-used-but-marked-unused",
"-Wno-zero-as-null-pointer-constant",
# For a libc++ bug fixed in r357267
"-Wno-gnu-include-next",
# gtest depends on this GNU extension being offered.
"-Wno-gnu-zero-variadic-macro-arguments",
]
Expand Down
16 changes: 8 additions & 8 deletions absl/time/internal/cctz/src/time_zone_fixed.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace cctz {
namespace {

// The prefix used for the internal names of fixed-offset zones.
const char kFixedOffsetPrefix[] = "Fixed/UTC";
const char kFixedZonePrefix[] = "Fixed/UTC";

const char kDigits[] = "0123456789";

Expand Down Expand Up @@ -55,11 +55,11 @@ bool FixedOffsetFromName(const std::string& name, seconds* offset) {
return true;
}

const std::size_t prefix_len = sizeof(kFixedOffsetPrefix) - 1;
const char* const ep = kFixedOffsetPrefix + prefix_len;
const std::size_t prefix_len = sizeof(kFixedZonePrefix) - 1;
const char* const ep = kFixedZonePrefix + prefix_len;
if (name.size() != prefix_len + 9) // <prefix>+99:99:99
return false;
if (!std::equal(kFixedOffsetPrefix, ep, name.begin()))
if (!std::equal(kFixedZonePrefix, ep, name.begin()))
return false;
const char* np = name.data() + prefix_len;
if (np[0] != '+' && np[0] != '-')
Expand Down Expand Up @@ -102,9 +102,9 @@ std::string FixedOffsetToName(const seconds& offset) {
}
int hours = minutes / 60;
minutes %= 60;
char buf[sizeof(kFixedOffsetPrefix) - 1 + sizeof("-24:00:00")];
std::strcpy(buf, kFixedOffsetPrefix);
char* ep = buf + sizeof(kFixedOffsetPrefix) - 1;
const std::size_t prefix_len = sizeof(kFixedZonePrefix) - 1;
char buf[prefix_len + sizeof("-24:00:00")];
char* ep = std::copy(kFixedZonePrefix, kFixedZonePrefix + prefix_len, buf);
*ep++ = sign;
ep = Format02d(ep, hours);
*ep++ = ':';
Expand All @@ -118,7 +118,7 @@ std::string FixedOffsetToName(const seconds& offset) {

std::string FixedOffsetToAbbr(const seconds& offset) {
std::string abbr = FixedOffsetToName(offset);
const std::size_t prefix_len = sizeof(kFixedOffsetPrefix) - 1;
const std::size_t prefix_len = sizeof(kFixedZonePrefix) - 1;
if (abbr.size() == prefix_len + 9) { // <prefix>+99:99:99
abbr.erase(0, prefix_len); // +99:99:99
abbr.erase(6, 1); // +99:9999
Expand Down
2 changes: 1 addition & 1 deletion ci/linux_clang-latest_libcxx_asan_bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if [ -z ${COMPILATION_MODE:-} ]; then
COMPILATION_MODE="fastbuild opt"
fi

readonly DOCKER_CONTAINER="gcr.io/google.com/absl-177019/linux_clang-latest:20190508"
readonly DOCKER_CONTAINER="gcr.io/google.com/absl-177019/linux_clang-latest:20190610"

# USE_BAZEL_CACHE=1 only works on Kokoro.
# Without access to the credentials this won't work.
Expand Down
2 changes: 1 addition & 1 deletion ci/linux_clang-latest_libcxx_bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if [ -z ${COMPILATION_MODE:-} ]; then
COMPILATION_MODE="fastbuild opt"
fi

readonly DOCKER_CONTAINER="gcr.io/google.com/absl-177019/linux_clang-latest:20190508"
readonly DOCKER_CONTAINER="gcr.io/google.com/absl-177019/linux_clang-latest:20190610"

# USE_BAZEL_CACHE=1 only works on Kokoro.
# Without access to the credentials this won't work.
Expand Down
2 changes: 1 addition & 1 deletion ci/linux_clang-latest_libcxx_tsan_bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if [ -z ${COMPILATION_MODE:-} ]; then
COMPILATION_MODE="fastbuild opt"
fi

readonly DOCKER_CONTAINER="gcr.io/google.com/absl-177019/linux_clang-latest:20190508"
readonly DOCKER_CONTAINER="gcr.io/google.com/absl-177019/linux_clang-latest:20190610"

# USE_BAZEL_CACHE=1 only works on Kokoro.
# Without access to the credentials this won't work.
Expand Down
2 changes: 1 addition & 1 deletion ci/linux_clang-latest_libstdcxx_bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if [ -z ${COMPILATION_MODE:-} ]; then
COMPILATION_MODE="fastbuild opt"
fi

readonly DOCKER_CONTAINER="gcr.io/google.com/absl-177019/linux_clang-latest:20190508"
readonly DOCKER_CONTAINER="gcr.io/google.com/absl-177019/linux_clang-latest:20190610"

# USE_BAZEL_CACHE=1 only works on Kokoro.
# Without access to the credentials this won't work.
Expand Down

0 comments on commit b1dd425

Please sign in to comment.