2009-03-25 01:52:34 +08:00
|
|
|
add_clang_library(clangFrontend
|
2009-05-19 07:06:15 +08:00
|
|
|
ASTConsumers.cpp
|
2010-02-10 03:21:46 +08:00
|
|
|
ASTMerge.cpp
|
2009-06-24 06:01:29 +08:00
|
|
|
ASTUnit.cpp
|
2009-05-19 12:21:30 +08:00
|
|
|
CacheTokens.cpp
|
2011-12-20 16:42:15 +08:00
|
|
|
ChainedDiagnosticConsumer.cpp
|
2011-12-09 09:55:54 +08:00
|
|
|
ChainedIncludesSource.cpp
|
2009-11-13 11:51:44 +08:00
|
|
|
CompilerInstance.cpp
|
2009-11-17 14:02:29 +08:00
|
|
|
CompilerInvocation.cpp
|
2011-04-05 07:17:56 +08:00
|
|
|
CreateInvocationFromCommandLine.cpp
|
2009-05-19 12:21:30 +08:00
|
|
|
DependencyFile.cpp
|
2012-02-02 08:54:52 +08:00
|
|
|
DependencyGraph.cpp
|
2011-12-17 13:26:04 +08:00
|
|
|
DiagnosticRenderer.cpp
|
2009-11-14 18:42:35 +08:00
|
|
|
FrontendAction.cpp
|
2009-11-14 18:42:46 +08:00
|
|
|
FrontendActions.cpp
|
2009-11-13 10:06:12 +08:00
|
|
|
FrontendOptions.cpp
|
2011-02-02 23:41:17 +08:00
|
|
|
HeaderIncludeGen.cpp
|
2008-10-26 08:56:18 +08:00
|
|
|
InitHeaderSearch.cpp
|
2009-04-21 13:40:52 +08:00
|
|
|
InitPreprocessor.cpp
|
2009-11-26 10:14:31 +08:00
|
|
|
LangStandards.cpp
|
Extend the ExternalASTSource interface to allow the AST source to
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
2012-01-26 15:55:45 +08:00
|
|
|
LayoutOverrideSource.cpp
|
2011-04-08 02:31:10 +08:00
|
|
|
LogDiagnosticPrinter.cpp
|
2011-01-26 06:10:37 +08:00
|
|
|
MultiplexConsumer.cpp
|
2009-05-19 12:21:30 +08:00
|
|
|
PrintPreprocessedOutput.cpp
|
2011-10-29 08:12:39 +08:00
|
|
|
SerializedDiagnosticPrinter.cpp
|
2011-10-16 07:43:53 +08:00
|
|
|
TextDiagnostic.cpp
|
2009-05-19 12:21:30 +08:00
|
|
|
TextDiagnosticBuffer.cpp
|
|
|
|
TextDiagnosticPrinter.cpp
|
2011-09-26 08:38:03 +08:00
|
|
|
VerifyDiagnosticConsumer.cpp
|
2009-05-19 12:21:30 +08:00
|
|
|
Warnings.cpp
|
2008-10-26 08:56:18 +08:00
|
|
|
)
|
2009-06-18 23:05:47 +08:00
|
|
|
|
2012-05-02 13:31:31 +08:00
|
|
|
add_dependencies(clangFrontend
|
2010-06-17 08:37:02 +08:00
|
|
|
ClangAttrClasses
|
|
|
|
ClangAttrList
|
2012-07-27 14:18:33 +08:00
|
|
|
ClangAttrParsedAttrList
|
2012-07-27 14:18:12 +08:00
|
|
|
ClangCommentNodes
|
|
|
|
ClangDeclNodes
|
2012-07-27 14:18:33 +08:00
|
|
|
ClangDiagnosticAST
|
|
|
|
ClangDiagnosticCommon
|
|
|
|
ClangDiagnosticDriver
|
2012-05-02 13:31:31 +08:00
|
|
|
ClangDiagnosticFrontend
|
2009-06-25 13:03:29 +08:00
|
|
|
ClangDiagnosticLex
|
2010-05-05 13:41:05 +08:00
|
|
|
ClangDiagnosticSema
|
2011-09-06 10:08:40 +08:00
|
|
|
ClangDriverOptions
|
2012-06-21 09:30:21 +08:00
|
|
|
ClangStmtNodes
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(clangFrontend
|
|
|
|
clangAST
|
|
|
|
clangBasic
|
|
|
|
clangDriver
|
|
|
|
clangEdit
|
|
|
|
clangLex
|
|
|
|
clangParse
|
|
|
|
clangSema
|
|
|
|
clangSerialization
|
|
|
|
)
|