Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoBump] Merge with 41fecca9 (Jun 14) (76) #340

Merged
merged 156 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
2fa6eaf
[llvm-profgen] Add support for Linux kenrel profile (#92831)
xur-llvm Jun 13, 2024
3dd73dc
[Fuchsia] Add armv7m and armv8m runtimes to Fuchsia Clang toolchain (…
zeroomega Jun 13, 2024
010c55b
[flang] Improve error recovery in tricky situation (#95168)
klausler Jun 13, 2024
2414a90
[flang] Catch NULL(MOLD=assumed-rank) (#95270)
klausler Jun 13, 2024
4b493e3
[ProfileData] Add getValueArrayForSite (#95335)
kazutakahirata Jun 13, 2024
f8fc883
[flang][runtime] Distinguish VALUE from non-VALUE operations in REDUC…
klausler Jun 13, 2024
86bee81
[flang][preprocessor] Fixed-form continuation across preprocessing di…
klausler Jun 13, 2024
2146fd0
Revert "Reland "[AArch64] Decouple feature dependency expansion. (#94…
MaskRay Jun 13, 2024
cd94fa7
[DFSan] Fix sscanf checking that ordinary characters match. (#95333)
browneee Jun 13, 2024
d4a0154
[llvm-project] Fix typo "seperate" (#95373)
jayfoad Jun 13, 2024
c7b5be8
[mlir][TilingInterface] Update documentation for `TilingInterface.td`…
MaheshRavishankar Jun 13, 2024
52d29eb
[LV] Add extra cost model tests with truncated inductions.
fhahn Jun 13, 2024
ba7d5eb
[libc] Fix build breaks caused by f16sqrtf changes (#95459)
overmighty Jun 13, 2024
4158773
[ProfileData] Migrate to getValueArrayForSite (#95457)
kazutakahirata Jun 13, 2024
93181db
[mlir][bzl] Add missing dep
jpienaar Jun 13, 2024
1365ce2
[llvm-profdata] Clean up traverseAllValueSites (NFC) (#95467)
kazutakahirata Jun 13, 2024
b6688a0
[MC] flushPendingLabels: revert setAtom change
MaskRay Jun 13, 2024
597cde1
[mlir][spirv] Implement SPIR-V lowering for `vector.deinterleave` (#9…
angelz913 Jun 13, 2024
27588fe
[MC] Move MCFragment::Atom to MCSectionMachO::Atoms
MaskRay Jun 13, 2024
00ed887
[LLDB][Windows] Fix watchpoints for Windows (#95446)
AlexK0 Jun 13, 2024
8fa7cf0
[HWASan] disable hwasan_symbolize_stack_uas on x86
fmayer Jun 13, 2024
3106a23
[libc][stdlib] Fix UB in freelist (#95330)
PiJoules Jun 13, 2024
1ebda11
[BOLT] Fix duplicate diagnostic message (#95167)
maksfb Jun 13, 2024
01a429c
[mlir][mesh] Fix wrong argument passed to targetShardingInUnsplitLast…
ardaunal Jun 13, 2024
c54f5f6
[flang] Address missed cases for REDUCE change, fixes shared lib buil…
klausler Jun 13, 2024
22ea97d
[lldb] Use packaging module instead of pkg_resources (#93712)
JDevlieghere Jun 13, 2024
602634d
[Transforms] Migrate to a new version of getValueProfDataFromInst (#9…
kazutakahirata Jun 13, 2024
0ca05e8
Reland '[hwasan] Add fixed_shadow_base flag (#73980)' (#95445)
thurstond Jun 14, 2024
41c50f0
[HWASan] comment why hwasan_symbolize_stack_uas is arm64 only
fmayer Jun 14, 2024
785dc76
[llvm][SelectionDAG] Fix up chains in lowerInvokeable. rdar://1139947…
jroelofs Jun 14, 2024
4f8c961
[compiler-rt][AArch64][FMV] Use the hw.optional.arm.caps fast path (#…
jroelofs Jun 14, 2024
50ead2e
[X86][AsmParser] Avoid duplicated code in MatchAndEmit(ATT/Intel)Inst…
KanRobert Jun 14, 2024
cb021f5
[RISCV] Don't use SEW=16 .vf instructions to move scalar bf16 into a …
topperc Jun 14, 2024
836ca5b
[Transforms] Migrate to a new version of getValueProfDataFromInst (#9…
kazutakahirata Jun 14, 2024
75882ed
[Codegen] (NFC) Faster algorithm for MachineBlockPlacement (#91843)
huangjd Jun 14, 2024
eb1248f
[X86][MC] Add missing support for pseudo rex/rex2 prefix in assembler
KanRobert Jun 14, 2024
5745851
[RISCV] Remove unused check prefixes. NFC
topperc Jun 14, 2024
a7a1195
[RISCV] Remove duplicate bf16 testing. NFC
topperc Jun 14, 2024
43bd7ae
StreamChecker.cpp: Use isa<> (for #93408) [-Wunused-but-set-variable]
chapuni Jun 14, 2024
2efe3d7
Reland "[libc] fix aarch64 linux full build (#95358)" (#95423)
SchrodingerZhu Jun 14, 2024
85e8d62
[mlir][scf]: Expose emitNormalizedLoopBounds/denormalizeInductionVari…
AviadCo Jun 14, 2024
7ffeaf0
[MLIR][Flang][OpenMP] Implement lowering simd aligned to MLIR (#95198)
harishch4 Jun 14, 2024
d66084b
[RISCV] Remove unnecessary bf16 -mattr from vfmv.v.f.ll. NFC
topperc Jun 14, 2024
bd6568c
[MLIR][GPU] Add gpu.cluster_dim_blocks and gpu.cluster_block_id Ops (…
schwarzschild-radius Jun 14, 2024
b954462
[RISCV] Remove partially duplicate riscv_vfmv_v_f_vl patterns.
topperc Jun 14, 2024
f83d5d2
[RISCV] Remove vfmerge.vf patterns with bf16 types.
topperc Jun 14, 2024
53dbc1f
[RISCV] Add vselect pattern with SelectFPImm.
topperc Jun 14, 2024
2e7b95e
[Safe Buffers] Serialize unsafe_buffer_usage pragmas (#92031)
ziqingluo-90 Jun 14, 2024
ebdea52
[libc] Provide vprintf for baremetal (#95363)
petrhosek Jun 14, 2024
b1de42a
[libc] printf, putchar and vprintf in bareemetal entrypoints (#95436)
petrhosek Jun 14, 2024
f2d215f
[lldb][TypeSystemClang][NFCI] Factor completion logic for individual …
Michael137 Jun 14, 2024
d890dda
[NFCI][AMDGPU] Try to use PressureDiff to Calculate RegPressure. (#94…
Pierre-vh Jun 14, 2024
4ab37e4
[clang][Fuchsia] Use unsigned int for wint_t on *-fuchsia targets (#9…
frobtech Jun 14, 2024
c4a1440
[lld][ELF] Add basic TLSDESC support for LoongArch
wangleiat Jun 14, 2024
db08b09
[ARM][AArch64] Bail out if CandidatesWithoutStackFixups is empty (#95…
nikic Jun 14, 2024
c947709
[Driver] Support -Wa,--defsym similar to -Wa,-defsym
MaskRay Jun 14, 2024
4942e78
[llvm-exegesis] Only link/initialize supported targets (NFC) (#95421)
nikic Jun 14, 2024
d712ae4
[Driver] Support -Wa,--defsym similar to -Wa,-defsym
MaskRay Jun 14, 2024
706e197
[CodeGen] Remove target SubRegLiveness flags (#95437)
davemgreen Jun 14, 2024
ae71609
[SDAG] Lower range attribute to AssertZext (#95450)
andjo403 Jun 14, 2024
ebb5385
MathExtras/test: increase coverage (#95425)
artagnon Jun 14, 2024
da249ca
[clang-cl] Map /Ot to -O3 instead of -O2 (#95406)
zmodem Jun 14, 2024
dfde077
[SimplifyCFG] More accurate use legality check for sinking (#94462)
nikic Jun 14, 2024
e83adfe
[SPIRV] Silence unused variable warnings (#95492)
llvm-beanz Jun 14, 2024
880d370
[APFloat] Add APFloat support for FP4 data type (#95392)
durga4github Jun 14, 2024
b422fa6
Revert "[MC/DC][Coverage] Loosen the limit of NumConds from 6 (#82448)"
zmodem Jun 14, 2024
dc726c3
Reapply#4 "[RemoveDIs] Load into new debug info format by default in …
SLTozer Jun 13, 2024
bd5fbab
[SimplifyCFG] Add tests for sinking with multiple uses (NFC)
nikic Jun 14, 2024
d62ff71
[Flang][OpenMP] NFC: Check omp.loop_nest in compound construct loweri…
skatrak Jun 14, 2024
b6b0f97
[flang][OpenMP] Support reduction of POINTER variables (#95148)
tblah Jun 14, 2024
32cd703
[clang-cl] Support the /Ob3 flag
zmodem Jun 14, 2024
88e42c6
[libclang/python] Fix bugs in custom enum implementation and add test…
DeinAlptraum Jun 14, 2024
ab0d01a
[MC] Cache MCRegAliasIterator (#93510)
Pierre-vh Jun 14, 2024
4bccd25
[AArch64] LowerAVG - fallback to default expansion (#95416)
RKSimon Jun 14, 2024
44df116
[Error] Add non-consuming toString (#95375)
nikic Jun 14, 2024
4f54b91
[SDPatternMatch] Only match ISD::SIGN_EXTEND in m_SExt (#95415)
c8ef Jun 14, 2024
738fcbe
[SROA] Preserve all GEP flags during speculation
nikic Jun 14, 2024
f1a29ec
[AArch64] Add i128 and fp128 tests to fptoi. NFC
davemgreen Jun 14, 2024
1ceede3
[AMDGPULowerBufferFatPointers] Don't try to preserve flags for consta…
nikic Jun 14, 2024
71f8b44
Reapply: [MC/DC][Coverage] Loosen the limit of NumConds from 6 (#82448)
chapuni Jun 13, 2024
b650764
[lldb][test] Add test for completing ObjCObjectType (#95405)
Michael137 Jun 14, 2024
90fd99c
Recommit "[VPlan] First step towards VPlan cost modeling. (#92555)"
fhahn Jun 14, 2024
ad702e0
[AArch64] Extend SVE diagnostics. (#94976)
hvdijk Jun 14, 2024
0113f26
[AArch64][SME] Enable subreg liveness tracking for AArch64 (#92142)
kmclaughlin-arm Jun 14, 2024
cf4c3d9
[AMDGPU] Extend llvm.amdgcn.set.inactive intrinsic to support Reg32/R…
vikramRH Jun 14, 2024
86dc758
[llvm-c] Move LLVMAttributeIndex to a more apropriate place. NFC.
deadalnix Jun 5, 2024
e910f61
[Flang][OpenMP] Fix type in getBaseObject causing crashes in certain …
agozillon Jun 14, 2024
8ab3f8a
[llvm-exegesis] Fix typos in cmake file
nikic Jun 14, 2024
c6b6e18
[flang] Implement !DIR$ VECTOR ALWAYS (#93830)
DavidTruby Jun 14, 2024
c81d5b1
[X86] Add scalar test coverage for ISD::AVG nodes on 32 and 64-bit ta…
RKSimon Jun 14, 2024
7e3e9d4
[AMDGPU] Change getLdStRegisterOperand to !cond for better diagnostic…
Sisyph Jun 14, 2024
9ad102f
[ProfileData] Migrate to getValueArrayForSite (#95493)
kazutakahirata Jun 14, 2024
d5297b7
[include-cleaner] Pass WorkingDir to suggestPathToFileForDiagnostics …
kadircet Jun 14, 2024
08fae46
[DAG] fold `avgs(sext(x), sext(y))` -> `sext(avgs(x, y))` (#95365)
c8ef Jun 14, 2024
db3a47c
Fix silent truncation of inline ASM `srcloc` cookie when going throug…
beetrees Jun 14, 2024
6b4760a
[AMDGPU] Make use of composeSubRegIndices. NFCI. (#95548)
jayfoad Jun 14, 2024
0945727
[RemoveDIs] Print IR with debug records by default (#91724)
SLTozer Jun 14, 2024
8e0ba08
[clang][HeaderSearch] Fix handling of relative file-paths in suggestP…
kadircet Jun 14, 2024
b1b7643
[mlir][spirv] Add integration test for `vector.deinterleave` (#95469)
angelz913 Jun 14, 2024
43e6f46
[VPlan] Pre-compute cost for all instrs only feeding exit conditions.
fhahn Jun 14, 2024
597d2f7
[OpenMP] Add Environment Variable to disable Reuse of Blocks for High…
tgymnich Jun 14, 2024
7ad12a7
[ARM] Add tan intrinsic lowering (#95439)
farzonl Jun 14, 2024
0774000
[AMDGPULowerBufferFatPointers] Fix offset-only ptrtoint (#95543)
nikic Jun 14, 2024
153fca5
[mlir][bzl] Fix broken BUILD due to typo in `CAPITransformsObjects` i…
bchetioui Jun 14, 2024
74fe1da
[MC][X86] addConstantComments - add mul vXi16 comments
RKSimon Jun 14, 2024
9b7b1be
[CLANG][DWARF] Handle DIE offset collision in DW_IDX_parent (#95339)
ayermolo Jun 14, 2024
0a57a20
[AMDGPU] NFC: Remove duplicate VOP_DPP_Pseudo TableGen definitions (#…
ScottEgerton Jun 14, 2024
d462bf6
[mlir][Transform] Extend transform.foreach to take multiple arguments…
Jun 14, 2024
9afb09e
[libcxx][test][AIX] address more platform differences in locale tests…
daltenty Jun 14, 2024
a5985ca
[mlir][test] Fix filecheck annotation typos [2/n] (#93476)
klensy Jun 14, 2024
2d9b6a0
[GlobalISel][AArch64] AArch64O0PreLegalizerCombiner: Disable fixed-po…
tobias-stadler Jun 14, 2024
180a536
[ProfileData] Fix the order of tests (#95549)
kazutakahirata Jun 14, 2024
bbe9119
[ProfileData] Sink the length checks (#95559)
kazutakahirata Jun 14, 2024
f3aceee
[libc][math][c23] Add f16fmaf C23 math function (#95483)
overmighty Jun 14, 2024
2ed2975
[RISCV] Add isel patterns for bf16 riscv_vfmv_v_f_vl of FP constant.
topperc Jun 14, 2024
a4f6b7d
[lldb] Stop testing LLDB on Clang changes in pre-commit CI (#95537)
Endilll Jun 14, 2024
2f5ec13
[Transforms] Migrate to a new version of getValueProfDataFromInst (#9…
kazutakahirata Jun 14, 2024
c0cba51
[Flang] Hoisting constant-sized allocas at flang codegen. (#95310)
VijayKandiah Jun 14, 2024
8b9dce3
[libc++] Add default copy ctor to "__chrono/exception.h" (#95338)
zeroomega Jun 14, 2024
f808abf
[MC] Add MCFragment allocation helpers
MaskRay Jun 14, 2024
c7b3234
[libc++] Rename workflow that restarts preempted jobs
ldionne Jun 14, 2024
9a92f2f
Make diagnostic pragma override -Werror=foo and DefaultError warnings
MaskRay Jun 14, 2024
72b841d
[Analysis] Migrate to a new version of getValueProfDataFromInst (#95561)
kazutakahirata Jun 14, 2024
b1932b8
[MC] Aligned bundling: remove special handling for RelaxAll
MaskRay Jun 14, 2024
e7e90dd
[AMDGPU] Adding multiple use analysis to SIPeepholeSDWA (#94800)
bfavela Jun 14, 2024
b7599da
[libc] Fixed NamedType usage in Fenv HeaderSpec Types (#95487)
RoseZhang03 Jun 14, 2024
38fd018
[flang] Lower REDUCE intrinsic for reduction op with args by value (#…
clementval Jun 14, 2024
29d857f
[flang] Add stack reclaim pass to reclaim allocas in loop (#95309)
clementval Jun 14, 2024
a43d79a
[mlir][sparse] add canonicalization patterns for IterateOp. (#95569)
Jun 14, 2024
eca988a
Revert "[libc] printf, putchar and vprintf in bareemetal entrypoints …
zeroomega Jun 14, 2024
6f538f6
Revert "Recommit "[VPlan] First step towards VPlan cost modeling. (#9…
aeubanks Jun 14, 2024
3a47d94
[flang][cuda] Propagate data attribute to global with initialization …
clementval Jun 14, 2024
e84ecf2
[NFC][PowerPC] Add test to check lanemasks for subregisters. (#94363)
stefanp-ibm Jun 14, 2024
3ecba1a
[compiler-rt] Remove 'memprof_meminfoblock.h' from MEMPROF_HEADERS (N…
JOE1994 Jun 14, 2024
b6fd6d4
[HLSL] Use hlsl vector template in type printer (#95489)
llvm-beanz Jun 14, 2024
46c8f25
Check whether EvaluatedStmt::Value is valid in VarDecl::hasInit (#94515)
ahatanak Jun 14, 2024
a66e2a1
[libc++] Revert temporary attempt to implement LWG 4110 (#95263)
ldionne Jun 14, 2024
ade28a7
[clang-doc][cmake] Copy assets to build directory (#95187)
ilovepi Jun 14, 2024
e7d5635
[libc++] Revert LWG3223 Broken requirements for shared_ptr converting…
ldionne Jun 14, 2024
1551c09
[flang] Lower function/subroutine attribute to func op (#95468)
clementval Jun 14, 2024
f6947e4
Revert " [AArch64][SME] Enable subreg liveness tracking when SME is a…
fmayer Jun 14, 2024
4368726
[lldb] Tweak Python interpreter workaround on macOS (#95582)
JDevlieghere Jun 14, 2024
2ecb1ab
[mlir][scf]: Removed LoopParams struct and used Range instead (NFC) (…
AviadCo Jun 14, 2024
b1f9440
[GlobalIsel] Import GEP flags (#93850)
tschuett Jun 14, 2024
1af1c9f
[NFC][PowerPC] Update the option to -enable-subreg-liveness.
stefanp-ibm Jun 14, 2024
005758e
[libc][stdlib] Make the FreeListHeap constant-initializable (#95453)
PiJoules Jun 14, 2024
cc7a18c
Set Support system_libs if WIN32, not just MSVC or MINGW (#95505)
z2oh Jun 14, 2024
c63b9a5
[clang-interp] Use -fno-sized-deallocation in two tests (#95546)
nico Jun 14, 2024
445fc51
[lldb][test] Force dwarf4 usage in test requiring it (#95449)
felipepiovezan Jun 14, 2024
feed66f
[InstallAPI] Pick up input headers by directory traversal (#94508)
cyndyishida Jun 14, 2024
53c93a3
[gn build] Port feed66f3eae5
llvmgnsyncbot Jun 14, 2024
4184d33
[Clang][NFC] Avoid opening namespace std (#95470)
philnik777 Jun 14, 2024
38d8f6e
[libc] Remove unnecessary include from putchar.h (#95576)
michaelrj-google Jun 14, 2024
cccc437
[libc] add LIBC_INLINE annotations to BlockStore (#95573)
michaelrj-google Jun 14, 2024
41fecca
[libc] add rwlock (#94156)
SchrodingerZhu Jun 14, 2024
7a86532
[AutoBump] Merge with 41fecca9 (Jun 14)
mgehre-amd Sep 12, 2024
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
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .ci/generate-buildkite-pipeline-premerge
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ function compute-projects-to-test() {
fi
;;
clang)
for p in clang-tools-extra compiler-rt lldb cross-project-tests; do
# lldb is temporarily removed to alleviate Linux pre-commit CI waiting times
for p in clang-tools-extra compiler-rt cross-project-tests; do
echo $p
done
;;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
script: |
const failure_regex = /Process completed with exit code 1./
const preemption_regex = /The runner has received a shutdown signal/
const wf_run = context.payload.workflow_run
core.notice(`Running on "${wf_run.display_title}" by @${wf_run.actor.login} (event: ${wf_run.event})\nWorkflow run URL: ${wf_run.html_url}`)
Expand Down Expand Up @@ -80,30 +80,30 @@ jobs:
}
check_run_ids.push(check_run.id);
}
has_preempted_job = false;
for (check_run_id of check_run_ids) {
console.log('Listing annotations for check run: ' + check_run_id);
annotations = await github.rest.checks.listAnnotations({
owner: context.repo.owner,
repo: context.repo.repo,
check_run_id: check_run_id
})
for (annotation of annotations.data) {
if (annotation.annotation_level != 'failure') {
continue;
}
const preemption_match = annotation.message.match(preemption_regex);
if (preemption_match != null) {
console.log('Found preemption message: ' + annotation.message);
has_preempted_job = true;
}
const failure_match = annotation.message.match(failure_regex);
if (failure_match != null) {
// We only want to restart the workflow if all of the failures were due to preemption.
Expand All @@ -115,20 +115,18 @@ jobs:
return;
}
}
}
}
if (!has_preempted_job) {
core.notice('No preempted jobs found. Not restarting workflow.');
await create_check_run('neutral', 'No preempted jobs found. Not restarting workflow.')
return;
}
core.notice("Restarted workflow: " + context.payload.workflow_run.id);
await github.rest.actions.reRunWorkflowFailedJobs({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id
})
await create_check_run('success', 'Restarted workflow run due to preempted job')
5 changes: 3 additions & 2 deletions bolt/lib/Rewrite/LinuxKernelRewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1479,8 +1479,9 @@ Error LinuxKernelRewriter::tryReadAltInstructions(uint32_t AltInstFeatureSize,
}
}

BC.outs() << "BOLT-INFO: parsed " << EntryID
<< " alternative instruction entries\n";
if (!ParseOnly)
BC.outs() << "BOLT-INFO: parsed " << EntryID
<< " alternative instruction entries\n";

return Error::success();
}
Expand Down
40 changes: 34 additions & 6 deletions clang-tools-extra/clang-doc/tool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,38 @@ target_link_libraries(clang-doc
clangDoc
)

install(FILES ../assets/clang-doc-default-stylesheet.css
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
COMPONENT clang-doc)

install(FILES ../assets/index.js
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
COMPONENT clang-doc)
set(assets
index.js
clang-doc-default-stylesheet.css
)

set(asset_dir "${CMAKE_CURRENT_SOURCE_DIR}/../assets")
set(resource_dir "${CMAKE_BINARY_DIR}/share/clang")
set(out_files)

function(copy_files_to_dst src_dir dst_dir file)
set(src "${src_dir}/${file}")
set(dst "${dst_dir}/${file}")
add_custom_command(OUTPUT ${dst}
DEPENDS ${src}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
COMMENT "Copying ${file} to ${dst_dir}"
)
list(APPEND out_files ${dst})
set(out_files ${out_files} PARENT_SCOPE)
endfunction(copy_files_to_dst)

foreach(f ${assets})
install(FILES ${asset_dir}/${f}
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
COMPONENT clang-doc)
copy_files_to_dst(${asset_dir} ${resource_dir} ${f})
endforeach(f)

add_custom_target(copy-clang-doc-assets
DEPENDS ${out_files}
COMMENT "Copying Clang-Doc Assets"
)
set_target_properties(copy-clang-doc-assets PROPERTIES FOLDER "Clang-Doc/Assets")
add_dependencies(clang-doc copy-clang-doc-assets)
10 changes: 5 additions & 5 deletions clang-tools-extra/clangd/TidyProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ TidyProvider addTidyChecks(llvm::StringRef Checks,
}

TidyProvider disableUnusableChecks(llvm::ArrayRef<std::string> ExtraBadChecks) {
constexpr llvm::StringLiteral Seperator(",");
constexpr llvm::StringLiteral Separator(",");
static const std::string BadChecks = llvm::join_items(
Seperator,
// We want this list to start with a seperator to
Separator,
// We want this list to start with a separator to
// simplify appending in the lambda. So including an
// empty string here will force that.
"",
Expand Down Expand Up @@ -227,7 +227,7 @@ TidyProvider disableUnusableChecks(llvm::ArrayRef<std::string> ExtraBadChecks) {
for (const std::string &Str : ExtraBadChecks) {
if (Str.empty())
continue;
Size += Seperator.size();
Size += Separator.size();
if (LLVM_LIKELY(Str.front() != '-'))
++Size;
Size += Str.size();
Expand All @@ -238,7 +238,7 @@ TidyProvider disableUnusableChecks(llvm::ArrayRef<std::string> ExtraBadChecks) {
for (const std::string &Str : ExtraBadChecks) {
if (Str.empty())
continue;
DisableGlob += Seperator;
DisableGlob += Separator;
if (LLVM_LIKELY(Str.front() != '-'))
DisableGlob.push_back('-');
DisableGlob += Str;
Expand Down
11 changes: 9 additions & 2 deletions clang-tools-extra/include-cleaner/lib/IncludeSpeller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "clang-include-cleaner/IncludeSpeller.h"
#include "clang-include-cleaner/Types.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Registry.h"
#include <memory>
Expand All @@ -30,8 +31,14 @@ class DefaultIncludeSpeller : public IncludeSpeller {
return Input.H.verbatim().str();
case Header::Physical:
bool IsAngled = false;
std::string WorkingDir;
if (auto WD = Input.HS.getFileMgr()
.getVirtualFileSystem()
.getCurrentWorkingDirectory())
WorkingDir = *WD;
std::string FinalSpelling = Input.HS.suggestPathToFileForDiagnostics(
Input.H.physical(), Input.Main->tryGetRealPathName(), &IsAngled);
Input.H.resolvedPath(), WorkingDir, Input.Main->tryGetRealPathName(),
&IsAngled);
return IsAngled ? "<" + FinalSpelling + ">" : "\"" + FinalSpelling + "\"";
}
llvm_unreachable("Unknown clang::include_cleaner::Header::Kind enum");
Expand Down Expand Up @@ -60,4 +67,4 @@ std::string spellHeader(const IncludeSpeller::Input &Input) {
return Spelling;
}

} // namespace clang::include_cleaner
} // namespace clang::include_cleaner
18 changes: 18 additions & 0 deletions clang-tools-extra/include-cleaner/unittests/IncludeSpellerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,24 @@ TEST(IncludeSpeller, CanOverrideSystemHeaders) {
HS, MainFile}));
}

TEST(IncludeSpeller, RelativeIncludeSearchPath) {
TestInputs Inputs;

Inputs.WorkingDir = "/root/inner";
Inputs.ExtraArgs.push_back("-I..");
Inputs.ExtraFiles["/root/foo.h"] = "";
TestAST AST{Inputs};

auto &FM = AST.fileManager();
auto &HS = AST.preprocessor().getHeaderSearchInfo();
const auto *MainFile = AST.sourceManager().getFileEntryForID(
AST.sourceManager().getMainFileID());

EXPECT_EQ("\"foo.h\"",
spellHeader(
{Header{*FM.getOptionalFileRef("/root/foo.h")}, HS, MainFile}));
}

IncludeSpellingStrategy::Add<DummyIncludeSpeller>
Speller("dummy", "Dummy Include Speller");

Expand Down
8 changes: 4 additions & 4 deletions clang/bindings/python/clang/cindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ def name(self):

@classmethod
def from_id(cls, id):
if id >= len(cls._kinds) or cls._kinds[id] is None:
if id < 0 or id >= len(cls._kinds) or cls._kinds[id] is None:
raise ValueError("Unknown template argument kind %d" % id)
return cls._kinds[id]

Expand Down Expand Up @@ -1336,7 +1336,7 @@ def __repr__(self):
CursorKind.OMP_TEAMS_DISTRIBUTE_DIRECTIVE = CursorKind(271)

# OpenMP teams distribute simd directive.
CursorKind.OMP_TEAMS_DISTRIBUTE_DIRECTIVE = CursorKind(272)
CursorKind.OMP_TEAMS_DISTRIBUTE_SIMD_DIRECTIVE = CursorKind(272)

# OpenMP teams distribute parallel for simd directive.
CursorKind.OMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_DIRECTIVE = CursorKind(273)
Expand Down Expand Up @@ -2215,7 +2215,7 @@ def name(self):

@staticmethod
def from_id(id):
if id >= len(StorageClass._kinds) or not StorageClass._kinds[id]:
if id < 0 or id >= len(StorageClass._kinds) or not StorageClass._kinds[id]:
raise ValueError("Unknown storage class %d" % id)
return StorageClass._kinds[id]

Expand Down Expand Up @@ -2395,7 +2395,7 @@ def __repr__(self):
TypeKind.OCLRESERVEID = TypeKind(160)

TypeKind.OBJCOBJECT = TypeKind(161)
TypeKind.OBJCCLASS = TypeKind(162)
TypeKind.OBJCTYPEPARAM = TypeKind(162)
TypeKind.ATTRIBUTED = TypeKind(163)

TypeKind.OCLINTELSUBGROUPAVCMCEPAYLOAD = TypeKind(164)
Expand Down
47 changes: 47 additions & 0 deletions clang/bindings/python/tests/cindex/test_enums.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import unittest

from clang.cindex import (
CursorKind,
TemplateArgumentKind,
ExceptionSpecificationKind,
AvailabilityKind,
AccessSpecifier,
TypeKind,
RefQualifierKind,
LinkageKind,
TLSKind,
StorageClass,
)


class TestCursorKind(unittest.TestCase):
enums = [
CursorKind,
TemplateArgumentKind,
ExceptionSpecificationKind,
AvailabilityKind,
AccessSpecifier,
TypeKind,
RefQualifierKind,
LinkageKind,
TLSKind,
StorageClass,
]

def test_from_id(self):
"""Check that kinds can be constructed from valid IDs"""
for enum in self.enums:
self.assertEqual(enum.from_id(2), enum._kinds[2])
with self.assertRaises(ValueError):
enum.from_id(len(enum._kinds))
with self.assertRaises(ValueError):
enum.from_id(-1)

def test_unique_kinds(self):
"""Check that no kind name has been used multiple times"""
for enum in self.enums:
for id in range(len(enum._kinds)):
try:
enum.from_id(id).name
except ValueError:
pass
6 changes: 3 additions & 3 deletions clang/cmake/caches/Fuchsia-stage2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -300,14 +300,14 @@ if(FUCHSIA_SDK)
set(LLVM_RUNTIME_MULTILIB_hwasan+noexcept_TARGETS "aarch64-unknown-fuchsia;riscv64-unknown-fuchsia" CACHE STRING "")
endif()

foreach(target armv6m-unknown-eabi)
foreach(target armv6m-unknown-eabi;armv7m-unknown-eabi;armv8m-unknown-eabi)
list(APPEND BUILTIN_TARGETS "${target}")
set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
set(BUILTINS_${target}_CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "")
set(BUILTINS_${target}_CMAKE_SYSROOT "" CACHE STRING "")
set(BUILTINS_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
foreach(lang C;CXX;ASM)
set(BUILTINS_${target}_CMAKE_${lang}_FLAGS "--target=${target} -mcpu=cortex-m0plus -mthumb" CACHE STRING "")
set(BUILTINS_${target}_CMAKE_${lang}_FLAGS "--target=${target} -mthumb" CACHE STRING "")
endforeach()
foreach(type SHARED;MODULE;EXE)
set(BUILTINS_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
Expand All @@ -321,7 +321,7 @@ foreach(target armv6m-unknown-eabi)
set(RUNTIMES_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
set(RUNTIMES_${target}_CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY CACHE STRING "")
foreach(lang C;CXX;ASM)
set(RUNTIMES_${target}_CMAKE_${lang}_FLAGS "--target=${target} -mcpu=cortex-m0plus -mthumb" CACHE STRING "")
set(RUNTIMES_${target}_CMAKE_${lang}_FLAGS "--target=${target} -mthumb" CACHE STRING "")
endforeach()
foreach(type SHARED;MODULE;EXE)
set(RUNTIMES_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")
Expand Down
15 changes: 15 additions & 0 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,14 @@ Clang Frontend Potentially Breaking Changes
- The ``hasTypeLoc`` AST matcher will no longer match a ``classTemplateSpecializationDecl``;
existing uses should switch to ``templateArgumentLoc`` or ``hasAnyTemplateArgumentLoc`` instead.

Clang Python Bindings Potentially Breaking Changes
--------------------------------------------------
- Renamed ``CursorKind`` variant 272 from ``OMP_TEAMS_DISTRIBUTE_DIRECTIVE``
to ``OMP_TEAMS_DISTRIBUTE_SIMD_DIRECTIVE``. The previous name was incorrect, it was a duplicate
of variant 271.
- Renamed ``TypeKind`` variant 162 from ``OBJCCLASS`` to ``OBJCTYPEPARAM``.
The previous name was incorrect, it was a duplicate of variant 28.

What's New in Clang |release|?
==============================
Some of the major new features and improvements to Clang are listed
Expand Down Expand Up @@ -343,6 +351,9 @@ Non-comprehensive list of changes in this release
- Added ``__is_bitwise_cloneable`` which is used to check whether a type
can be safely copied by memcpy/memmove.

- ``#pragma GCC diagnostic warning "-Wfoo"`` can now downgrade ``-Werror=foo``
errors and certain default-to-error ``-W`` diagnostics to warnings.

New Compiler Flags
------------------
- ``-fsanitize=implicit-bitfield-conversion`` checks implicit truncation and
Expand Down Expand Up @@ -921,6 +932,10 @@ Android Support
Windows Support
^^^^^^^^^^^^^^^

- The clang-cl ``/Ot`` compiler option ("optimize for speed", also implied by
``/O2``) now maps to clang's ``-O3`` optimizataztion level instead of ``-O2``.
Users who prefer the old behavior can use ``clang-cl /Ot /clang:-O2 ...``.

- Clang-cl now supports function targets with intrinsic headers. This allows
for runtime feature detection of intrinsics. Previously under clang-cl
``immintrin.h`` and similar intrinsic headers would only include the intrinsics
Expand Down
Loading