aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/LayoutOverrideSource.cpp
AgeCommit message (Collapse)AuthorFilesLines
2021-10-19[Driver, Frontend] Use StringRef::contains (NFC)Kazu Hirata1-1/+1
2021-09-14Cleanup identifier parsing; NFCCorentin Jabot1-2/+2
Rename methods to clearly signal when they only deal with ASCII, simplify the parsing of identifier, and use start/continue instead of head/body for consistency with Unicode terminology.
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth1-4/+3
to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
2018-07-30Remove trailing spaceFangrui Song1-29/+29
sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h} llvm-svn: 338291
2018-05-09Remove \brief commands from doxygen comments.Adrian Prantl1-1/+1
This is similar to the LLVM change https://reviews.llvm.org/D46290. We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46320 llvm-svn: 331834
2016-01-29Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith ↵Yaron Keren1-1/+1
r259192 post commit comment. llvm-svn: 259232
2013-02-08Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h.Jordan Rose1-8/+9
Nearly all of these changes are one-to-one replacements; the few that aren't have to do with custom identifier validation. llvm-svn: 174768
2013-01-12Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko1-2/+2
brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
2012-08-10Add missing cctype includes.Joerg Sonnenberger1-0/+1
llvm-svn: 161660
2012-06-06Revert Decl's iterators back to pointer value_type rather than reference ↵David Blaikie1-1/+1
value_type In addition, I've made the pointer and reference typedef 'void' rather than T* just so they can't get misused. I would've omitted them entirely but std::distance likes them to be there even if it doesn't use them. This rolls back r155808 and r155869. Review by Doug Gregor incorporating feedback from Chandler Carruth. llvm-svn: 158104
2012-04-30Remove the ref/value inconsistency in filter_decl_iterator.David Blaikie1-1/+1
filter_decl_iterator had a weird mismatch where both op* and op-> returned T* making it difficult to generalize this filtering behavior into a reusable library of any kind. This change errs on the side of value, making op-> return T* and op* return T&. (reviewed by Richard Smith) llvm-svn: 155808
2012-02-06Move instantiateTemplateAttribute into the sema namespace, make helpers static.Benjamin Kramer1-1/+1
llvm-svn: 149864
2012-02-03Make sure that the layout-override parser grabs the size, not the dataDouglas Gregor1-3/+3
size. Otherwise, we can end up with bogus layouts. llvm-svn: 149703
2012-01-26Extend the ExternalASTSource interface to allow the AST source toDouglas Gregor1-0/+206
provide the layout of records, rather than letting Clang compute the layout itself. LLDB provides the motivation for this feature: because various layout-altering attributes (packed, aligned, etc.) don't get reliably get placed into DWARF, the record layouts computed by LLDB from the reconstructed records differ from the actual layouts, and badness occurs. This interface lets the DWARF data drive layout, so we don't need the attributes preserved to get the answer write. The testing methodology for this change is fun. I've introduced a variant of -fdump-record-layouts called -fdump-record-layouts-simple that always has the simple C format and provides size/alignment/field offsets. There is also a -cc1 option -foverride-record-layout=<file> to take the output of -fdump-record-layouts-simple and parse it to produce a set of overridden layouts, which is introduced into the AST via a testing-only ExternalASTSource (called LayoutOverrideSource). Each test contains a number of records to lay out, which use various layout-changing attributes, and then dumps the layouts. We then run the test again, using the preprocessor to eliminate the layout-changing attributes entirely (which would give us different layouts for the records), but supplying the previously-computed record layouts. Finally, we diff the layouts produced from the two runs to be sure that they are identical. Note that this code makes the assumption that we don't *have* to provide the offsets of bases or virtual bases to get the layout right, because the alignment attributes don't affect it. I believe this assumption holds, but if it does not, we can extend LayoutOverrideSource to also provide base offset information. Fixes the Clang side of <rdar://problem/10169539>. llvm-svn: 149055