class StringLiteral

Declaration

class StringLiteral : public StringRef { /* full declaration omitted */ };

Description

A wrapper around a string literal that serves as a proxy for constructing global tables of StringRefs with the length computed at compile time. In order to avoid the invocation of a global constructor, StringLiteral should *only* be used in a constexpr context, as such: constexpr StringLiteral S("test");

Declared at: llvm/include/llvm/ADT/StringRef.h:860

Inherits from: StringRef

Member Variables

Inherited from StringRef:

public static npos = ~unsigned long(0)

Method Overview

  • public template <size_t N>constexpr StringLiteral(const char (&)[N] Str)
  • public template <size_t N>static constexpr llvm::StringLiteral withInnerNUL(const char (&)[N] Str)

Inherited from StringRef:

Methods

template <size_t N>
constexpr StringLiteral(const char (&)[N] Str)

Declared at: llvm/include/llvm/ADT/StringRef.h:867

Templates

size_t N

Parameters

const char (&)[N] Str

template <size_t N>
static constexpr llvm::StringLiteral withInnerNUL(
    const char (&)[N] Str)

Declared at: llvm/include/llvm/ADT/StringRef.h:880

Templates

size_t N

Parameters

const char (&)[N] Str