2010-09-14 03:54:41 +04:00
|
|
|
set( LLVM_USED_LIBS
|
2011-02-12 02:46:38 +03:00
|
|
|
clangAST
|
|
|
|
clangBasic
|
2010-09-14 03:54:41 +04:00
|
|
|
clangDriver
|
2012-03-07 02:32:32 +04:00
|
|
|
clangEdit
|
2011-02-12 02:46:38 +03:00
|
|
|
clangLex
|
2010-09-14 03:54:41 +04:00
|
|
|
clangParse
|
|
|
|
clangSema
|
2011-02-12 02:46:38 +03:00
|
|
|
clangSerialization
|
2010-09-14 03:54:41 +04:00
|
|
|
)
|
|
|
|
|
2009-03-24 20:52:34 +03:00
|
|
|
add_clang_library(clangFrontend
|
2009-05-19 03:06:15 +04:00
|
|
|
ASTConsumers.cpp
|
2010-02-09 22:21:46 +03:00
|
|
|
ASTMerge.cpp
|
2009-06-24 02:01:29 +04:00
|
|
|
ASTUnit.cpp
|
2009-05-19 08:21:30 +04:00
|
|
|
CacheTokens.cpp
|
2011-12-20 12:42:15 +04:00
|
|
|
ChainedDiagnosticConsumer.cpp
|
2011-12-09 05:55:54 +04:00
|
|
|
ChainedIncludesSource.cpp
|
2009-11-13 06:51:44 +03:00
|
|
|
CompilerInstance.cpp
|
2009-11-17 09:02:29 +03:00
|
|
|
CompilerInvocation.cpp
|
2011-04-05 03:17:56 +04:00
|
|
|
CreateInvocationFromCommandLine.cpp
|
2009-05-19 08:21:30 +04:00
|
|
|
DependencyFile.cpp
|
2012-02-02 04:54:52 +04:00
|
|
|
DependencyGraph.cpp
|
2011-12-17 09:26:04 +04:00
|
|
|
DiagnosticRenderer.cpp
|
2009-11-14 13:42:35 +03:00
|
|
|
FrontendAction.cpp
|
2009-11-14 13:42:46 +03:00
|
|
|
FrontendActions.cpp
|
2009-11-13 05:06:12 +03:00
|
|
|
FrontendOptions.cpp
|
2011-02-02 18:41:17 +03:00
|
|
|
HeaderIncludeGen.cpp
|
2008-10-26 03:56:18 +03:00
|
|
|
InitHeaderSearch.cpp
|
2009-04-21 09:40:52 +04:00
|
|
|
InitPreprocessor.cpp
|
2009-11-26 05:14:31 +03: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>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149055 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-26 11:55:45 +04:00
|
|
|
LayoutOverrideSource.cpp
|
2011-04-07 22:31:10 +04:00
|
|
|
LogDiagnosticPrinter.cpp
|
2011-01-26 01:10:37 +03:00
|
|
|
MultiplexConsumer.cpp
|
2009-05-19 08:21:30 +04:00
|
|
|
PrintPreprocessedOutput.cpp
|
2011-10-29 04:12:39 +04:00
|
|
|
SerializedDiagnosticPrinter.cpp
|
2011-10-16 03:43:53 +04:00
|
|
|
TextDiagnostic.cpp
|
2009-05-19 08:21:30 +04:00
|
|
|
TextDiagnosticBuffer.cpp
|
|
|
|
TextDiagnosticPrinter.cpp
|
2011-09-26 04:38:03 +04:00
|
|
|
VerifyDiagnosticConsumer.cpp
|
2009-05-19 08:21:30 +04:00
|
|
|
Warnings.cpp
|
2008-10-26 03:56:18 +03:00
|
|
|
)
|
2009-06-18 19:05:47 +04:00
|
|
|
|
2009-10-13 00:50:45 +04:00
|
|
|
IF(MSVC)
|
|
|
|
get_target_property(NON_ANSI_COMPILE_FLAGS clangFrontend COMPILE_FLAGS)
|
|
|
|
string(REPLACE /Za
|
|
|
|
"" NON_ANSI_COMPILE_FLAGS
|
|
|
|
${NON_ANSI_COMPILE_FLAGS})
|
|
|
|
set_target_properties(clangFrontend PROPERTIES COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS})
|
|
|
|
ENDIF(MSVC)
|
|
|
|
|
2010-09-14 03:54:41 +04:00
|
|
|
add_dependencies(clangFrontend
|
2010-06-17 04:37:02 +04:00
|
|
|
ClangAttrClasses
|
|
|
|
ClangAttrList
|
2010-09-09 03:40:30 +04:00
|
|
|
ClangCC1Options
|
2010-09-14 03:54:41 +04:00
|
|
|
ClangDiagnosticFrontend
|
2009-06-25 09:03:29 +04:00
|
|
|
ClangDiagnosticLex
|
2010-05-05 09:41:05 +04:00
|
|
|
ClangDiagnosticSema
|
2011-09-06 06:08:40 +04:00
|
|
|
ClangDriverOptions
|
2010-05-30 11:21:58 +04:00
|
|
|
ClangDeclNodes
|
2010-09-14 03:54:41 +04:00
|
|
|
ClangStmtNodes)
|