File tree Expand file tree Collapse file tree 1 file changed +32
-1
lines changed Expand file tree Collapse file tree 1 file changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -61,10 +61,13 @@ run by the parser after parsing input assembly and by the optimizer
6161before it outputs bitcode. The violations pointed out by the verifier
6262pass indicate bugs in transformation passes or input to the parser.
6363
64+ Syntax
65+ ======
66+
6467.. _identifiers:
6568
6669Identifiers
67- ===========
70+ -----------
6871
6972LLVM identifiers come in two basic types: global and local. Global
7073identifiers (functions, global variables) begin with the ``'@'``
@@ -140,6 +143,34 @@ It also shows a convention that we follow in this document. When
140143demonstrating instructions, we will follow an instruction with a comment
141144that defines the type and name of value produced.
142145
146+ .. _strings:
147+
148+ String constants
149+ ----------------
150+
151+ Strings in LLVM programs are delimited by ``"`` characters. Within a
152+ string, all bytes are treated literally with the exception of ``\``
153+ characters, which start escapes, and the first ``"`` character, which
154+ ends the string.
155+
156+ There are two kinds of escapes.
157+
158+ * ``\\`` represents a single ``\`` character.
159+
160+ * ``\`` followed by two hexadecimal characters (0-9, a-f, or A-F)
161+ represents the byte with the given value (e.g. \x00 represents a
162+ null byte).
163+
164+ To represent a ``"`` character, use ``\22``. (``\"`` will end the string
165+ with a trailing ``\``.)
166+
167+ Newlines do not terminate string constants; strings can span multiple
168+ lines.
169+
170+ The interpretation of string constants (e.g. their character encoding)
171+ depends on context.
172+
173+
143174High Level Structure
144175====================
145176
You can’t perform that action at this time.
0 commit comments