  TwineChar16 toTwine() const {
    if (isASCII()) {
      return TwineChar16(llvh::StringRef(castToCharPtr(), length()));
    }
    return TwineChar16(UTF16Ref(castToChar16Ptr(), length()));
  }
  TwineChar16 toTwine() const {
    if (isASCII()) {
      return TwineChar16(llvh::StringRef(castToCharPtr(), length()));
    }
    return TwineChar16(UTF16Ref(castToChar16Ptr(), length()));
  }