hanchenye-llvm-project/clang/lib
Bruno Ricci b94ad1e1d3 [AST] Store the string data in StringLiteral in a trailing array of chars
Use the newly available space in the bit-fields of Stmt and store the
string data in a trailing array of chars after the trailing array
of SourceLocation. This cuts the size of StringLiteral by 2 pointers.

Also refactor slightly StringLiteral::Create and StringLiteral::CreateEmpty
so that StringLiteral::Create is just responsible for the allocation, and the
constructor is responsible for doing all the initialization. This match what
is done for the other classes in general.

This patch should have no other functional changes apart from this.

A concern was raised during review about the interaction between
this patch and serialization abbreviations. I believe however that
there is currently no abbreviation defined for StringLiteral.
The only statements/expressions which have abbreviations are currently
DeclRefExpr, IntegerLiteral, CharacterLiteral and ImplicitCastExpr.

Differential Revision: https://reviews.llvm.org/D54166

Reviewed By: dblaikie, rjmccall

llvm-svn: 346969
2018-11-15 17:31:16 +00:00
..
ARCMigrate Fix clang -Wimplicit-fallthrough warnings across llvm, NFC 2018-11-01 19:54:45 +00:00
AST [AST] Store the string data in StringLiteral in a trailing array of chars 2018-11-15 17:31:16 +00:00
ASTMatchers [AST] Allow limiting the scope of common AST traversals (getParents, RAV). 2018-11-14 10:33:30 +00:00
Analysis Compound literals, enums, et al require const expr 2018-11-09 00:41:36 +00:00
Basic Introduce the _Clang scoped attribute token. 2018-11-09 17:19:45 +00:00
CodeGen Fix warning about unused variable [NFC] 2018-11-15 13:01:54 +00:00
CrossTU [CrossTU] Fix handling of Cross Translation Unit directory path 2017-10-27 12:53:37 +00:00
Driver Rewrite-imports on crash: Simplify handling 2018-11-15 03:04:19 +00:00
Edit [Fixed Point Arithmetic] Fixed Point to Boolean Cast 2018-10-23 17:55:35 +00:00
Format [clang-format] Do not treat the asm clobber [ as ObjCExpr 2018-11-13 15:38:12 +00:00
Frontend Fix combining pragma __debug dump & parser_crash with -E 2018-11-15 03:04:21 +00:00
FrontendTool [analyzer] New flag to print all -analyzer-config options 2018-11-02 15:59:37 +00:00
Headers [PowerPC] [Clang] [AltiVec] The second parameter of vec_sr function should be modulo the number of bits in the element 2018-11-09 03:35:32 +00:00
Index [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extension 2018-11-08 11:25:41 +00:00
Lex Fix combining pragma __debug dump & parser_crash with -E 2018-11-15 03:04:21 +00:00
Parse NFC cleanup: Prefer make_unique over reset(new T()) 2018-11-15 03:04:23 +00:00
Rewrite Fix clang -Wimplicit-fallthrough warnings across llvm, NFC 2018-11-01 19:54:45 +00:00
Sema [c++20] Implement P0482R6: enable -fchar8_t by default in C++20 mode. 2018-11-14 21:04:34 +00:00
Serialization [AST] Store the string data in StringLiteral in a trailing array of chars 2018-11-15 17:31:16 +00:00
StaticAnalyzer Convert a condition into an assertion per post-review feedback; NFC intended. 2018-11-12 22:32:38 +00:00
Tooling Revert "Make clang-based tools find libc++ on MacOS" 2018-11-12 16:59:50 +00:00
CMakeLists.txt Add Cross Translation Unit support library 2017-09-22 11:11:01 +00:00