2014-07-17 00:48:33 +08:00
|
|
|
add_subdirectory(Rewrite)
|
|
|
|
|
2013-12-10 03:04:43 +08:00
|
|
|
set(LLVM_LINK_COMPONENTS
|
2014-10-14 14:30:31 +08:00
|
|
|
BitReader
|
2019-07-04 06:40:07 +08:00
|
|
|
BitstreamReader
|
2013-12-10 03:04:43 +08:00
|
|
|
Option
|
2016-03-03 04:59:36 +08:00
|
|
|
ProfileData
|
2013-12-10 03:04:43 +08:00
|
|
|
Support
|
|
|
|
)
|
|
|
|
|
2016-06-03 04:24:07 +08:00
|
|
|
set(optional_deps intrinsics_gen)
|
|
|
|
if (CLANG_BUILT_STANDALONE)
|
|
|
|
set(optional_deps)
|
|
|
|
endif()
|
|
|
|
|
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
|
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
|
2018-04-23 17:22:30 +08:00
|
|
|
FrontendTiming.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
|
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
|
2014-06-20 03:36:03 +08:00
|
|
|
ModuleDependencyCollector.cpp
|
2011-01-26 06:10:37 +08:00
|
|
|
MultiplexConsumer.cpp
|
2017-06-21 18:24:58 +08:00
|
|
|
PrecompiledPreamble.cpp
|
2009-05-19 12:21:30 +08:00
|
|
|
PrintPreprocessedOutput.cpp
|
2011-10-29 08:12:39 +08:00
|
|
|
SerializedDiagnosticPrinter.cpp
|
2014-10-14 14:30:31 +08:00
|
|
|
SerializedDiagnosticReader.cpp
|
2015-11-04 02:33:07 +08:00
|
|
|
TestModuleFileExtension.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
|
2019-06-21 00:59:48 +08:00
|
|
|
InterfaceStubFunctionsConsumer.cpp
|
2014-02-23 21:44:09 +08:00
|
|
|
|
|
|
|
DEPENDS
|
|
|
|
ClangDriverOptions
|
2016-06-03 04:24:07 +08:00
|
|
|
${optional_deps}
|
2009-06-18 23:05:47 +08:00
|
|
|
|
2014-02-26 14:41:29 +08:00
|
|
|
LINK_LIBS
|
2012-06-21 09:30:21 +08:00
|
|
|
clangAST
|
|
|
|
clangBasic
|
|
|
|
clangDriver
|
|
|
|
clangEdit
|
|
|
|
clangLex
|
|
|
|
clangParse
|
|
|
|
clangSema
|
|
|
|
clangSerialization
|
|
|
|
)
|