Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

LLVM 4.0 #14

Merged
merged 2,440 commits into from
Mar 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2440 commits
Select commit Hold shift + click to select a range
918a07d
Add warning flag for "partial specialization is not more specialized …
zygoloid Dec 27, 2016
7d56d0a
DebugInfo: Don't include size/alignment on class declarations
dwblaikie Dec 27, 2016
2a7adec
Update test that relies on the optimizer to match new output.
mkuperst Dec 28, 2016
c673702
DR1315: a non-type template argument in a partial specialization is p…
zygoloid Dec 28, 2016
ea5d486
Mark 'auto' as dependent when instantiating the type of a non-type te…
zygoloid Dec 28, 2016
7542435
[CodeGen] Unique constant CompoundLiterals.
gburgessiv Dec 28, 2016
0922a53
[ThinLTO] Add missing FileCheck invocation
teresajohnson Dec 28, 2016
2b63cb5
Revert "Driver: switch Windows to static RelocModel"
rnk Dec 28, 2016
0c0969d
Fix format. NFC
kkwli Dec 28, 2016
a8961ec
[ThinLTO] No need to rediscover imports in distributed backend
teresajohnson Dec 28, 2016
5924534
Mention devirtualization in release notes
prazek Dec 28, 2016
b9a778b
Revert "Mention devirtualization in release notes"
prazek Dec 28, 2016
715c2ef
[ItaniumABI] NFC changes
prazek Dec 28, 2016
a7c050e
[ADT] Delete RefCountedBaseVPTR.
Dec 29, 2016
1008244
[OpenMP] Sema and parsing for 'target teams distribute parallel for’ …
kkwli Dec 29, 2016
fd7e956
Remove bogus assertion and add testcase that triggers it.
zygoloid Dec 30, 2016
904c878
Allow lexer to handle string_view literals. Patch from Anton Bikineev.
EricWF Dec 30, 2016
ac2b77e
CodeGen: use a StringSwitch instead of cascasding ifs
compnerd Dec 30, 2016
e8932e5
[clang] Minor fix to libASTMatcherTutorial
madsravn Dec 30, 2016
f9f8435
Wdocumentation fix
RKSimon Dec 30, 2016
de64666
Typo fix in AST matcher documentation: s/aribtrary/arbitrary/
jdennett Dec 31, 2016
ff65ccf
Remove redundant assertion.
zygoloid Dec 31, 2016
021fcf9
[clang] Fix clean build of generate-order-file
alexander-shaposhnikov Dec 31, 2016
2faed1c
[c++17] Implement P0522R0 as written. This allows a template template…
zygoloid Dec 31, 2016
dbfc80e
Fix typo in test case. NFC
kkwli Dec 31, 2016
b63fa9e
CodeGen: update comment about RTTI field
compnerd Jan 1, 2017
f34626d
Address post-commit review comments.
zygoloid Jan 2, 2017
1c79362
DR1391: Check for implicit conversion sequences for non-dependent fun…
zygoloid Jan 2, 2017
60fb868
Revert "DR1391: Check for implicit conversion sequences for non-depen…
rengolin Jan 2, 2017
74e1e75
[OpenMP] Add test cases for the proc_bind and schedule clauses with '…
kkwli Jan 2, 2017
6f68cf4
Remove isIgnored()-test that is more expensive than the analysis behi…
djasper-gh Jan 2, 2017
c064de9
Add testcase for the regression introduced in r290808.
zygoloid Jan 2, 2017
be92cc3
[OpenMP] Sema and parsing for 'target teams distribute parallel for s…
kkwli Jan 3, 2017
8940798
[CodeCompletion] Autocomplete NS_DESIGNATED_INITIALIZER in initializers
hyp Jan 3, 2017
a2c5a55
Handle FriendDecl in DeclContextPrinter
hyp Jan 3, 2017
550e0fa
Handle UsingDecl and UsingShadowDecl in DeclContextPrinter
hyp Jan 3, 2017
4e71c53
Handle EmptyDecl in DeclContextPrinter
hyp Jan 3, 2017
7fd9da9
Handle ClassTemplateSpecializationDecl in DeclContextPrinter
hyp Jan 3, 2017
44df50d
Handle AccessSpecDecl in DeclContextPrinter
hyp Jan 3, 2017
d26625b
Handle VarTemplateDecl in DeclContextPrinter
hyp Jan 3, 2017
48194d1
Handle StaticAssertDecl in DeclContextPrinter
hyp Jan 3, 2017
fb9bfee
[clang-tidy] Add check name to YAML export
alexfh Jan 3, 2017
f5be8ba
[OPENMP] Private, firstprivate, and lastprivate clauses for distribut…
Jan 3, 2017
046076f
[OpenMP] Code cleanup for NVPTX OpenMP codegen
arpith-jacob Jan 3, 2017
4c4d0ce
[Win64] Don't widen integer literal zero arguments to unprototyped fu…
rnk Jan 3, 2017
fd845a5
Relax CHECK line from r290906
rnk Jan 3, 2017
d49e17b
Re-add objectsize function/incomplete type checks.
gburgessiv Jan 3, 2017
ae1bed5
Add -plugin-opt=sample-profile for thinLTO build.
danielcdh Jan 4, 2017
e5eb147
Extend -Wtautological-overlap-compare to more cases.
Weverything Jan 4, 2017
08f2fcf
Fix template argument deduction when only some of a parameter pack is…
zygoloid Jan 4, 2017
6471f5e
Remove accidentally-added lines in r290923 test, and add another test…
zygoloid Jan 4, 2017
ac00ead
Change clang-format's Chromium JavaScript defaults
nico Jan 4, 2017
44ea0c4
Fix deduction of pack elements after a braced-init-list.
zygoloid Jan 4, 2017
a8ae85f
[clang] Update lit config in utils/perf-training
alexander-shaposhnikov Jan 4, 2017
8bd2b99
clang-format: [JS] avoid indent after ambient function declarations.
mprobst Jan 4, 2017
8fca6cf
Add -f[no-]strict-return flag that can be used to avoid undefined beh…
hyp Jan 4, 2017
c9c73f6
Fix a buildbot failure introduced by r290960.
hyp Jan 4, 2017
4f271b8
Accept and ignore -Wa,-mbig-obj on COFF targets for gas compatibility
rnk Jan 4, 2017
75198e1
[CUDA] Pre-include sm_60 and sm_61 headers.
Artem-B Jan 4, 2017
54598be
[OpenMP] Update target codegen for NVPTX device.
arpith-jacob Jan 4, 2017
1b7423d
Use -### so the mbig-obj.c test passes when there is no registered x8…
rnk Jan 4, 2017
e56476e
Reverting commit r290983 while debugging test failure on windows.
arpith-jacob Jan 4, 2017
05ecdd8
Support -fno-delayed-template-parsing in clang-cl.exe
rnk Jan 4, 2017
2c7a72a
[Sema] Replace remove_if+erase with erase_if. NFC.
gburgessiv Jan 4, 2017
cb6c378
Factor out duplicated code and simplify.
zygoloid Jan 4, 2017
2124289
Revert accidentally-committed file.
zygoloid Jan 4, 2017
88fb408
Fix failure to treat overloaded function in braced-init-list as a non…
zygoloid Jan 4, 2017
e50c4ef
Remove use of intrusive ref count ownership acquisition
dwblaikie Jan 4, 2017
d3ccc21
Fix for LLVM Bitcode API change (to use std::shared_ptr)
dwblaikie Jan 4, 2017
5465b0d
[Parse] Don't ignore attributes after a late-parsed attr.
gburgessiv Jan 4, 2017
809bd28
Bail out if we try to build a DeclRefExpr naming an invalid declaration.
zygoloid Jan 4, 2017
485c70d
Only instantiate members of nested classes in local classes once, rat…
zygoloid Jan 4, 2017
952bd43
[gtest] The way EXPECT_TEST now works after upgrading gtest triggers an
chandlerc Jan 4, 2017
b0c114c
Correct Vectorcall Register passing and HVA Behavior
Jan 5, 2017
f228bfa
[MS] Instantiate default args during instantiation of exported defaul…
rnk Jan 5, 2017
a82cebf
[Sema] Mark undefined ctors as deleted. NFC.
gburgessiv Jan 5, 2017
cf2ed0b
Fix assertion failure on deduction failure due to too short template …
zygoloid Jan 5, 2017
b98cb95
Factor out more common logic in template argument deduction from func…
zygoloid Jan 5, 2017
0738ab9
Per [temp.deduct.call], do not deduce an array bound of 0 from an emp…
zygoloid Jan 5, 2017
86d8413
Add AVR target and toolchain to Clang
Jan 5, 2017
a758d03
[AVR] Support r26 through r31 in inline assembly
Jan 5, 2017
73ac1c9
[AVR] Revert the functional part of r291083
Jan 5, 2017
ec86be0
No canonical-prefixes match in avr-toolchain.c.
hokein Jan 5, 2017
d407903
[OpenMP] Update target codegen for NVPTX device.
arpith-jacob Jan 5, 2017
72e537a
CodeGen: plumb header search down to the IAS
compnerd Jan 5, 2017
da5ef96
[OpenMP] Add fields for flags in the offload entry descriptor.
Jan 5, 2017
68c2f4e
test: add an explicit triple
compnerd Jan 5, 2017
76b76dc
[Windows] Remove functions in intrin.h that are defined in Builtin.def.
Jan 5, 2017
15128fb
[TableGen] Only normalize the spelling of GNU-style attributes.
Jan 5, 2017
c3d7a36
[CUDA] Make CUDAInstallationDetector take the host triple in its cons…
Jan 5, 2017
c04b674
[Driver] Driver changes to support CUDA compilation on Windows.
Jan 5, 2017
9412efe
[ToolChains] Use "static" instead of an anonymous namespace for a fun…
Jan 5, 2017
26ee5b5
[CUDA] Add __declspec spellings for CUDA attributes.
Jan 5, 2017
bd340f1
[CUDA] More correctly inherit primitive types from the host during de…
Jan 5, 2017
6f52d3c
[CUDA] Let NVPTX inherit the host's calling conventions.
Jan 5, 2017
a2b7c3d
[CUDA] Don't define functions that the CUDA headers themselves define…
Jan 5, 2017
a39e49e
[CUDA] Rename keywords used in macro so they don't conflict with MSVC.
Jan 5, 2017
71fadd1
test: add a requires registered target
compnerd Jan 5, 2017
eeb7838
Migrate PathDiagnosticPiece to std::shared_ptr
dwblaikie Jan 5, 2017
cdc6110
Typo
jsonn Jan 5, 2017
f6f617a
Use shared_ptr instead of IntrusiveRefCntPtr for ModuleFileExtension
dwblaikie Jan 5, 2017
adb2f1d
Simplify ASTReader ctor by using in-class initializers (NSDMIs to the…
dwblaikie Jan 5, 2017
88c7b76
Simplify ASTReader ctor by using in-class initializers for many membe…
dwblaikie Jan 5, 2017
e8ba82c
Move VariantMatcher's Payload to std::shared_ptr rather than Intrusiv…
dwblaikie Jan 5, 2017
d214e3d
Move FailedModulesSet over to shared_ptr from IntrusiveRefCntPtr
dwblaikie Jan 5, 2017
2dac430
Move PreprocessorOptions to std::shared_ptr from IntrusiveRefCntPtr
dwblaikie Jan 5, 2017
5a12bb8
Move Preprocessor over to std::shared_ptr rather than IntrusiveRefCntPtr
dwblaikie Jan 5, 2017
48cafe3
Move SerializedDiagnosticPrinter's SharedState to std::shared_ptr rat…
dwblaikie Jan 5, 2017
1c9f404
If an explicitly-specified pack might have been extended by template …
zygoloid Jan 5, 2017
d65cd1f
Add vec_insert4b and vec_extract4b functions to altivec.h
Jan 5, 2017
4a854da
IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocationBase and …
dwblaikie Jan 5, 2017
d2dd7ec
Fix examples for recent shared_ptrification
dwblaikie Jan 5, 2017
f5be8a0
Remove the ppc insertword/extractword expected fail tests.
Jan 5, 2017
0aa0570
Add missing "original call argument has same type as deduced paramete…
zygoloid Jan 5, 2017
41fdaf8
Fix bug where types other than 'cv auto', 'cv auto &', and 'cv auto &…
zygoloid Jan 5, 2017
a6e549d
shared_ptrify (from InclusiveRefCntPtr) HeaderSearchOptions
dwblaikie Jan 6, 2017
9b9db7f
CodeGen: address post commit review comments for r291123
compnerd Jan 6, 2017
95ab339
Constify UsingPackDecl::getInstantiatedFromUsingDecl(), NFC.
yrnkrn Jan 6, 2017
da684cc
[ObjC] The declarator for a block literal should be a definition
hyp Jan 6, 2017
fb284a0
[CodeCompletion] Block property setters: Use dynamic priority heuristic
hyp Jan 6, 2017
5f335c7
[ubsan] Minimize size of data for type_mismatch (Redo of D19667)
filcab Jan 6, 2017
6e36bc2
[OpenCL] Re-enable supported core extensions based on opencl version …
kzhuravl Jan 6, 2017
471e0b2
Revert "IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocationB…
dwblaikie Jan 6, 2017
95fe8f8
Revert "Fix examples for recent shared_ptrification"
dwblaikie Jan 6, 2017
6ad4377
Make ASTContext::getDeclAlign return the correct alignment for
ahatanaka Jan 6, 2017
91d69c3
[CUDA] Add a host target triple to cuda-version-check.cu
rnk Jan 6, 2017
1c63251
[OpenMP] fix typo - the standalone 'distribute' pragma should be 'tea…
kkwli Jan 6, 2017
8dc751f
Clean up redundant isa<T> before getAs<T>. NFC.
gburgessiv Jan 6, 2017
e781b71
Reapply "IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocation…
dwblaikie Jan 6, 2017
d362589
Use CodegenOpts::less when creating a TargetMachine for clang `-O1`
joker-eph Jan 6, 2017
26313ca
Revisit PR10177: don't instantiate a variable if it's only referenced…
zygoloid Jan 6, 2017
eb51731
Add a cc1 option to force disabling lifetime-markers emission from clang
joker-eph Jan 6, 2017
2d274ea
[ThinLTO] Optionally ignore empty index file
teresajohnson Jan 6, 2017
337babf
[ThinLTO] Specify target triple in new test
teresajohnson Jan 7, 2017
8ea4b56
PR23135: Don't instantiate constexpr functions referenced in unevalua…
zygoloid Jan 7, 2017
1e7cc03
PR20090: Add (passing) test from this bug; it's been fixed for a while.
zygoloid Jan 7, 2017
8c96c95
Consistently use a ConstantEvaluated context for expressions in attri…
zygoloid Jan 7, 2017
651f23f
Fix buildbots.
zygoloid Jan 7, 2017
f8d2115
PR18402: work around bug in libstdc++4.8's detection of whether ::get…
zygoloid Jan 8, 2017
2a3dc33
Fix tests with CLANG_DEFAULT_LINKER
Jan 8, 2017
81f1ca9
[cxx1z-constexpr-lambda] Make conversion function constexpr, and teac…
faisalv Jan 8, 2017
d9fddb6
PR30305: Implement proposed DR resolution to prevent slicing via inhe…
zygoloid Jan 8, 2017
64f15d6
PR31514: Add recursive self-instantiation check during template argument
zygoloid Jan 8, 2017
3a07c87
Use the correct ObjC EH personality
d0k Jan 8, 2017
c900a4b
[index] Introduce SymbolSubKind for reporting language-specific details.
akyrtzi Jan 8, 2017
f3bc0e6
Implement C++ DR1391 (wg21.link/cwg1391)
zygoloid Jan 9, 2017
87fca9c
Fix test for targets whose preferred spelling for an 8-byte int is 'l…
zygoloid Jan 9, 2017
4711e17
Revert r291410 and r291411.
zygoloid Jan 9, 2017
25f75c4
[cxx1z-constexpr-lambda] Implement constant evaluation of non-capturi…
faisalv Jan 9, 2017
5a6ff0d
Add the diagnose_if attribute to clang.
gburgessiv Jan 9, 2017
1538c57
Add release notes for `diagnose_if`
gburgessiv Jan 9, 2017
dd6177c
Implement DR1388 (wg21.link/cwg1388).
zygoloid Jan 9, 2017
7937c28
Implement C++ DR1391 (wg21.link/cwg1391)
zygoloid Jan 9, 2017
1381765
clang-format: [JS] ASI after imports
mprobst Jan 9, 2017
08205c8
clang-format: [JS] fix broken test.
mprobst Jan 9, 2017
0560207
[analyzer] Add checker for iterators dereferenced beyond their range.
Xazax-hun Jan 9, 2017
5450c95
clang-format: Improve support for override/final as variable names.
djasper-gh Jan 9, 2017
cf7bcc3
Extend NetBSD/AArch64 to cover Big Endian as well.
jsonn Jan 9, 2017
50b589a
Use the same ABI logic for AArch64 Big Endian as in other places
jsonn Jan 9, 2017
ddb8d27
[cxx1z-constexpr-lambda] [NFC] Add a FIXME to reinstate certain restr…
faisalv Jan 9, 2017
f0e69d8
[MS] Fix function type mangling of default ctor closures
rnk Jan 9, 2017
7820b29
[clang] Enable using --section-ordering-file option of ld.gold
alexander-shaposhnikov Jan 9, 2017
966fedc
Follow up to r291448: use isStructorDecl in one more place
rnk Jan 9, 2017
f912c0c
Split dllexport default constructor closure tests out into a separate…
rnk Jan 9, 2017
0982ba0
[MS] Mark default args of exported default constructors as used
rnk Jan 9, 2017
c24cbe9
[Lit Test] Make tests C++11 compatible - nothrow destructors
Jan 9, 2017
da676ad
PCH: fix a regression that reports a module is defined in both pch an…
manman-ren Jan 9, 2017
266cb72
[Frontend] Correct values of ATOMIC_*_LOCK_FREE to match builtin
mgorny Jan 9, 2017
fb15aef
Allow constexpr construction of subobjects unconditionally, not just …
dlj-NaN Jan 9, 2017
265da68
PR31587: Fix handling of __FUNCSIG__ in C.
zygoloid Jan 9, 2017
0d1b93e
MSVC seems to use (void) in __FUNCSIG__ for a zero-parameter function…
zygoloid Jan 9, 2017
9a6a1cb
Fixing test to work when the compiler defaults to a different C++ sta…
dyung Jan 9, 2017
7490caa
Add a test for diagnose_if.
gburgessiv Jan 9, 2017
e0078e5
[cmake] Obtain LLVM_CMAKE_PATH from llvm-config
mgorny Jan 9, 2017
b625445
Check that template template arguments match template template parame…
zygoloid Jan 9, 2017
4c19d05
[coroutines] Sema: Allow co_return all by itself.
GorNishanov Jan 10, 2017
3be02d1
[NFC] Rename RAII ExpressionEvaluationContext variable from Unevaluat…
faisalv Jan 10, 2017
f20949c
Don't classify variable template names as type templates.
zygoloid Jan 10, 2017
59a0544
[OpenMP] Support the 'is_device_ptr' clause with 'target parallel for…
kkwli Jan 10, 2017
b8a7fd7
[OpenMP] Support the 'is_device_ptr' clause with 'target parallel for…
kkwli Jan 10, 2017
f8beebd
AMD family 17h (znver1) enablement
topperc Jan 10, 2017
84bfee6
[X86] Add recent CPU strings to some of the tests that check other cp…
topperc Jan 10, 2017
2bc6921
Fix rejects-valid with default member initializers exposed by r291318.
zygoloid Jan 10, 2017
54f39e1
Remove fixme, use ASTContext::getCanonicalTemplateSpecializationType.
vgvassilev Jan 10, 2017
a41b647
[Sema] Avoid -Wshadow warning when a "redefinition of " error is pres…
hyp Jan 10, 2017
f6a92cc
[OpenMP] Basic support for a parallel directive in a target region on…
arpith-jacob Jan 10, 2017
96e79e3
[AArch64] Use generic bitreverse intrinsic, rather than AArch64 speci…
Jan 10, 2017
2b6d6f1
CGDecl: Skip static variable initializers in unreachable code
MatzeB Jan 10, 2017
69518aa
[OpenMP] Sema and parsing for 'target teams distribute simd’ pragma
kkwli Jan 10, 2017
e18cc41
[analyzer] Treat pointers to static member functions as function poin…
devincoughlin Jan 10, 2017
0d9e23a
[ARM] Use generic bitreverse intrinsic, rather than ARM specific rbit.
Jan 10, 2017
e4ffc9c
[OpenMP] Remove outdated comments. NFC.
kkwli Jan 10, 2017
770a04d
Fix conversion index / argument index mismatch when diagnosing overlo…
zygoloid Jan 10, 2017
19a05b4
Don't try to check implicit conversion sequences for an object argume…
zygoloid Jan 10, 2017
be15c6a
[Driver] Add openSuse AArch64 Triple
Jan 10, 2017
2930caf
Serialize the UsesSEH bit on FunctionDecl
rnk Jan 10, 2017
8033f18
Remove a couple of parameters that are always false.
zygoloid Jan 10, 2017
646ead8
Remove dead code.
zygoloid Jan 10, 2017
d3062fa
Module: Do not create Implicit ImportDecl for module X if we
manman-ren Jan 11, 2017
0fd8210
[analyzer] Fix crash in body farm for getter without implicit self.
devincoughlin Jan 11, 2017
c899dcd
[Modules] Support #import when entering files with modules
bcardosolopes Jan 11, 2017
5db0676
Remove repeated word in comment (NFC)
pepsiman Jan 11, 2017
464502e
Unbreak the clang-fuzzer build after r291184.
d0k Jan 11, 2017
1fcc440
This reverts r291628. As suggested by Richard, we can simply
manman-ren Jan 11, 2017
40f6a72
Module: Do not add any link flags when an implementation TU of a modu…
manman-ren Jan 11, 2017
231cda6
[index] Add 'contained-by' relation between references and their lexi…
akyrtzi Jan 11, 2017
c67dd13
[PowerPC] Fix the wrong implementation of builtin vec_rlnm.
Jan 11, 2017
8293248
[index] Add 'IBTypeOf' relation for ObjC methods marked with IBAction…
akyrtzi Jan 11, 2017
4cb2297
[index] Ignore invalid ObjC categories.
akyrtzi Jan 11, 2017
4a19ab5
[index] Introduce symbol subkinds to mark an accessor getter or setter.
akyrtzi Jan 11, 2017
5ceef6b
Remove redundant passing around of a "ContainsAutoType" flag.
zygoloid Jan 12, 2017
de0c61b
PR31469: Don't add friend template class decls to redecl chain in dep…
vgvassilev Jan 12, 2017
335c7a0
[analyzer] Avoid a crash in DereferenceChecker on string literal init…
haoNoQ Jan 12, 2017
485363a
Avoid multiple -Wunreachable-code diagnostics that are triggered by
hyp Jan 12, 2017
4d6ad36
Tracking exception specification source locations
pepsiman Jan 12, 2017
ae40636
Pass -fprofile-sample-use to lto backends.
danielcdh Jan 12, 2017
2f233c1
Revert r291774 which caused buildbot failure.
danielcdh Jan 12, 2017
271b0e8
[Docs][OpenCL] Added OpenCL feature description to Clang documentation.
Jan 12, 2017
bff998a
[analyzer] Don't dereference the array value when binding it to a ref…
haoNoQ Jan 12, 2017
ae27323
UsersManual.rst: Update clang-cl options list
zmodem Jan 12, 2017
ddf8ad1
[Modules] Fix misleading warning about missing textual header in umbr…
bcardosolopes Jan 12, 2017
2d28523
UsersManual.rst: Update clang-cl options list again
zmodem Jan 12, 2017
3840cfc
clang-format: Treat braced lists like other complex parameters.
djasper-gh Jan 12, 2017
6535a57
Add additional testcases for nsw markings on ++ and --.
Jan 12, 2017
49db389
clang-format: Fix regression introduced by r291801.
djasper-gh Jan 12, 2017
dc25d53
Add entry for -MJ.
jsonn Jan 12, 2017
51551f0
Creating release_40 branch off revision 291814
zmodem Jan 12, 2017
f2cf07d
Generate docs/AttributeReference.rst
zmodem Jan 12, 2017
05f0bce
ReleaseNotes: remove 'if you're reading on trunk' warning
zmodem Jan 12, 2017
8af7b13
Merging r291850 and r291853:
zmodem Jan 12, 2017
e63b0f2
Merging r291865:
zmodem Jan 13, 2017
959137d
Merging r291871:
zmodem Jan 13, 2017
0e2702f
Merging r291877:
zmodem Jan 13, 2017
2227088
Merging r291907:
zmodem Jan 13, 2017
77e5388
Merging r291881:
zmodem Jan 13, 2017
a5eaae1
Merging r291879:
zmodem Jan 13, 2017
0ff2de3
Merging r291964:
zmodem Jan 13, 2017
ad08994
Mention Devirtualization and ThinLTO in ReleaseNotes
prazek Jan 15, 2017
b71ee54
Add -fstrict-vtable-pointers to UsersManual
prazek Jan 16, 2017
933c061
Regenerate AttributeReference.rst
zmodem Jan 17, 2017
f73370b
Fix docs build
zmodem Jan 17, 2017
bd78a8a
Fix -fstrict-vtable-pointers link
zmodem Jan 17, 2017
4e35e74
Merging r292265:
zmodem Jan 17, 2017
ed73853
Make the -fstrict-vtable-pointers link relative
zmodem Jan 17, 2017
8396c5b
Merging r292032:
zmodem Jan 18, 2017
1f645f8
Merging r292052:
zmodem Jan 18, 2017
4077c4b
Merging r292183:
zmodem Jan 18, 2017
3a631d5
Merging r292247:
zmodem Jan 18, 2017
d339a88
Merge remote-tracking branch 'upstream/release_40'
Jan 19, 2017
579d400
Merge branch 'llvm-4.0' of https://github.com/dylanmckay/emscripten-f…
kripken Jan 24, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
193 changes: 122 additions & 71 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
"--libdir"
"--includedir"
"--prefix"
"--src-root")
"--src-root"
"--cmakedir")
execute_process(
COMMAND ${CONFIG_COMMAND}
RESULT_VARIABLE HAD_ERROR
Expand All @@ -41,6 +42,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
list(GET CONFIG_OUTPUT 3 INCLUDE_DIR)
list(GET CONFIG_OUTPUT 4 LLVM_OBJ_ROOT)
list(GET CONFIG_OUTPUT 5 MAIN_SRC_DIR)
list(GET CONFIG_OUTPUT 6 LLVM_CMAKE_PATH)

if(NOT MSVC_IDE)
set(LLVM_ENABLE_ASSERTIONS ${ENABLE_ASSERTIONS}
Expand All @@ -58,7 +60,6 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
NO_DEFAULT_PATH)

set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
set(LLVMCONFIG_FILE "${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
if(EXISTS ${LLVMCONFIG_FILE})
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
Expand Down Expand Up @@ -124,6 +125,7 @@ Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
endif()

if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
# Note: path not really used, except for checking if lit was found
set(LLVM_LIT ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
if(NOT LLVM_UTILS_PROVIDED)
add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/FileCheck utils/FileCheck)
Expand All @@ -140,8 +142,10 @@ Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
endif()
else()
# Seek installed Lit.
find_program(LLVM_LIT "lit.py" ${LLVM_MAIN_SRC_DIR}/utils/lit
DOC "Path to lit.py")
find_program(LLVM_LIT
NAMES llvm-lit lit.py lit
PATHS "${LLVM_MAIN_SRC_DIR}/utils/lit"
DOC "Path to lit.py")
endif()

if(LLVM_LIT)
Expand Down Expand Up @@ -177,6 +181,9 @@ if (LIBXML2_FOUND)
set(CLANG_HAVE_LIBXML 1)
endif()

include(CheckIncludeFile)
check_include_file(sys/resource.h CLANG_HAVE_RLIMITS)

set(CLANG_RESOURCE_DIR "" CACHE STRING
"Relative directory from the Clang binary to its resource files.")

Expand All @@ -192,13 +199,27 @@ set(ENABLE_LINKER_BUILD_ID OFF CACHE BOOL "pass --build-id to ld")
set(ENABLE_X86_RELAX_RELOCATIONS OFF CACHE BOOL
"enable x86 relax relocations by default")

set(CLANG_DEFAULT_LINKER "" CACHE STRING
"Default linker to use (linker name or absolute path, empty for platform default)")

set(CLANG_DEFAULT_CXX_STDLIB "" CACHE STRING
"Default C++ stdlib to use (empty for architecture default, \"libstdc++\" or \"libc++\"")
"Default C++ stdlib to use (\"libstdc++\" or \"libc++\", empty for platform default")
if (NOT(CLANG_DEFAULT_CXX_STDLIB STREQUAL "" OR
CLANG_DEFAULT_CXX_STDLIB STREQUAL "libstdc++" OR
CLANG_DEFAULT_CXX_STDLIB STREQUAL "libc++"))
message(WARNING "Resetting default C++ stdlib to use architecture default")
set(CLANG_DEFAULT_CXX_STDLIB "")
message(WARNING "Resetting default C++ stdlib to use platform default")
set(CLANG_DEFAULT_CXX_STDLIB "" CACHE STRING
"Default C++ stdlib to use (\"libstdc++\" or \"libc++\", empty for platform default" FORCE)
endif()

set(CLANG_DEFAULT_RTLIB "" CACHE STRING
"Default runtime library to use (\"libgcc\" or \"compiler-rt\", empty for platform default)")
if (NOT(CLANG_DEFAULT_RTLIB STREQUAL "" OR
CLANG_DEFAULT_RTLIB STREQUAL "libgcc" OR
CLANG_DEFAULT_RTLIB STREQUAL "compiler-rt"))
message(WARNING "Resetting default rtlib to use platform default")
set(CLANG_DEFAULT_RTLIB "" CACHE STRING
"Default runtime library to use (\"libgcc\" or \"compiler-rt\", empty for platform default)" FORCE)
endif()

set(CLANG_DEFAULT_OPENMP_RUNTIME "libomp" CACHE STRING
Expand Down Expand Up @@ -247,22 +268,19 @@ if( NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR )
endif()
endif()

# Compute the Clang version from the LLVM version.
string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION
${PACKAGE_VERSION})
message(STATUS "Clang version: ${CLANG_VERSION}")

string(REGEX REPLACE "([0-9]+)\\.[0-9]+(\\.[0-9]+)?" "\\1" CLANG_VERSION_MAJOR
${CLANG_VERSION})
string(REGEX REPLACE "[0-9]+\\.([0-9]+)(\\.[0-9]+)?" "\\1" CLANG_VERSION_MINOR
${CLANG_VERSION})
if (${CLANG_VERSION} MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
set(CLANG_HAS_VERSION_PATCHLEVEL 1)
string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" CLANG_VERSION_PATCHLEVEL
${CLANG_VERSION})
else()
set(CLANG_HAS_VERSION_PATCHLEVEL 0)
# If CLANG_VERSION_* is specified, use it, if not use LLVM_VERSION_*.
if(NOT DEFINED CLANG_VERSION_MAJOR)
set(CLANG_VERSION_MAJOR ${LLVM_VERSION_MAJOR})
endif()
if(NOT DEFINED CLANG_VERSION_MINOR)
set(CLANG_VERSION_MINOR ${LLVM_VERSION_MINOR})
endif()
if(NOT DEFINED CLANG_VERSION_PATCHLEVEL)
set(CLANG_VERSION_PATCHLEVEL ${LLVM_VERSION_PATCH})
endif()
# Unlike PACKAGE_VERSION, CLANG_VERSION does not include LLVM_VERSION_SUFFIX.
set(CLANG_VERSION "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}.${CLANG_VERSION_PATCHLEVEL}")
message(STATUS "Clang version: ${CLANG_VERSION}")

# Configure the Version.inc file.
configure_file(
Expand Down Expand Up @@ -404,6 +422,29 @@ else()
endif()
add_subdirectory(examples)

if(APPLE)
# this line is needed as a cleanup to ensure that any CMakeCaches with the old
# default value get updated to the new default.
if(CLANG_ORDER_FILE STREQUAL "")
unset(CLANG_ORDER_FILE CACHE)
unset(CLANG_ORDER_FILE)
endif()


set(CLANG_ORDER_FILE ${CMAKE_CURRENT_BINARY_DIR}/clang.order CACHE FILEPATH
"Order file to use when compiling clang in order to improve startup time (Darwin Only - requires ld64).")

if(NOT EXISTS ${CLANG_ORDER_FILE})
string(FIND "${CLANG_ORDER_FILE}" "${CMAKE_CURRENT_BINARY_DIR}" PATH_START)
if(PATH_START EQUAL 0)
file(WRITE ${CLANG_ORDER_FILE} "\n")
else()
message(FATAL_ERROR "Specified order file '${CLANG_ORDER_FILE}' does not exist.")
endif()
endif()
endif()


if( CLANG_INCLUDE_TESTS )
if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include/gtest/gtest.h)
add_subdirectory(unittests)
Expand Down Expand Up @@ -438,37 +479,19 @@ if( CLANG_INCLUDE_DOCS )
add_subdirectory(docs)
endif()

add_subdirectory(cmake/modules)

if(APPLE)
# this line is needed as a cleanup to ensure that any CMakeCaches with the old
# default value get updated to the new default.
if(CLANG_ORDER_FILE STREQUAL "")
unset(CLANG_ORDER_FILE CACHE)
unset(CLANG_ORDER_FILE)
endif()


set(CLANG_ORDER_FILE ${CMAKE_CURRENT_BINARY_DIR}/clang.order CACHE FILEPATH
"Order file to use when compiling clang in order to improve startup time (Darwin Only - requires ld64).")

if(CLANG_ORDER_FILE AND NOT EXISTS ${CLANG_ORDER_FILE})
string(FIND "${CLANG_ORDER_FILE}" "${CMAKE_CURRENT_BINARY_DIR}" PATH_START)
if(PATH_START EQUAL 0)
file(WRITE ${CLANG_ORDER_FILE} "\n")
else()
message(FATAL_ERROR "Specified order file '${CLANG_ORDER_FILE}' does not exist.")
endif()
endif()
if(CLANG_STAGE)
message(STATUS "Setting current clang stage to: ${CLANG_STAGE}")
endif()

add_subdirectory(cmake/modules)

if (CLANG_ENABLE_BOOTSTRAP)
include(ExternalProject)

add_custom_target(clang-bootstrap-deps DEPENDS clang)

if(NOT CLANG_STAGE)
set(CLANG_STAGE stage1)
message(STATUS "Setting current clang stage to: ${CLANG_STAGE}")
endif()

string(REGEX MATCH "stage([0-9]*)" MATCHED_STAGE "${CLANG_STAGE}")
Expand All @@ -491,19 +514,28 @@ if (CLANG_ENABLE_BOOTSTRAP)

set(STAMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/${NEXT_CLANG_STAGE}-stamps/)
set(BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${NEXT_CLANG_STAGE}-bins/)
set(cmake_command ${CMAKE_COMMAND})

# If the next stage is LTO we need to depend on LTO and possibly LLVMgold
if(BOOTSTRAP_LLVM_ENABLE_LTO OR LLVM_ENABLE_LTO)
set(LTO_DEP LTO)
# If the next stage is LTO we need to depend on LTO and possibly lld or LLVMgold
if(BOOTSTRAP_LLVM_ENABLE_LTO OR LLVM_ENABLE_LTO AND NOT LLVM_BUILD_INSTRUMENTED)
if(APPLE)
add_dependencies(clang-bootstrap-deps LTO)
# on Darwin we need to set DARWIN_LTO_LIBRARY so that -flto will work
# using the just-built compiler, and we need to override DYLD_LIBRARY_PATH
# so that the host object file tools will use the just-built libLTO.
set(LTO_LIBRARY -DDARWIN_LTO_LIBRARY=${LLVM_SHLIB_OUTPUT_INTDIR}/libLTO.dylib)
set(cmake_command ${CMAKE_COMMAND} -E env DYLD_LIBRARY_PATH=${LLVM_LIBRARY_OUTPUT_INTDIR} ${CMAKE_COMMAND})
# However if System Integrity Protection is enabled the DYLD variables
# will be scrubbed from the environment of any base system commands. This
# includes /bin/sh, which ninja uses when executing build commands. To
# work around the envar being filtered away we pass it in as a CMake
# variable, and have LLVM's CMake append the envar to the archiver calls.
set(LTO_LIBRARY -DDARWIN_LTO_LIBRARY=${LLVM_SHLIB_OUTPUT_INTDIR}/libLTO.dylib
-DDYLD_LIBRARY_PATH=${LLVM_LIBRARY_OUTPUT_INTDIR})
elseif(NOT WIN32)
list(APPEND LTO_DEP LLVMgold llvm-ar llvm-ranlib)
add_dependencies(clang-bootstrap-deps llvm-ar llvm-ranlib)
if(BOOTSTRAP_LLVM_ENABLE_LLD)
add_dependencies(clang-bootstrap-deps lld)
elseif(LLVM_BINUTILS_INCDIR)
add_dependencies(clang-bootstrap-deps LLVMgold)
endif()
set(LTO_AR -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ar)
set(LTO_RANLIB -DCMAKE_RANLIB=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ranlib)
endif()
Expand All @@ -514,7 +546,7 @@ if (CLANG_ENABLE_BOOTSTRAP)
)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NEXT_CLANG_STAGE}-cleared
DEPENDS clang ${LTO_DEP}
DEPENDS clang-bootstrap-deps
COMMAND ${CMAKE_COMMAND} -E remove_directory ${BINARY_DIR}
COMMAND ${CMAKE_COMMAND} -E make_directory ${BINARY_DIR}
COMMAND ${CMAKE_COMMAND} -E remove_directory ${STAMP_DIR}
Expand All @@ -526,18 +558,25 @@ if (CLANG_ENABLE_BOOTSTRAP)
set(verbose -DCMAKE_VERBOSE_MAKEFILE=On)
endif()

set(BOOTSTRAP_DEFAULT_PASSTHROUGH
set(_BOOTSTRAP_DEFAULT_PASSTHROUGH
PACKAGE_VERSION
PACKAGE_VENDOR
LLVM_VERSION_MAJOR
LLVM_VERSION_MINOR
LLVM_VERSION_PATCH
CLANG_VERSION_MAJOR
CLANG_VERSION_MINOR
CLANG_VERSION_PATCHLEVEL
LLVM_VERSION_SUFFIX
LLVM_BINUTILS_INCDIR
CLANG_REPOSITORY_STRING
CMAKE_MAKE_PROGRAM)
CMAKE_MAKE_PROGRAM
CMAKE_OSX_ARCHITECTURES)

if(TARGET compiler-rt)
set(RUNTIME_DEP compiler-rt)
# We don't need to depend on compiler-rt if we're building instrumented
# because the next stage will use the same compiler used to build this stage.
if(TARGET compiler-rt AND NOT LLVM_BUILD_INSTRUMENTED)
add_dependencies(clang-bootstrap-deps compiler-rt)
endif()

set(COMPILER_OPTIONS
Expand All @@ -546,18 +585,27 @@ if (CLANG_ENABLE_BOOTSTRAP)
-DCMAKE_ASM_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/clang)

if(BOOTSTRAP_LLVM_BUILD_INSTRUMENTED)
set(PGO_DEP llvm-profdata)
add_dependencies(clang-bootstrap-deps llvm-profdata)
set(PGO_OPT -DLLVM_PROFDATA=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-profdata)
endif()

if(LLVM_BUILD_INSTRUMENTED)
set(PGO_DEP generate-profdata)
add_dependencies(clang-bootstrap-deps generate-profdata)
set(PGO_OPT -DLLVM_PROFDATA_FILE=${CMAKE_CURRENT_BINARY_DIR}/utils/perf-training/clang.profdata)
set(COMPILER_OPTIONS
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_ASM_COMPILER=${CMAKE_ASM_COMPILER})
set(RUNTIME_DEP) # Don't set runtime dependencies
# Use the current tools for LTO instead of the instrumented ones
list(APPEND _BOOTSTRAP_DEFAULT_PASSTHROUGH
CMAKE_CXX_COMPILER
CMAKE_C_COMPILER
CMAKE_ASM_COMPILER
CMAKE_AR
CMAKE_RANLIB
DARWIN_LTO_LIBRARY
DYLD_LIBRARY_PATH)

set(COMPILER_OPTIONS)
set(LTO_LIBRARY)
set(LTO_AR)
set(LTO_RANLIB)
endif()

# Find all variables that start with BOOTSTRAP_ and populate a variable with
Expand All @@ -577,16 +625,20 @@ if (CLANG_ENABLE_BOOTSTRAP)
endforeach()

# Populate the passthrough variables
foreach(variableName ${CLANG_BOOTSTRAP_PASSTHROUGH} ${BOOTSTRAP_DEFAULT_PASSTHROUGH})
if(${variableName})
string(REPLACE ";" "\;" value ${${variableName}})
foreach(variableName ${CLANG_BOOTSTRAP_PASSTHROUGH} ${_BOOTSTRAP_DEFAULT_PASSTHROUGH})
if(DEFINED ${variableName})
if("${${variableName}}" STREQUAL "")
set(value "")
else()
string(REPLACE ";" "\;" value ${${variableName}})
endif()
list(APPEND PASSTHROUGH_VARIABLES
-D${variableName}=${value})
endif()
endforeach()

ExternalProject_Add(${NEXT_CLANG_STAGE}
DEPENDS clang ${LTO_DEP} ${RUNTIME_DEP} ${PGO_DEP}
DEPENDS clang-bootstrap-deps
PREFIX ${NEXT_CLANG_STAGE}
SOURCE_DIR ${CMAKE_SOURCE_DIR}
STAMP_DIR ${STAMP_DIR}
Expand All @@ -601,7 +653,6 @@ if (CLANG_ENABLE_BOOTSTRAP)
-DCLANG_STAGE=${NEXT_CLANG_STAGE}
${COMPILER_OPTIONS}
${LTO_LIBRARY} ${LTO_AR} ${LTO_RANLIB} ${verbose} ${PGO_OPT}
CMAKE_COMMAND ${cmake_command}
INSTALL_COMMAND ""
STEP_TARGETS configure build
USES_TERMINAL_CONFIGURE 1
Expand All @@ -612,7 +663,7 @@ if (CLANG_ENABLE_BOOTSTRAP)
# exclude really-install from main target
set_target_properties(${NEXT_CLANG_STAGE} PROPERTIES _EP_really-install_EXCLUDE_FROM_MAIN On)
ExternalProject_Add_Step(${NEXT_CLANG_STAGE} really-install
COMMAND ${cmake_command} --build <BINARY_DIR> --target install
COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --target install
COMMENT "Performing install step for '${NEXT_CLANG_STAGE}'"
DEPENDEES build
USES_TERMINAL 1
Expand All @@ -628,7 +679,7 @@ if (CLANG_ENABLE_BOOTSTRAP)
set_target_properties(${NEXT_CLANG_STAGE} PROPERTIES _EP_${target}_EXCLUDE_FROM_MAIN On)

ExternalProject_Add_Step(${NEXT_CLANG_STAGE} ${target}
COMMAND ${cmake_command} --build <BINARY_DIR> --target ${target}
COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --target ${target}
COMMENT "Performing ${target} for '${NEXT_CLANG_STAGE}'"
DEPENDEES configure
USES_TERMINAL 1
Expand Down
8 changes: 8 additions & 0 deletions bindings/python/clang/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,13 @@
Bindings for the Clang indexing library.
"""


# Python 3 uses unicode for strings. The bindings, in particular the interaction
# with ctypes, need modifying to handle conversions between unicode and
# c-strings.
import sys
if sys.version_info[0] != 2:
raise Exception("Only Python 2 is supported.")

__all__ = ['cindex']

Loading