[Openmp-commits] [clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)
via Openmp-commits
openmp-commits at lists.llvm.org
Mon Apr 29 08:40:00 PDT 2024
https://github.com/ldrumm updated https://github.com/llvm/llvm-project/pull/86318
>From a92dd8eb155f20d0c9324081a2025bee36ab1e84 Mon Sep 17 00:00:00 2001
From: Luke Drummond <luke.drummond at codeplay.com>
Date: Fri, 22 Mar 2024 17:09:54 +0000
Subject: [PATCH 1/2] Finally formalise our defacto line-ending policy
Historically, we've not automatically enforced how git tracks line
endings, but there are many, many commits that "undo" unintended CRLFs
getting into history.
`git log --pretty=oneline --grep=CRLF` shows nearly 100 commits
involving reverts of CRLF making its way into the index and then
history. As far as I can tell, there are none the other way round except
for specific cases like `.bat` files or tests for parsers that need to
accept such sequences.
Of note, one of the earliest of those listed in that output is:
```
commit 9795860250734e5c2a879546c534e35d9edd5944
Author: NAKAMURA Takumi <geek4civic at gmail.com>
Date: Thu Feb 3 11:41:27 2011 +0000
cmake/*: Add svn:eol-style=native and fix CRLF.
llvm-svn: 124793
```
...which introduced such a defacto policy for subversion.
With old versions of git, it's been a bit of a crapshoot whether
enforcing storing line endings in the history will upset checkouts on
machines where such line endings are the norm. Indeed many users have
enforced that git checks out the working copy according to a global or
per-user config via core crlf, or core autocrlf.
For ~8 years now[1], however, git has supported the ability to "do as
the Romans do" on checkout, but internally store subsets of text files
with line-endings specified via a system of patterns in the
gitattributes file. Since we now have this ability, and we've been
specifying attributes for various binary files, I think it makes sense
to rid us of all that work converting things "back", and just let git
handle the local checkout. Thus the new toplevel policy here is
* text=auto
In simple terms this means "unless otherwise specified, convert all
files considered "text" files to LF in the project history, but check
them out as expected on the local machine. What is "expected on the
local machine" is dependent on configuration and default.
For those files in the repository that *do* need CRLF endings, I've
adopted a policy of `eol=crlf` which means that git will store them in
history with LF, but regardless of user config, they'll be checked out
in tree with CRLF.
Finally, existing files have been "corrected" in history via `git add
--renormalize .`
[1]: git 2.10 was released with fixed support for fine-grained
line-ending tracking that respects user-config *and* repo policy. This
can be considered the point at which git will respect both the user's
local working tree preference *and* the history as specified by the
maintainers. See
https://github.com/git/git/blob/master/Documentation/RelNotes/2.10.0.txt#L248
for the release note.
---
.gitattributes | 7 +++++++
clang-tools-extra/clangd/test/.gitattributes | 3 +++
clang/test/.gitattributes | 4 ++++
llvm/docs/TestingGuide.rst | 6 ++++++
llvm/test/FileCheck/.gitattributes | 1 +
llvm/test/tools/llvm-ar/Inputs/.gitattributes | 1 +
llvm/utils/lit/tests/Inputs/shtest-shell/.gitattributes | 1 +
7 files changed, 23 insertions(+)
create mode 100644 clang-tools-extra/clangd/test/.gitattributes
create mode 100644 clang/test/.gitattributes
create mode 100644 llvm/test/FileCheck/.gitattributes
create mode 100644 llvm/test/tools/llvm-ar/Inputs/.gitattributes
create mode 100644 llvm/utils/lit/tests/Inputs/shtest-shell/.gitattributes
diff --git a/.gitattributes b/.gitattributes
index 6b281f33f737db..aced01d485c181 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,3 +1,10 @@
+# Checkout as native, commit as LF except in specific circumstances
+* text=auto
+*.bat text eol=crlf
+*.rc text eol=crlf
+*.sln text eol=crlf
+*.natvis text eol=crlf
+
libcxx/src/**/*.cpp merge=libcxx-reformat
libcxx/include/**/*.h merge=libcxx-reformat
diff --git a/clang-tools-extra/clangd/test/.gitattributes b/clang-tools-extra/clangd/test/.gitattributes
new file mode 100644
index 00000000000000..20971adc2b5d03
--- /dev/null
+++ b/clang-tools-extra/clangd/test/.gitattributes
@@ -0,0 +1,3 @@
+input-mirror.test text eol=crlf
+too_large.test text eol=crlf
+protocol.test text eol=crlf
diff --git a/clang/test/.gitattributes b/clang/test/.gitattributes
new file mode 100644
index 00000000000000..160fc6cf561751
--- /dev/null
+++ b/clang/test/.gitattributes
@@ -0,0 +1,4 @@
+FixIt/fixit-newline-style.c text eol=crlf
+Frontend/system-header-line-directive-ms-lineendings.c text eol=crlf
+Frontend/rewrite-includes-mixed-eol-crlf.* text eol=crlf
+clang/test/Frontend/rewrite-includes-mixed-eol-lf.h text eolf=lf
diff --git a/llvm/docs/TestingGuide.rst b/llvm/docs/TestingGuide.rst
index e32e4d1e535abb..ba16b323e9e41d 100644
--- a/llvm/docs/TestingGuide.rst
+++ b/llvm/docs/TestingGuide.rst
@@ -360,6 +360,12 @@ Best practices for regression tests
- Try to give values (including variables, blocks and functions) meaningful
names, and avoid retaining complex names generated by the optimization
pipeline (such as ``%foo.0.0.0.0.0.0``).
+- If your tests depend on specific input file encodings, beware of line-ending
+ issues across different platforms, and in the project's history. Before you
+ commit tests that depend on explicit encodings, consider adding filetype or
+ specific line-ending annotations to a `<.gitattributes
+ https://git-scm.com/docs/gitattributes#_effects>`_ file in the appropriate
+ directory in the repository.
Extra files
-----------
diff --git a/llvm/test/FileCheck/.gitattributes b/llvm/test/FileCheck/.gitattributes
new file mode 100644
index 00000000000000..165288dd75c93e
--- /dev/null
+++ b/llvm/test/FileCheck/.gitattributes
@@ -0,0 +1 @@
+dos-style-eol.txt
diff --git a/llvm/test/tools/llvm-ar/Inputs/.gitattributes b/llvm/test/tools/llvm-ar/Inputs/.gitattributes
new file mode 100644
index 00000000000000..6c8a26285daf7f
--- /dev/null
+++ b/llvm/test/tools/llvm-ar/Inputs/.gitattributes
@@ -0,0 +1 @@
+mri-crlf.mri text eol=crlf
diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/.gitattributes b/llvm/utils/lit/tests/Inputs/shtest-shell/.gitattributes
new file mode 100644
index 00000000000000..2df17345df5b87
--- /dev/null
+++ b/llvm/utils/lit/tests/Inputs/shtest-shell/.gitattributes
@@ -0,0 +1 @@
+*.dos text eol=crlf
>From 11bd1c618c9ea07d62be93f86588ade7d8c1f6ab Mon Sep 17 00:00:00 2001
From: Luke Drummond <luke.drummond at codeplay.com>
Date: Mon, 29 Apr 2024 16:39:34 +0100
Subject: [PATCH 2/2] Renormalize line endings whitespace only after
a92dd8eb155f
Line ending policies were changed in the parent, a92dd8eb155f. To make
it easier to resolve downstream merge conflicts after line-ending
policies are adjusted this is a separate whitespace-only commit. If you
have merge conflicts as a result, you can simply `git add --renormalize
-u && git merge --continue` or `git add --renormalize -u && git rebase
--continue`
---
.../delimited-input-comment-at-the-end.test | 22 +-
clang-tools-extra/clangd/test/hover.test | 114 +-
.../clangd/test/input-mirror.test | 34 +-
clang-tools-extra/clangd/test/protocol.test | 226 +-
.../test/spaces-in-delimited-input.test | 26 +-
clang-tools-extra/clangd/test/too_large.test | 14 +-
.../duplicate-include/duplicate-include.h | 30 +-
.../duplicate-include/duplicate-include2.h | 2 +-
.../duplicate-include/system/sys/types.h | 2 +-
.../else-after-return-if-constexpr.cpp | 44 +-
.../Inputs/CompileError/module.modulemap | 20 +-
.../Inputs/MissingHeader/module.modulemap | 20 +-
.../test/pp-trace/Inputs/module.modulemap | 36 +-
.../lib/Tooling/DumpTool/ClangSrcLocDump.cpp | 310 +-
.../AST/HLSL/this-reference-template.hlsl | 92 +-
clang/test/AST/HLSL/this-reference.hlsl | 124 +-
clang/test/AST/objc-default-ctor-init.mm | 42 +-
.../dcl.init/dcl.init.ref/p5-examples.cpp | 112 +-
.../p15-star-this-capture.cpp | 44 +-
.../CXX/lex/lex.literal/lex.string/p4.cpp | 34 +-
clang/test/CodeGen/fpconstrained.c | 50 +-
clang/test/CodeGen/fpconstrained.cpp | 98 +-
.../attr-x86-no_caller_saved_registers.cpp | 62 +-
.../CodeGenCXX/debug-info-atexit-stub.cpp | 44 +-
clang/test/CodeGenHLSL/builtins/clamp.hlsl | 268 +-
clang/test/CodeGenHLSL/builtins/cos.hlsl | 82 +-
clang/test/CodeGenHLSL/builtins/floor.hlsl | 86 +-
.../CodeGenHLSL/builtins/lerp-builtin.hlsl | 30 +-
clang/test/CodeGenHLSL/builtins/lerp.hlsl | 204 +-
clang/test/CodeGenHLSL/builtins/log.hlsl | 82 +-
clang/test/CodeGenHLSL/builtins/log2.hlsl | 82 +-
clang/test/CodeGenHLSL/builtins/mad.hlsl | 494 +--
clang/test/CodeGenHLSL/builtins/max.hlsl | 268 +-
clang/test/CodeGenHLSL/builtins/pow.hlsl | 82 +-
.../CodeGenHLSL/builtins/reversebits.hlsl | 160 +-
clang/test/CodeGenHLSL/builtins/sin.hlsl | 82 +-
clang/test/CodeGenHLSL/builtins/trunc.hlsl | 94 +-
.../semantics/DispatchThreadID.hlsl | 50 +-
clang/test/CodeGenHLSL/sret_output.hlsl | 44 +-
.../CodeGenHLSL/this-assignment-overload.hlsl | 110 +-
clang/test/CodeGenHLSL/this-assignment.hlsl | 90 +-
clang/test/CodeGenHLSL/this-reference.hlsl | 68 +-
.../test/CodeGenObjC/exceptions-personality.m | 106 +-
clang/test/Driver/ps4-ps5-relax-relocations.c | 58 +-
clang/test/FixIt/fixit-newline-style.c | 22 +-
.../test/Frontend/rewrite-includes-macros.cpp | 30 +-
.../rewrite-includes-mixed-eol-crlf.c | 16 +-
.../rewrite-includes-mixed-eol-crlf.h | 22 +-
...tem-header-line-directive-ms-lineendings.c | 42 +-
..._source_to_dependency_directives_include.c | 16 +-
..._source_to_dependency_directives_utf8bom.c | 20 +-
clang/test/Options/HV.hlsl | 40 +-
.../enable_16bit_types_validation.hlsl | 50 +-
.../enable_16bit_types_validation_spirv.hlsl | 28 +-
clang/test/Parser/objc-attr.m | 56 +-
clang/test/Preprocessor/macro_vaopt_check.cpp | 152 +-
.../test/Preprocessor/macro_vaopt_expand.cpp | 300 +-
clang/test/Sema/aarch64-sve-vector-log-ops.c | 46 +-
clang/test/Sema/aarch64-sve-vector-trig-ops.c | 36 +-
clang/test/Sema/incorrect_pure.cpp | 28 +-
clang/test/Sema/riscv-rvv-vector-log-ops.c | 50 +-
clang/test/Sema/riscv-rvv-vector-trig-ops.c | 38 +-
...attr-non-x86-no_caller_saved_registers.cpp | 58 +-
.../attr-x86-no_caller_saved_registers.cpp | 66 +-
clang/test/SemaCXX/compound-literal.cpp | 262 +-
.../cxx23-static-callop-lambda-expression.cpp | 66 +-
clang/test/SemaCXX/vla-ext-diag.cpp | 80 +-
clang/test/SemaCXX/warn-redundant-move.cpp | 232 +-
clang/test/SemaCXX/warn-shadow.cpp | 94 +-
.../test/SemaHLSL/BuiltIns/clamp-errors.hlsl | 182 +-
clang/test/SemaHLSL/BuiltIns/dot-errors.hlsl | 238 +-
clang/test/SemaHLSL/BuiltIns/lerp-errors.hlsl | 218 +-
clang/test/SemaHLSL/BuiltIns/mad-errors.hlsl | 172 +-
clang/test/SemaObjCXX/block-cleanup.mm | 32 +-
.../SemaTemplate/default-expr-arguments-3.cpp | 110 +-
clang/tools/clang-format-vs/ClangFormat.sln | 44 +-
.../ClangFormat/ClangFormat.csproj | 522 +--
.../ClangFormat/ClangFormat.vsct | 254 +-
.../ClangFormat/GlobalSuppressions.cs | 22 +-
.../clang-format-vs/ClangFormat/Guids.cs | 24 +-
.../clang-format-vs/ClangFormat/PkgCmdID.cs | 16 +-
.../ClangFormat/Properties/AssemblyInfo.cs | 66 +-
.../ClangFormat/Resources.Designer.cs | 126 +-
.../ClangFormat/Resources.resx | 256 +-
.../ClangFormat/VSPackage.resx | 278 +-
clang/tools/clang-format-vs/README.txt | 102 +-
.../source.extension.vsixmanifest.in | 38 +-
clang/tools/scan-build/bin/scan-build.bat | 2 +-
.../tools/scan-build/libexec/c++-analyzer.bat | 2 +-
.../tools/scan-build/libexec/ccc-analyzer.bat | 2 +-
clang/utils/ClangVisualizers/clang.natvis | 2178 +++++-----
.../TestCases/Posix/strndup_oob_test2.cpp | 42 +-
.../test/Driver/msvc-dependent-lib-flags.f90 | 72 +-
lld/test/COFF/Inputs/combined-resources.rc | 100 +-
.../pdb-type-server-invalid-signature.yaml | 4 +-
lld/test/COFF/pdb_char8_t.ll | 92 +-
lld/test/ELF/dynamic-list-cpp.s | 36 +-
.../ir-interpreter-phi-nodes/Makefile | 8 +-
.../postmortem/minidump/fizzbuzz.syms | 4 +-
.../unwind/zeroth_frame/Makefile | 6 +-
.../unwind/zeroth_frame/TestZerothFrame.py | 178 +-
lldb/test/API/python_api/debugger/Makefile | 6 +-
lldb/test/Shell/BuildScript/modes.test | 70 +-
lldb/test/Shell/BuildScript/script-args.test | 64 +-
.../Shell/BuildScript/toolchain-clang-cl.test | 98 +-
.../Windows/Sigsegv/Inputs/sigsegv.cpp | 80 +-
.../NativePDB/Inputs/inline_sites.s | 1244 +++---
.../Inputs/inline_sites_live.lldbinit | 14 +-
.../Inputs/local-variables-registers.lldbinit | 70 +-
.../NativePDB/Inputs/lookup-by-types.lldbinit | 6 +-
.../subfield_register_simple_type.lldbinit | 4 +-
.../NativePDB/function-types-classes.cpp | 12 +-
.../NativePDB/inline_sites_live.cpp | 68 +-
.../SymbolFile/NativePDB/lookup-by-types.cpp | 92 +-
lldb/unittests/Breakpoint/CMakeLists.txt | 20 +-
llvm/docs/CommandGuide/llvm-pdbutil.rst | 76 +-
llvm/docs/GettingInvolved.rst | 990 ++---
llvm/docs/GettingStartedTutorials.rst | 86 +-
llvm/docs/PDB/CodeViewSymbols.rst | 6 +-
llvm/docs/Reference.rst | 468 +--
llvm/docs/UserGuides.rst | 572 +--
llvm/test/Analysis/MustExecute/const-cond.ll | 94 +-
llvm/test/CodeGen/MIR/X86/dbg-value-list.mir | 128 +-
.../NVPTX/bf16x2-instructions-approx.ll | 84 +-
.../test/CodeGen/NVPTX/bf16x2-instructions.ll | 1064 ++---
llvm/test/CodeGen/NVPTX/zeroext-32bit.ll | 54 +-
.../SPARC/LeonSMACUMACInstructionUT.ll | 40 +-
.../CodeGen/X86/dbg-value-superreg-copy2.mir | 2 +-
.../CodeGen/X86/non-value-mem-operand.mir | 586 +--
.../X86/patchable-prologue-debuginfo.ll | 112 +-
.../CodeGen/X86/post-ra-sched-with-debug.mir | 4 +-
.../X86/windows-seh-EHa-CppCatchDotDotDot.ll | 580 +--
.../CodeGen/X86/windows-seh-EHa-CppDtors01.ll | 510 +--
.../X86/windows-seh-EHa-TryInFinally.ll | 448 +-
.../AArch64/instr-ref-const-physreg.ll | 2 +-
llvm/test/DebugInfo/ARM/instr-ref-tcreturn.ll | 2 +-
.../test/DebugInfo/COFF/AArch64/lit.local.cfg | 4 +-
.../COFF/jump-table-with-indirect-ptr-null.ll | 144 +-
llvm/test/DebugInfo/COFF/jump-table.ll | 524 +--
llvm/test/DebugInfo/COFF/pieces.ll | 2 +-
.../DebugInfo/Generic/debug_value_list.ll | 100 +-
.../MIR/InstrRef/accept-nonlive-reg-phis.mir | 2 +-
.../InstrRef/dbg-phi-subregister-location.mir | 6 +-
.../MIR/InstrRef/dbg-phis-in-ldv.mir | 6 +-
.../MIR/InstrRef/dbg-phis-in-ldv2.mir | 24 +-
.../MIR/InstrRef/dbg-phis-merging-in-ldv.mir | 24 +-
.../MIR/InstrRef/dbg-phis-with-loops.mir | 24 +-
.../InstrRef/follow-spill-of-live-value.mir | 6 +-
.../InstrRef/livedebugvalues_illegal_locs.mir | 48 +-
.../livedebugvalues_instrref_tolocs.mir | 54 +-
.../livedebugvalues_stackslot_subregs.mir | 4 +-
.../livedebugvalues_subreg_substitutions.mir | 48 +-
.../memory-operand-folding-tieddef.mir | 2 +-
.../InstrRef/memory-operand-load-folding.mir | 2 +-
.../MIR/InstrRef/memory-operand-tracking.mir | 28 +-
.../MIR/InstrRef/out-of-scope-blocks.mir | 30 +-
.../MIR/InstrRef/phi-coalesce-subreg.mir | 2 +-
.../MIR/InstrRef/phi-on-stack-coalesced.mir | 4 +-
.../MIR/InstrRef/phi-on-stack-coalesced2.mir | 4 +-
.../MIR/InstrRef/phi-regallocd-to-stack.mir | 4 +-
.../MIR/InstrRef/phi-through-regalloc.mir | 4 +-
.../MIR/InstrRef/spill-slot-limits.mir | 16 +-
.../MIR/InstrRef/substitusions-roundtrip.mir | 4 +-
.../MIR/InstrRef/twoaddr-to-threeaddr-sub.mir | 4 +-
.../InstrRef/win32-chkctk-modifies-esp.mir | 20 +-
.../MIR/InstrRef/x86-drop-compare-inst.mir | 2 +-
.../MIR/X86/dvl-livedebugvalues-clobber.mir | 212 +-
.../MIR/X86/dvl-livedebugvalues-join.mir | 320 +-
.../MIR/X86/dvl-livedebugvalues-movements.mir | 180 +-
.../X86/dvl-livedebugvalues-spillrestore.mir | 154 +-
.../MIR/X86/dvl-livedebugvars-movements.mir | 218 +-
.../MIR/X86/dvl-livedebugvars-stackptr.mir | 226 +-
.../MIR/X86/instr-ref-join-def-vphi.mir | 8 +-
.../PDB/Inputs/longname-truncation.yaml | 52 +-
.../DebugInfo/PDB/Inputs/merge-types-1.yaml | 104 +-
.../DebugInfo/PDB/Inputs/merge-types-2.yaml | 104 +-
.../test/DebugInfo/PDB/Inputs/one-symbol.yaml | 22 +-
.../PDB/pdb-longname-truncation.test | 6 +-
.../test/DebugInfo/PDB/pdbdump-raw-bytes.test | 50 +-
.../DebugInfo/X86/dbg-val-list-dangling.ll | 138 +-
.../DebugInfo/X86/dbg-value-arg-movement.ll | 2 +-
llvm/test/DebugInfo/X86/dbg-value-funcarg.ll | 8 +-
llvm/test/DebugInfo/X86/dbg-value-funcarg2.ll | 4 +-
llvm/test/DebugInfo/X86/dbg-value-funcarg4.ll | 4 +-
.../X86/dbg-value-list-dag-combine.ll | 122 +-
.../DebugInfo/X86/dbg_value_list_clobbers.mir | 168 +-
.../DebugInfo/X86/dbg_value_list_emission.mir | 214 +-
.../DebugInfo/X86/instr-ref-dbg-declare.ll | 2 +-
.../X86/instr-ref-dyn-alloca-win32.ll | 2 +-
.../DebugInfo/X86/instr-ref-ir-reg-read.ll | 2 +-
.../X86/live-debug-values-expr-conflict.ll | 12 +-
llvm/test/DebugInfo/X86/pieces-4.ll | 2 +-
llvm/test/DebugInfo/X86/pr34545.ll | 22 +-
llvm/test/DebugInfo/X86/pr40427.ll | 2 +-
llvm/test/DebugInfo/X86/sdag-combine.ll | 2 +-
.../DebugInfo/X86/sdag-dangling-dbgvalue.ll | 14 +-
.../DebugInfo/X86/sdag-dbgvalue-phi-use-1.ll | 8 +-
.../DebugInfo/X86/sdag-dbgvalue-phi-use-2.ll | 14 +-
.../DebugInfo/X86/sdag-dbgvalue-phi-use-3.ll | 12 +-
.../DebugInfo/X86/sdag-dbgvalue-phi-use-4.ll | 10 +-
.../DebugInfo/X86/sdag-dbgvalue-ssareg.ll | 2 +-
llvm/test/DebugInfo/X86/sdag-ir-salvage.ll | 2 +-
llvm/test/DebugInfo/X86/sdag-salvage-add.ll | 16 +-
.../DebugInfo/X86/sdag-transfer-dbgvalue.ll | 2 +-
llvm/test/DebugInfo/X86/sdagsplit-1.ll | 4 +-
llvm/test/DebugInfo/X86/spill-nospill.ll | 2 +-
llvm/test/DebugInfo/precomp.test | 114 +-
llvm/test/DebugInfo/salvage-nonconst-binop.ll | 90 +-
llvm/test/Demangle/ms-options.test | 86 +-
llvm/test/FileCheck/dos-style-eol.txt | 20 +-
llvm/test/MC/AMDGPU/v_illegal-atomics.s | 12 +-
llvm/test/MC/AsmParser/directive_file-g.s | 48 +-
.../Transforms/InstCombine/debuginfo-sink.ll | 62 +-
.../ConstProp/gep-constanfolding-error.ll | 104 +-
.../InstSimplify/ConstProp/timeout.ll | 140 +-
.../Transforms/LoopStrengthReduce/pr51329.ll | 108 +-
llvm/test/Transforms/PhaseOrdering/pr32544.ll | 2 +-
...f_intrinsics_when_deleting_instructions.ll | 122 +-
.../ThinLTOBitcodeWriter/split-typed-decl.ll | 24 +-
llvm/test/tools/dxil-dis/shuffle.ll | 54 +-
llvm/test/tools/llvm-ar/Inputs/mri-crlf.mri | 8 +-
.../tools/llvm-cvtres/Inputs/languages.rc | 72 +-
.../tools/llvm-cvtres/Inputs/test_resource.rc | 98 +-
.../llvm-dwarfdump/X86/parent_recurse_depth.s | 134 +-
llvm/test/tools/llvm-dwarfdump/X86/quiet.s | 20 +-
.../dynrelocsec-remove-shinfo-reference.test | 60 +-
.../dynrelocsec-remove-shlink-reference.test | 68 +-
.../tools/llvm-objdump/ELF/ARM/literal-arm.s | 132 +-
.../llvm-objdump/ELF/ARM/literal-thumb.s | 48 +-
.../llvm-objdump/ELF/ARM/literal-thumb2.s | 232 +-
.../llvm-objdump/ELF/ARM/literal-vldr-arm.s | 96 +-
.../ELF/ARM/literal-vldr-thumb2.s | 132 +-
.../tools/llvm-objdump/X86/print-imm-hex.s | 58 +-
.../llvm-pdbutil/Inputs/TypeServerTest.cpp | 12 +-
.../complex-padding-graphical.test | 110 +-
.../Inputs/coff-profile.perfscript | 26 +-
.../tools/llvm-rc/Inputs/dialog-with-menu.rc | 32 +-
.../COFF/Inputs/resources/test_resource.rc | 88 +-
.../tools/llvm-symbolizer/Inputs/discrim.inp | 16 +-
.../test/tools/obj2yaml/ELF/relr-section.yaml | 126 +-
llvm/utils/LLVMVisualizers/llvm.natvis | 816 ++--
llvm/utils/emacs/llvm-mir-mode.el | 140 +-
.../lit/tests/Inputs/shtest-shell/diff-in.dos | 6 +-
llvm/utils/release/build_llvm_release.bat | 1024 ++---
.../Conversion/GPUCommon/transfer_write.mlir | 26 +-
mlir/test/Dialect/Shape/arg_with_shape.mlir | 32 +-
.../LLVMIR/Import/metadata-linker-options.ll | 30 +-
mlir/test/mlir-vulkan-runner/addf_if.mlir | 108 +-
openmp/runtime/doc/doxygen/config | 3644 ++++++++---------
pstl/CREDITS.txt | 42 +-
250 files changed, 15595 insertions(+), 15595 deletions(-)
diff --git a/clang-tools-extra/clangd/test/delimited-input-comment-at-the-end.test b/clang-tools-extra/clangd/test/delimited-input-comment-at-the-end.test
index bbbd72f8c59f6f..85a1f2199fadf9 100644
--- a/clang-tools-extra/clangd/test/delimited-input-comment-at-the-end.test
+++ b/clang-tools-extra/clangd/test/delimited-input-comment-at-the-end.test
@@ -1,11 +1,11 @@
-# RUN: clangd -input-style=delimited -sync -input-mirror-file %t < %s
-# RUN: grep '{"jsonrpc":"2.0","id":3,"method":"exit"}' %t
-#
-# RUN: clangd -lit-test -input-mirror-file %t < %s
-# RUN: grep '{"jsonrpc":"2.0","id":3,"method":"exit"}' %t
-#
-{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
----
-{"jsonrpc":"2.0","id":3,"method":"shutdown"}
----
-{"jsonrpc":"2.0","method":"exit"}
+# RUN: clangd -input-style=delimited -sync -input-mirror-file %t < %s
+# RUN: grep '{"jsonrpc":"2.0","id":3,"method":"exit"}' %t
+#
+# RUN: clangd -lit-test -input-mirror-file %t < %s
+# RUN: grep '{"jsonrpc":"2.0","id":3,"method":"exit"}' %t
+#
+{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
+---
+{"jsonrpc":"2.0","id":3,"method":"shutdown"}
+---
+{"jsonrpc":"2.0","method":"exit"}
diff --git a/clang-tools-extra/clangd/test/hover.test b/clang-tools-extra/clangd/test/hover.test
index ec8d0488fa5ed1..dc76ae85fa41dd 100644
--- a/clang-tools-extra/clangd/test/hover.test
+++ b/clang-tools-extra/clangd/test/hover.test
@@ -1,57 +1,57 @@
-# RUN: clangd -lit-test < %s | FileCheck %s
-{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
----
-{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"void foo(); int main() { foo(); }\n"}}}
----
-{"jsonrpc":"2.0","id":1,"method":"textDocument/hover","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":0,"character":27}}}
-# CHECK: "id": 1,
-# CHECK-NEXT: "jsonrpc": "2.0",
-# CHECK-NEXT: "result": {
-# CHECK-NEXT: "contents": {
-# CHECK-NEXT: "kind": "plaintext",
-# CHECK-NEXT: "value": "function foo\n\n→ void\n\nvoid foo()"
-# CHECK-NEXT: },
-# CHECK-NEXT: "range": {
-# CHECK-NEXT: "end": {
-# CHECK-NEXT: "character": 28,
-# CHECK-NEXT: "line": 0
-# CHECK-NEXT: },
-# CHECK-NEXT: "start": {
-# CHECK-NEXT: "character": 25,
-# CHECK-NEXT: "line": 0
-# CHECK-NEXT: }
-# CHECK-NEXT: }
-# CHECK-NEXT: }
-# CHECK-NEXT:}
----
-{"jsonrpc":"2.0","id":1,"method":"textDocument/hover","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":0,"character":10}}}
-# CHECK: "id": 1,
-# CHECK-NEXT: "jsonrpc": "2.0",
-# CHECK-NEXT: "result": null
----
-{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main2.cpp","languageId":"cpp","version":1,"text":"enum foo{}; int main() { foo f; }\n"}}}
----
-{"jsonrpc":"2.0","id":1,"method":"textDocument/hover","params":{"textDocument":{"uri":"test:///main2.cpp"},"position":{"line":0,"character":27}}}
-# CHECK: "id": 1,
-# CHECK-NEXT: "jsonrpc": "2.0",
-# CHECK-NEXT: "result": {
-# CHECK-NEXT: "contents": {
-# CHECK-NEXT: "kind": "plaintext",
-# CHECK-NEXT: "value": "enum foo\n\nenum foo {}"
-# CHECK-NEXT: },
-# CHECK-NEXT: "range": {
-# CHECK-NEXT: "end": {
-# CHECK-NEXT: "character": 28,
-# CHECK-NEXT: "line": 0
-# CHECK-NEXT: },
-# CHECK-NEXT: "start": {
-# CHECK-NEXT: "character": 25,
-# CHECK-NEXT: "line": 0
-# CHECK-NEXT: }
-# CHECK-NEXT: }
-# CHECK-NEXT: }
-# CHECK-NEXT:}
----
-{"jsonrpc":"2.0","id":3,"method":"shutdown"}
----
-{"jsonrpc":"2.0","method":"exit"}
+# RUN: clangd -lit-test < %s | FileCheck %s
+{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
+---
+{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"void foo(); int main() { foo(); }\n"}}}
+---
+{"jsonrpc":"2.0","id":1,"method":"textDocument/hover","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":0,"character":27}}}
+# CHECK: "id": 1,
+# CHECK-NEXT: "jsonrpc": "2.0",
+# CHECK-NEXT: "result": {
+# CHECK-NEXT: "contents": {
+# CHECK-NEXT: "kind": "plaintext",
+# CHECK-NEXT: "value": "function foo\n\n→ void\n\nvoid foo()"
+# CHECK-NEXT: },
+# CHECK-NEXT: "range": {
+# CHECK-NEXT: "end": {
+# CHECK-NEXT: "character": 28,
+# CHECK-NEXT: "line": 0
+# CHECK-NEXT: },
+# CHECK-NEXT: "start": {
+# CHECK-NEXT: "character": 25,
+# CHECK-NEXT: "line": 0
+# CHECK-NEXT: }
+# CHECK-NEXT: }
+# CHECK-NEXT: }
+# CHECK-NEXT:}
+---
+{"jsonrpc":"2.0","id":1,"method":"textDocument/hover","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":0,"character":10}}}
+# CHECK: "id": 1,
+# CHECK-NEXT: "jsonrpc": "2.0",
+# CHECK-NEXT: "result": null
+---
+{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main2.cpp","languageId":"cpp","version":1,"text":"enum foo{}; int main() { foo f; }\n"}}}
+---
+{"jsonrpc":"2.0","id":1,"method":"textDocument/hover","params":{"textDocument":{"uri":"test:///main2.cpp"},"position":{"line":0,"character":27}}}
+# CHECK: "id": 1,
+# CHECK-NEXT: "jsonrpc": "2.0",
+# CHECK-NEXT: "result": {
+# CHECK-NEXT: "contents": {
+# CHECK-NEXT: "kind": "plaintext",
+# CHECK-NEXT: "value": "enum foo\n\nenum foo {}"
+# CHECK-NEXT: },
+# CHECK-NEXT: "range": {
+# CHECK-NEXT: "end": {
+# CHECK-NEXT: "character": 28,
+# CHECK-NEXT: "line": 0
+# CHECK-NEXT: },
+# CHECK-NEXT: "start": {
+# CHECK-NEXT: "character": 25,
+# CHECK-NEXT: "line": 0
+# CHECK-NEXT: }
+# CHECK-NEXT: }
+# CHECK-NEXT: }
+# CHECK-NEXT:}
+---
+{"jsonrpc":"2.0","id":3,"method":"shutdown"}
+---
+{"jsonrpc":"2.0","method":"exit"}
diff --git a/clang-tools-extra/clangd/test/input-mirror.test b/clang-tools-extra/clangd/test/input-mirror.test
index a34a4a08cf60cf..bce3f9923a3b90 100644
--- a/clang-tools-extra/clangd/test/input-mirror.test
+++ b/clang-tools-extra/clangd/test/input-mirror.test
@@ -1,17 +1,17 @@
-# RUN: clangd -pretty -sync -input-mirror-file %t < %s
-# Note that we have to use '-b' as -input-mirror-file does not have a newline at the end of file.
-# RUN: diff -b %t %s
-# It is absolutely vital that this file has CRLF line endings.
-#
-Content-Length: 125
-
-{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
-Content-Length: 172
-
-{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"int main() {\nint a;\na;\n}\n"}}}
-Content-Length: 44
-
-{"jsonrpc":"2.0","id":3,"method":"shutdown"}
-Content-Length: 33
-
-{"jsonrpc":"2.0","method":"exit"}
+# RUN: clangd -pretty -sync -input-mirror-file %t < %s
+# Note that we have to use '-b' as -input-mirror-file does not have a newline at the end of file.
+# RUN: diff -b %t %s
+# It is absolutely vital that this file has CRLF line endings.
+#
+Content-Length: 125
+
+{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
+Content-Length: 172
+
+{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"int main() {\nint a;\na;\n}\n"}}}
+Content-Length: 44
+
+{"jsonrpc":"2.0","id":3,"method":"shutdown"}
+Content-Length: 33
+
+{"jsonrpc":"2.0","method":"exit"}
diff --git a/clang-tools-extra/clangd/test/protocol.test b/clang-tools-extra/clangd/test/protocol.test
index 5e852d1d9deebc..64ccfaef189111 100644
--- a/clang-tools-extra/clangd/test/protocol.test
+++ b/clang-tools-extra/clangd/test/protocol.test
@@ -1,113 +1,113 @@
-# RUN: not clangd -pretty -sync -enable-test-uri-scheme < %s | FileCheck -strict-whitespace %s
-# RUN: not clangd -pretty -sync -enable-test-uri-scheme < %s 2>&1 | FileCheck -check-prefix=STDERR %s
-# vim: fileformat=dos
-# It is absolutely vital that this file has CRLF line endings.
-#
-# Note that we invert the test because we intent to let clangd exit prematurely.
-#
-# Test protocol parsing
-Content-Length: 125
-Content-Type: application/vscode-jsonrpc; charset-utf-8
-
-{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
-# Test message with Content-Type after Content-Length
-#
-# CHECK: "jsonrpc": "2.0",
-# CHECK-NEXT: "result": {
-# CHECK: }
-Content-Length: 246
-
-{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"struct fake { int a, bb, ccc; int f(int i, const float f) const; };\nint main() {\n fake f;\n f.\n}\n"}}}
-
-Content-Length: 104
-
-{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///main.cpp"}}}
-
-Content-Type: application/vscode-jsonrpc; charset-utf-8
-Content-Length: 146
-
-{"jsonrpc":"2.0","id":1,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
-# Test message with Content-Type before Content-Length
-#
-# CHECK: "id": 1,
-# CHECK-NEXT: "jsonrpc": "2.0",
-# CHECK-NEXT: "result": {
-# CHECK-NEXT: "isIncomplete": false,
-# CHECK-NEXT: "items": [
-# CHECK: "filterText": "a",
-# CHECK-NEXT: "insertText": "a",
-# CHECK-NEXT: "insertTextFormat": 1,
-# CHECK-NEXT: "kind": 5,
-# CHECK-NEXT: "label": " a",
-# CHECK-NEXT: "score": {{[0-9]+.[0-9]+}},
-# CHECK-NEXT: "sortText": "{{.*}}"
-# CHECK: ]
-# CHECK-NEXT: }
-
-X-Test: Testing
-Content-Type: application/vscode-jsonrpc; charset-utf-8
-Content-Length: 146
-Content-Type: application/vscode-jsonrpc; charset-utf-8
-X-Testing: Test
-
-{"jsonrpc":"2.0","id":2,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
-
-Content-Type: application/vscode-jsonrpc; charset-utf-8
-Content-Length: 10
-Content-Length: 146
-
-{"jsonrpc":"2.0","id":3,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
-# Test message with duplicate Content-Length headers
-#
-# CHECK: "id": 3,
-# CHECK-NEXT: "jsonrpc": "2.0",
-# CHECK-NEXT: "result": {
-# CHECK-NEXT: "isIncomplete": false,
-# CHECK-NEXT: "items": [
-# CHECK: "filterText": "a",
-# CHECK-NEXT: "insertText": "a",
-# CHECK-NEXT: "insertTextFormat": 1,
-# CHECK-NEXT: "kind": 5,
-# CHECK-NEXT: "label": " a",
-# CHECK-NEXT: "score": {{[0-9]+.[0-9]+}},
-# CHECK-NEXT: "sortText": "{{.*}}"
-# CHECK: ]
-# CHECK-NEXT: }
-# STDERR: Warning: Duplicate Content-Length header received. The previous value for this message (10) was ignored.
-
-Content-Type: application/vscode-jsonrpc; charset-utf-8
-Content-Length: 10
-
-{"jsonrpc":"2.0","id":4,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
-# Test message with malformed Content-Length
-#
-# STDERR: JSON parse error
-# Ensure we recover by sending another (valid) message
-
-Content-Length: 146
-
-{"jsonrpc":"2.0","id":5,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
-# Test message with Content-Type before Content-Length
-#
-# CHECK: "id": 5,
-# CHECK-NEXT: "jsonrpc": "2.0",
-# CHECK-NEXT: "result": {
-# CHECK-NEXT: "isIncomplete": false,
-# CHECK-NEXT: "items": [
-# CHECK: "filterText": "a",
-# CHECK-NEXT: "insertText": "a",
-# CHECK-NEXT: "insertTextFormat": 1,
-# CHECK-NEXT: "kind": 5,
-# CHECK-NEXT: "label": " a",
-# CHECK-NEXT: "score": {{[0-9]+.[0-9]+}},
-# CHECK-NEXT: "sortText": "{{.*}}"
-# CHECK: ]
-# CHECK-NEXT: }
-Content-Length: 1024
-
-{"jsonrpc":"2.0","id":5,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
-# Test message which reads beyond the end of the stream.
-#
-# Ensure this is the last test in the file!
-# STDERR: Input was aborted. Read only {{[0-9]+}} bytes of expected {{[0-9]+}}.
-
+# RUN: not clangd -pretty -sync -enable-test-uri-scheme < %s | FileCheck -strict-whitespace %s
+# RUN: not clangd -pretty -sync -enable-test-uri-scheme < %s 2>&1 | FileCheck -check-prefix=STDERR %s
+# vim: fileformat=dos
+# It is absolutely vital that this file has CRLF line endings.
+#
+# Note that we invert the test because we intent to let clangd exit prematurely.
+#
+# Test protocol parsing
+Content-Length: 125
+Content-Type: application/vscode-jsonrpc; charset-utf-8
+
+{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
+# Test message with Content-Type after Content-Length
+#
+# CHECK: "jsonrpc": "2.0",
+# CHECK-NEXT: "result": {
+# CHECK: }
+Content-Length: 246
+
+{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"struct fake { int a, bb, ccc; int f(int i, const float f) const; };\nint main() {\n fake f;\n f.\n}\n"}}}
+
+Content-Length: 104
+
+{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///main.cpp"}}}
+
+Content-Type: application/vscode-jsonrpc; charset-utf-8
+Content-Length: 146
+
+{"jsonrpc":"2.0","id":1,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
+# Test message with Content-Type before Content-Length
+#
+# CHECK: "id": 1,
+# CHECK-NEXT: "jsonrpc": "2.0",
+# CHECK-NEXT: "result": {
+# CHECK-NEXT: "isIncomplete": false,
+# CHECK-NEXT: "items": [
+# CHECK: "filterText": "a",
+# CHECK-NEXT: "insertText": "a",
+# CHECK-NEXT: "insertTextFormat": 1,
+# CHECK-NEXT: "kind": 5,
+# CHECK-NEXT: "label": " a",
+# CHECK-NEXT: "score": {{[0-9]+.[0-9]+}},
+# CHECK-NEXT: "sortText": "{{.*}}"
+# CHECK: ]
+# CHECK-NEXT: }
+
+X-Test: Testing
+Content-Type: application/vscode-jsonrpc; charset-utf-8
+Content-Length: 146
+Content-Type: application/vscode-jsonrpc; charset-utf-8
+X-Testing: Test
+
+{"jsonrpc":"2.0","id":2,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
+
+Content-Type: application/vscode-jsonrpc; charset-utf-8
+Content-Length: 10
+Content-Length: 146
+
+{"jsonrpc":"2.0","id":3,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
+# Test message with duplicate Content-Length headers
+#
+# CHECK: "id": 3,
+# CHECK-NEXT: "jsonrpc": "2.0",
+# CHECK-NEXT: "result": {
+# CHECK-NEXT: "isIncomplete": false,
+# CHECK-NEXT: "items": [
+# CHECK: "filterText": "a",
+# CHECK-NEXT: "insertText": "a",
+# CHECK-NEXT: "insertTextFormat": 1,
+# CHECK-NEXT: "kind": 5,
+# CHECK-NEXT: "label": " a",
+# CHECK-NEXT: "score": {{[0-9]+.[0-9]+}},
+# CHECK-NEXT: "sortText": "{{.*}}"
+# CHECK: ]
+# CHECK-NEXT: }
+# STDERR: Warning: Duplicate Content-Length header received. The previous value for this message (10) was ignored.
+
+Content-Type: application/vscode-jsonrpc; charset-utf-8
+Content-Length: 10
+
+{"jsonrpc":"2.0","id":4,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
+# Test message with malformed Content-Length
+#
+# STDERR: JSON parse error
+# Ensure we recover by sending another (valid) message
+
+Content-Length: 146
+
+{"jsonrpc":"2.0","id":5,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
+# Test message with Content-Type before Content-Length
+#
+# CHECK: "id": 5,
+# CHECK-NEXT: "jsonrpc": "2.0",
+# CHECK-NEXT: "result": {
+# CHECK-NEXT: "isIncomplete": false,
+# CHECK-NEXT: "items": [
+# CHECK: "filterText": "a",
+# CHECK-NEXT: "insertText": "a",
+# CHECK-NEXT: "insertTextFormat": 1,
+# CHECK-NEXT: "kind": 5,
+# CHECK-NEXT: "label": " a",
+# CHECK-NEXT: "score": {{[0-9]+.[0-9]+}},
+# CHECK-NEXT: "sortText": "{{.*}}"
+# CHECK: ]
+# CHECK-NEXT: }
+Content-Length: 1024
+
+{"jsonrpc":"2.0","id":5,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
+# Test message which reads beyond the end of the stream.
+#
+# Ensure this is the last test in the file!
+# STDERR: Input was aborted. Read only {{[0-9]+}} bytes of expected {{[0-9]+}}.
+
diff --git a/clang-tools-extra/clangd/test/spaces-in-delimited-input.test b/clang-tools-extra/clangd/test/spaces-in-delimited-input.test
index dc2e2f5ea0f64d..aa191b6f2097f9 100644
--- a/clang-tools-extra/clangd/test/spaces-in-delimited-input.test
+++ b/clang-tools-extra/clangd/test/spaces-in-delimited-input.test
@@ -1,13 +1,13 @@
-# RUN: clangd -input-style=delimited -sync < %s 2>&1 | FileCheck %s
-# RUN: clangd -lit-test -sync < %s 2>&1 | FileCheck %s
-#
-{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
-
----
-
-{"jsonrpc":"2.0","id":3,"method":"shutdown"}
-
----
-
-{"jsonrpc":"2.0","method":"exit"}
-# CHECK-NOT: JSON parse error
+# RUN: clangd -input-style=delimited -sync < %s 2>&1 | FileCheck %s
+# RUN: clangd -lit-test -sync < %s 2>&1 | FileCheck %s
+#
+{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
+
+---
+
+{"jsonrpc":"2.0","id":3,"method":"shutdown"}
+
+---
+
+{"jsonrpc":"2.0","method":"exit"}
+# CHECK-NOT: JSON parse error
diff --git a/clang-tools-extra/clangd/test/too_large.test b/clang-tools-extra/clangd/test/too_large.test
index 7df981e7942073..6986bd5e258e87 100644
--- a/clang-tools-extra/clangd/test/too_large.test
+++ b/clang-tools-extra/clangd/test/too_large.test
@@ -1,7 +1,7 @@
-# RUN: not clangd -sync < %s 2>&1 | FileCheck -check-prefix=STDERR %s
-# vim: fileformat=dos
-# It is absolutely vital that this file has CRLF line endings.
-#
-Content-Length: 2147483648
-
-# STDERR: Refusing to read message
+# RUN: not clangd -sync < %s 2>&1 | FileCheck -check-prefix=STDERR %s
+# vim: fileformat=dos
+# It is absolutely vital that this file has CRLF line endings.
+#
+Content-Length: 2147483648
+
+# STDERR: Refusing to read message
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/duplicate-include.h b/clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/duplicate-include.h
index bf288023274b15..22d3a3acbc916e 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/duplicate-include.h
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/duplicate-include.h
@@ -1,15 +1,15 @@
-#ifndef READABILITY_DUPLICATE_INCLUDE_H
-#define READABILITY_DUPLICATE_INCLUDE_H
-
-extern int g;
-#include "duplicate-include2.h"
-extern int h;
-#include "duplicate-include2.h"
-extern int i;
-// CHECK-MESSAGES: :[[@LINE-2]]:1: warning: duplicate include
-// CHECK-FIXES: {{^extern int g;$}}
-// CHECK-FIXES-NEXT: {{^#include "duplicate-include2.h"$}}
-// CHECK-FIXES-NEXT: {{^extern int h;$}}
-// CHECK-FIXES-NEXT: {{^extern int i;$}}
-
-#endif
+#ifndef READABILITY_DUPLICATE_INCLUDE_H
+#define READABILITY_DUPLICATE_INCLUDE_H
+
+extern int g;
+#include "duplicate-include2.h"
+extern int h;
+#include "duplicate-include2.h"
+extern int i;
+// CHECK-MESSAGES: :[[@LINE-2]]:1: warning: duplicate include
+// CHECK-FIXES: {{^extern int g;$}}
+// CHECK-FIXES-NEXT: {{^#include "duplicate-include2.h"$}}
+// CHECK-FIXES-NEXT: {{^extern int h;$}}
+// CHECK-FIXES-NEXT: {{^extern int i;$}}
+
+#endif
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/duplicate-include2.h b/clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/duplicate-include2.h
index 58dfa757ee7aed..fcbabe12fc378a 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/duplicate-include2.h
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/duplicate-include2.h
@@ -1 +1 @@
-// This file is intentionally empty.
+// This file is intentionally empty.
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/system/sys/types.h b/clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/system/sys/types.h
index 58dfa757ee7aed..fcbabe12fc378a 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/system/sys/types.h
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/system/sys/types.h
@@ -1 +1 @@
-// This file is intentionally empty.
+// This file is intentionally empty.
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/else-after-return-if-constexpr.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/else-after-return-if-constexpr.cpp
index 6532940eaf2314..1edb3237eaf4d6 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/else-after-return-if-constexpr.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/else-after-return-if-constexpr.cpp
@@ -1,22 +1,22 @@
-// RUN: %check_clang_tidy %s readability-else-after-return %t -- -- -std=c++17
-
-// Constexpr if is an exception to the rule, we cannot remove the else.
-void f() {
- if (sizeof(int) > 4)
- return;
- else
- return;
- // CHECK-MESSAGES: [[@LINE-2]]:3: warning: do not use 'else' after 'return'
-
- if constexpr (sizeof(int) > 4)
- return;
- else
- return;
-
- if constexpr (sizeof(int) > 4)
- return;
- else if constexpr (sizeof(long) > 4)
- return;
- else
- return;
-}
+// RUN: %check_clang_tidy %s readability-else-after-return %t -- -- -std=c++17
+
+// Constexpr if is an exception to the rule, we cannot remove the else.
+void f() {
+ if (sizeof(int) > 4)
+ return;
+ else
+ return;
+ // CHECK-MESSAGES: [[@LINE-2]]:3: warning: do not use 'else' after 'return'
+
+ if constexpr (sizeof(int) > 4)
+ return;
+ else
+ return;
+
+ if constexpr (sizeof(int) > 4)
+ return;
+ else if constexpr (sizeof(long) > 4)
+ return;
+ else
+ return;
+}
diff --git a/clang-tools-extra/test/modularize/Inputs/CompileError/module.modulemap b/clang-tools-extra/test/modularize/Inputs/CompileError/module.modulemap
index 64180adf5beb35..f71b66f148ed19 100644
--- a/clang-tools-extra/test/modularize/Inputs/CompileError/module.modulemap
+++ b/clang-tools-extra/test/modularize/Inputs/CompileError/module.modulemap
@@ -1,10 +1,10 @@
-// module.modulemap
-
-module Level1A {
- header "Level1A.h"
- export *
-}
-module HasError {
- header "HasError.h"
- export *
-}
+// module.modulemap
+
+module Level1A {
+ header "Level1A.h"
+ export *
+}
+module HasError {
+ header "HasError.h"
+ export *
+}
diff --git a/clang-tools-extra/test/modularize/Inputs/MissingHeader/module.modulemap b/clang-tools-extra/test/modularize/Inputs/MissingHeader/module.modulemap
index 9acb4923f9ac37..330e13f5ee1558 100644
--- a/clang-tools-extra/test/modularize/Inputs/MissingHeader/module.modulemap
+++ b/clang-tools-extra/test/modularize/Inputs/MissingHeader/module.modulemap
@@ -1,10 +1,10 @@
-// module.modulemap
-
-module Level1A {
- header "Level1A.h"
- export *
-}
-module Missing {
- header "Missing.h"
- export *
-}
+// module.modulemap
+
+module Level1A {
+ header "Level1A.h"
+ export *
+}
+module Missing {
+ header "Missing.h"
+ export *
+}
diff --git a/clang-tools-extra/test/pp-trace/Inputs/module.modulemap b/clang-tools-extra/test/pp-trace/Inputs/module.modulemap
index f16bbc6e2e05b4..415c874f09d373 100644
--- a/clang-tools-extra/test/pp-trace/Inputs/module.modulemap
+++ b/clang-tools-extra/test/pp-trace/Inputs/module.modulemap
@@ -1,18 +1,18 @@
-// module.modulemap
-
-module Level1A {
- header "Level1A.h"
- export *
-}
-module Level1B {
- header "Level1B.h"
- export *
- module Level2B {
- header "Level2B.h"
- export *
- }
-}
-module Level2A {
- header "Level2A.h"
- export *
-}
+// module.modulemap
+
+module Level1A {
+ header "Level1A.h"
+ export *
+}
+module Level1B {
+ header "Level1B.h"
+ export *
+ module Level2B {
+ header "Level2B.h"
+ export *
+ }
+}
+module Level2A {
+ header "Level2A.h"
+ export *
+}
diff --git a/clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp b/clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp
index 1529bfa75d6d58..c74f3301f9a6be 100644
--- a/clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp
+++ b/clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp
@@ -1,155 +1,155 @@
-//===- ClangSrcLocDump.cpp ------------------------------------*- C++ -*---===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/Basic/Diagnostic.h"
-#include "clang/Driver/Compilation.h"
-#include "clang/Driver/Driver.h"
-#include "clang/Driver/Job.h"
-#include "clang/Driver/Options.h"
-#include "clang/Driver/Tool.h"
-#include "clang/Frontend/CompilerInstance.h"
-#include "clang/Frontend/TextDiagnosticPrinter.h"
-#include "clang/Lex/PreprocessorOptions.h"
-#include "clang/Tooling/Tooling.h"
-#include "llvm/Option/ArgList.h"
-#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/JSON.h"
-#include "llvm/TargetParser/Host.h"
-
-#include "ASTSrcLocProcessor.h"
-
-using namespace clang::tooling;
-using namespace clang;
-using namespace llvm;
-
-static cl::list<std::string> IncludeDirectories(
- "I", cl::desc("Include directories to use while compiling"),
- cl::value_desc("directory"), cl::Required, cl::OneOrMore, cl::Prefix);
-
-static cl::opt<bool>
- SkipProcessing("skip-processing",
- cl::desc("Avoid processing the AST header file"),
- cl::Required, cl::value_desc("bool"));
-
-static cl::opt<std::string> JsonOutputPath("json-output-path",
- cl::desc("json output path"),
- cl::Required,
- cl::value_desc("path"));
-
-class ASTSrcLocGenerationAction : public clang::ASTFrontendAction {
-public:
- ASTSrcLocGenerationAction() : Processor(JsonOutputPath) {}
-
- void ExecuteAction() override {
- clang::ASTFrontendAction::ExecuteAction();
- if (getCompilerInstance().getDiagnostics().getNumErrors() > 0)
- Processor.generateEmpty();
- else
- Processor.generate();
- }
-
- std::unique_ptr<clang::ASTConsumer>
- CreateASTConsumer(clang::CompilerInstance &Compiler,
- llvm::StringRef File) override {
- return Processor.createASTConsumer(Compiler, File);
- }
-
-private:
- ASTSrcLocProcessor Processor;
-};
-
-static const char Filename[] = "ASTTU.cpp";
-
-int main(int argc, const char **argv) {
-
- cl::ParseCommandLineOptions(argc, argv);
-
- if (SkipProcessing) {
- std::error_code EC;
- llvm::raw_fd_ostream JsonOut(JsonOutputPath, EC, llvm::sys::fs::OF_Text);
- if (EC)
- return 1;
- JsonOut << formatv("{0:2}", llvm::json::Value(llvm::json::Object()));
- return 0;
- }
-
- std::vector<std::string> Args;
- Args.push_back("-cc1");
-
- llvm::transform(IncludeDirectories, std::back_inserter(Args),
- [](const std::string &IncDir) { return "-I" + IncDir; });
-
- Args.push_back("-fsyntax-only");
- Args.push_back(Filename);
-
- std::vector<const char *> Argv(Args.size(), nullptr);
- llvm::transform(Args, Argv.begin(),
- [](const std::string &Arg) { return Arg.c_str(); });
-
- IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts =
- CreateAndPopulateDiagOpts(Argv);
-
- // Don't output diagnostics, because common scenarios such as
- // cross-compiling fail with diagnostics. This is not fatal, but
- // just causes attempts to use the introspection API to return no data.
- TextDiagnosticPrinter DiagnosticPrinter(llvm::nulls(), &*DiagOpts);
- DiagnosticsEngine Diagnostics(
- IntrusiveRefCntPtr<DiagnosticIDs>(new DiagnosticIDs()), &*DiagOpts,
- &DiagnosticPrinter, false);
-
- auto *OFS = new llvm::vfs::OverlayFileSystem(vfs::getRealFileSystem());
-
- auto *MemFS = new llvm::vfs::InMemoryFileSystem();
- OFS->pushOverlay(MemFS);
- MemFS->addFile(Filename, 0,
- MemoryBuffer::getMemBuffer("#include \"clang/AST/AST.h\"\n"));
-
- auto Files = llvm::makeIntrusiveRefCnt<FileManager>(FileSystemOptions(), OFS);
-
- auto Driver = std::make_unique<clang::driver::Driver>(
- "clang", llvm::sys::getDefaultTargetTriple(), Diagnostics,
- "ast-api-dump-tool", OFS);
-
- std::unique_ptr<clang::driver::Compilation> Comp(
- Driver->BuildCompilation(llvm::ArrayRef(Argv)));
- if (!Comp)
- return 1;
-
- const auto &Jobs = Comp->getJobs();
- if (Jobs.size() != 1 || !isa<clang::driver::Command>(*Jobs.begin())) {
- SmallString<256> error_msg;
- llvm::raw_svector_ostream error_stream(error_msg);
- Jobs.Print(error_stream, "; ", true);
- return 1;
- }
-
- const auto &Cmd = cast<clang::driver::Command>(*Jobs.begin());
- const llvm::opt::ArgStringList &CC1Args = Cmd.getArguments();
-
- auto Invocation = std::make_unique<CompilerInvocation>();
- CompilerInvocation::CreateFromArgs(*Invocation, CC1Args, Diagnostics);
-
- CompilerInstance Compiler(std::make_shared<clang::PCHContainerOperations>());
- Compiler.setInvocation(std::move(Invocation));
-
- Compiler.createDiagnostics(&DiagnosticPrinter, false);
- if (!Compiler.hasDiagnostics())
- return 1;
-
- // Suppress "2 errors generated" or similar messages
- Compiler.getDiagnosticOpts().ShowCarets = false;
- Compiler.createSourceManager(*Files);
- Compiler.setFileManager(Files.get());
-
- ASTSrcLocGenerationAction ScopedToolAction;
- Compiler.ExecuteAction(ScopedToolAction);
-
- Files->clearStatCache();
-
- return 0;
-}
+//===- ClangSrcLocDump.cpp ------------------------------------*- C++ -*---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/Basic/Diagnostic.h"
+#include "clang/Driver/Compilation.h"
+#include "clang/Driver/Driver.h"
+#include "clang/Driver/Job.h"
+#include "clang/Driver/Options.h"
+#include "clang/Driver/Tool.h"
+#include "clang/Frontend/CompilerInstance.h"
+#include "clang/Frontend/TextDiagnosticPrinter.h"
+#include "clang/Lex/PreprocessorOptions.h"
+#include "clang/Tooling/Tooling.h"
+#include "llvm/Option/ArgList.h"
+#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/JSON.h"
+#include "llvm/TargetParser/Host.h"
+
+#include "ASTSrcLocProcessor.h"
+
+using namespace clang::tooling;
+using namespace clang;
+using namespace llvm;
+
+static cl::list<std::string> IncludeDirectories(
+ "I", cl::desc("Include directories to use while compiling"),
+ cl::value_desc("directory"), cl::Required, cl::OneOrMore, cl::Prefix);
+
+static cl::opt<bool>
+ SkipProcessing("skip-processing",
+ cl::desc("Avoid processing the AST header file"),
+ cl::Required, cl::value_desc("bool"));
+
+static cl::opt<std::string> JsonOutputPath("json-output-path",
+ cl::desc("json output path"),
+ cl::Required,
+ cl::value_desc("path"));
+
+class ASTSrcLocGenerationAction : public clang::ASTFrontendAction {
+public:
+ ASTSrcLocGenerationAction() : Processor(JsonOutputPath) {}
+
+ void ExecuteAction() override {
+ clang::ASTFrontendAction::ExecuteAction();
+ if (getCompilerInstance().getDiagnostics().getNumErrors() > 0)
+ Processor.generateEmpty();
+ else
+ Processor.generate();
+ }
+
+ std::unique_ptr<clang::ASTConsumer>
+ CreateASTConsumer(clang::CompilerInstance &Compiler,
+ llvm::StringRef File) override {
+ return Processor.createASTConsumer(Compiler, File);
+ }
+
+private:
+ ASTSrcLocProcessor Processor;
+};
+
+static const char Filename[] = "ASTTU.cpp";
+
+int main(int argc, const char **argv) {
+
+ cl::ParseCommandLineOptions(argc, argv);
+
+ if (SkipProcessing) {
+ std::error_code EC;
+ llvm::raw_fd_ostream JsonOut(JsonOutputPath, EC, llvm::sys::fs::OF_Text);
+ if (EC)
+ return 1;
+ JsonOut << formatv("{0:2}", llvm::json::Value(llvm::json::Object()));
+ return 0;
+ }
+
+ std::vector<std::string> Args;
+ Args.push_back("-cc1");
+
+ llvm::transform(IncludeDirectories, std::back_inserter(Args),
+ [](const std::string &IncDir) { return "-I" + IncDir; });
+
+ Args.push_back("-fsyntax-only");
+ Args.push_back(Filename);
+
+ std::vector<const char *> Argv(Args.size(), nullptr);
+ llvm::transform(Args, Argv.begin(),
+ [](const std::string &Arg) { return Arg.c_str(); });
+
+ IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts =
+ CreateAndPopulateDiagOpts(Argv);
+
+ // Don't output diagnostics, because common scenarios such as
+ // cross-compiling fail with diagnostics. This is not fatal, but
+ // just causes attempts to use the introspection API to return no data.
+ TextDiagnosticPrinter DiagnosticPrinter(llvm::nulls(), &*DiagOpts);
+ DiagnosticsEngine Diagnostics(
+ IntrusiveRefCntPtr<DiagnosticIDs>(new DiagnosticIDs()), &*DiagOpts,
+ &DiagnosticPrinter, false);
+
+ auto *OFS = new llvm::vfs::OverlayFileSystem(vfs::getRealFileSystem());
+
+ auto *MemFS = new llvm::vfs::InMemoryFileSystem();
+ OFS->pushOverlay(MemFS);
+ MemFS->addFile(Filename, 0,
+ MemoryBuffer::getMemBuffer("#include \"clang/AST/AST.h\"\n"));
+
+ auto Files = llvm::makeIntrusiveRefCnt<FileManager>(FileSystemOptions(), OFS);
+
+ auto Driver = std::make_unique<clang::driver::Driver>(
+ "clang", llvm::sys::getDefaultTargetTriple(), Diagnostics,
+ "ast-api-dump-tool", OFS);
+
+ std::unique_ptr<clang::driver::Compilation> Comp(
+ Driver->BuildCompilation(llvm::ArrayRef(Argv)));
+ if (!Comp)
+ return 1;
+
+ const auto &Jobs = Comp->getJobs();
+ if (Jobs.size() != 1 || !isa<clang::driver::Command>(*Jobs.begin())) {
+ SmallString<256> error_msg;
+ llvm::raw_svector_ostream error_stream(error_msg);
+ Jobs.Print(error_stream, "; ", true);
+ return 1;
+ }
+
+ const auto &Cmd = cast<clang::driver::Command>(*Jobs.begin());
+ const llvm::opt::ArgStringList &CC1Args = Cmd.getArguments();
+
+ auto Invocation = std::make_unique<CompilerInvocation>();
+ CompilerInvocation::CreateFromArgs(*Invocation, CC1Args, Diagnostics);
+
+ CompilerInstance Compiler(std::make_shared<clang::PCHContainerOperations>());
+ Compiler.setInvocation(std::move(Invocation));
+
+ Compiler.createDiagnostics(&DiagnosticPrinter, false);
+ if (!Compiler.hasDiagnostics())
+ return 1;
+
+ // Suppress "2 errors generated" or similar messages
+ Compiler.getDiagnosticOpts().ShowCarets = false;
+ Compiler.createSourceManager(*Files);
+ Compiler.setFileManager(Files.get());
+
+ ASTSrcLocGenerationAction ScopedToolAction;
+ Compiler.ExecuteAction(ScopedToolAction);
+
+ Files->clearStatCache();
+
+ return 0;
+}
diff --git a/clang/test/AST/HLSL/this-reference-template.hlsl b/clang/test/AST/HLSL/this-reference-template.hlsl
index 60e057986ebf80..9fa26804b308bc 100644
--- a/clang/test/AST/HLSL/this-reference-template.hlsl
+++ b/clang/test/AST/HLSL/this-reference-template.hlsl
@@ -1,46 +1,46 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -disable-llvm-passes -o - -hlsl-entry main %s | FileCheck %s
-
-template<typename K, typename V>
-struct Pair {
- K First;
- V Second;
-
- K getFirst() {
- return this.First;
- }
-
- V getSecond() {
- return Second;
- }
-};
-
-[numthreads(1, 1, 1)]
-void main() {
- Pair<int, float> Vals = {1, 2.0};
- Vals.First = Vals.getFirst();
- Vals.Second = Vals.getSecond();
-}
-
-// CHECK: -CXXMethodDecl 0x{{[0-9A-Fa-f]+}} <line:8:3, line:10:3> line:8:5 getFirst 'K ()' implicit-inline
-// CHECK-NEXT:-CompoundStmt 0x{{[0-9A-Fa-f]+}} <col:16, line:10:3>
-// CHECK-NEXT:-ReturnStmt 0x{{[0-9A-Fa-f]+}} <line:9:4, col:16>
-// CHECK-NEXT:-CXXDependentScopeMemberExpr 0x{{[0-9A-Fa-f]+}} <col:11, col:16> '<dependent type>' lvalue .First
-// CHECK-NEXT:-CXXThisExpr 0x{{[0-9A-Fa-f]+}} <col:11> 'Pair<K, V>' lvalue this
-// CHECK-NEXT:-CXXMethodDecl 0x{{[0-9A-Fa-f]+}} <line:12:3, line:14:3> line:12:5 getSecond 'V ()' implicit-inline
-// CHECK-NEXT:-CompoundStmt 0x{{[0-9A-Fa-f]+}} <col:17, line:14:3>
-// CHECK-NEXT:-ReturnStmt 0x{{[0-9A-Fa-f]+}} <line:13:5, col:12>
-// CHECK-NEXT:-MemberExpr 0x{{[0-9A-Fa-f]+}} <col:12> 'V' lvalue .Second 0x{{[0-9A-Fa-f]+}}
-// CHECK-NEXT:-CXXThisExpr 0x{{[0-9A-Fa-f]+}} <col:12> 'Pair<K, V>' lvalue implicit this
-
-// CHECK: -CXXMethodDecl 0x{{[0-9A-Fa-f]+}} <line:8:3, line:10:3> line:8:5 used getFirst 'int ()' implicit_instantiation implicit-inline
-// CHECK-NEXT:-CompoundStmt 0x{{[0-9A-Fa-f]+}} <col:16, line:10:3>
-// CHECK-NEXT:-ReturnStmt 0x{{[0-9A-Fa-f]+}} <line:9:4, col:16>
-// CHECK-NEXT:-ImplicitCastExpr 0x{{[0-9A-Fa-f]+}} <col:11, col:16> 'int' <LValueToRValue>
-// CHECK-NEXT:-MemberExpr 0x{{[0-9A-Fa-f]+}} <col:11, col:16> 'int' lvalue .First 0x{{[0-9A-Fa-f]+}}
-// CHECK-NEXT:-CXXThisExpr 0x{{[0-9A-Fa-f]+}} <col:11> 'Pair<int, float>' lvalue this
-// CHECK-NEXT:-CXXMethodDecl 0x{{[0-9A-Fa-f]+}} <line:12:3, line:14:3> line:12:5 used getSecond 'float ()' implicit_instantiation implicit-inline
-// CHECK-NEXT:-CompoundStmt 0x{{[0-9A-Fa-f]+}} <col:17, line:14:3>
-// CHECK-NEXT:-ReturnStmt 0x{{[0-9A-Fa-f]+}} <line:13:5, col:12>
-// CHECK-NEXT:-ImplicitCastExpr 0x{{[0-9A-Fa-f]+}} <col:12> 'float' <LValueToRValue>
-// CHECK-NEXT:-MemberExpr 0x{{[0-9A-Fa-f]+}} <col:12> 'float' lvalue .Second 0x{{[0-9A-Fa-f]+}}
-// CHECK-NEXT:-CXXThisExpr 0x{{[0-9A-Fa-f]+}} <col:12> 'Pair<int, float>' lvalue implicit this
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -disable-llvm-passes -o - -hlsl-entry main %s | FileCheck %s
+
+template<typename K, typename V>
+struct Pair {
+ K First;
+ V Second;
+
+ K getFirst() {
+ return this.First;
+ }
+
+ V getSecond() {
+ return Second;
+ }
+};
+
+[numthreads(1, 1, 1)]
+void main() {
+ Pair<int, float> Vals = {1, 2.0};
+ Vals.First = Vals.getFirst();
+ Vals.Second = Vals.getSecond();
+}
+
+// CHECK: -CXXMethodDecl 0x{{[0-9A-Fa-f]+}} <line:8:3, line:10:3> line:8:5 getFirst 'K ()' implicit-inline
+// CHECK-NEXT:-CompoundStmt 0x{{[0-9A-Fa-f]+}} <col:16, line:10:3>
+// CHECK-NEXT:-ReturnStmt 0x{{[0-9A-Fa-f]+}} <line:9:4, col:16>
+// CHECK-NEXT:-CXXDependentScopeMemberExpr 0x{{[0-9A-Fa-f]+}} <col:11, col:16> '<dependent type>' lvalue .First
+// CHECK-NEXT:-CXXThisExpr 0x{{[0-9A-Fa-f]+}} <col:11> 'Pair<K, V>' lvalue this
+// CHECK-NEXT:-CXXMethodDecl 0x{{[0-9A-Fa-f]+}} <line:12:3, line:14:3> line:12:5 getSecond 'V ()' implicit-inline
+// CHECK-NEXT:-CompoundStmt 0x{{[0-9A-Fa-f]+}} <col:17, line:14:3>
+// CHECK-NEXT:-ReturnStmt 0x{{[0-9A-Fa-f]+}} <line:13:5, col:12>
+// CHECK-NEXT:-MemberExpr 0x{{[0-9A-Fa-f]+}} <col:12> 'V' lvalue .Second 0x{{[0-9A-Fa-f]+}}
+// CHECK-NEXT:-CXXThisExpr 0x{{[0-9A-Fa-f]+}} <col:12> 'Pair<K, V>' lvalue implicit this
+
+// CHECK: -CXXMethodDecl 0x{{[0-9A-Fa-f]+}} <line:8:3, line:10:3> line:8:5 used getFirst 'int ()' implicit_instantiation implicit-inline
+// CHECK-NEXT:-CompoundStmt 0x{{[0-9A-Fa-f]+}} <col:16, line:10:3>
+// CHECK-NEXT:-ReturnStmt 0x{{[0-9A-Fa-f]+}} <line:9:4, col:16>
+// CHECK-NEXT:-ImplicitCastExpr 0x{{[0-9A-Fa-f]+}} <col:11, col:16> 'int' <LValueToRValue>
+// CHECK-NEXT:-MemberExpr 0x{{[0-9A-Fa-f]+}} <col:11, col:16> 'int' lvalue .First 0x{{[0-9A-Fa-f]+}}
+// CHECK-NEXT:-CXXThisExpr 0x{{[0-9A-Fa-f]+}} <col:11> 'Pair<int, float>' lvalue this
+// CHECK-NEXT:-CXXMethodDecl 0x{{[0-9A-Fa-f]+}} <line:12:3, line:14:3> line:12:5 used getSecond 'float ()' implicit_instantiation implicit-inline
+// CHECK-NEXT:-CompoundStmt 0x{{[0-9A-Fa-f]+}} <col:17, line:14:3>
+// CHECK-NEXT:-ReturnStmt 0x{{[0-9A-Fa-f]+}} <line:13:5, col:12>
+// CHECK-NEXT:-ImplicitCastExpr 0x{{[0-9A-Fa-f]+}} <col:12> 'float' <LValueToRValue>
+// CHECK-NEXT:-MemberExpr 0x{{[0-9A-Fa-f]+}} <col:12> 'float' lvalue .Second 0x{{[0-9A-Fa-f]+}}
+// CHECK-NEXT:-CXXThisExpr 0x{{[0-9A-Fa-f]+}} <col:12> 'Pair<int, float>' lvalue implicit this
diff --git a/clang/test/AST/HLSL/this-reference.hlsl b/clang/test/AST/HLSL/this-reference.hlsl
index 67d8e7b7b9119a..b54f8c92d7e382 100644
--- a/clang/test/AST/HLSL/this-reference.hlsl
+++ b/clang/test/AST/HLSL/this-reference.hlsl
@@ -1,62 +1,62 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -disable-llvm-passes -o - -hlsl-entry main %s | FileCheck %s
-
-class Pair {
- int First;
- int Second;
-
- int getFirst() {
- return this.First;
- }
-
- int getSecond() {
- return Second;
- }
-};
-
-class PairInfo : Pair {
- int Sum;
-
- int getSum() {
- return this.First + Second;
- }
-};
-
-[numthreads(1, 1, 1)]
-void main() {
- Pair Vals = {1, 2};
- Vals.First = Vals.getFirst();
- Vals.Second = Vals.getSecond();
-
- PairInfo ValsInfo;
- ValsInfo.First = Vals.First;
- ValsInfo.Second = Vals.Second;
- ValsInfo.Sum = ValsInfo.getSum();
-
-}
-
-// CHECK: -CXXMethodDecl 0x{{[0-9A-Fa-f]+}} <line:7:3, line:9:3> line:7:7 used getFirst 'int ()' implicit-inline
-// CHECK-NEXT:`-CompoundStmt 0x{{[0-9A-Fa-f]+}} <col:18, line:9:3>
-// CHECK-NEXT:`-ReturnStmt 0x{{[0-9A-Fa-f]+}} <line:8:4, col:16>
-// CHECK-NEXT:`-ImplicitCastExpr 0x{{[0-9A-Fa-f]+}} <col:11, col:16> 'int' <LValueToRValue>
-// CHECK-NEXT:`-MemberExpr 0x{{[0-9A-Fa-f]+}} <col:11, col:16> 'int' lvalue .First 0x{{[0-9A-Fa-f]+}}
-// CHECK-NEXT:`-CXXThisExpr 0x{{[0-9A-Fa-f]+}} <col:11> 'Pair' lvalue this
-// CHECK-NEXT:-CXXMethodDecl 0x{{[0-9A-Fa-f]+}} <line:11:3, line:13:3> line:11:7 used getSecond 'int ()' implicit-inline
-// CHECK-NEXT:`-CompoundStmt 0x{{[0-9A-Fa-f]+}} <col:19, line:13:3>
-// CHECK-NEXT:`-ReturnStmt 0x{{[0-9A-Fa-f]+}} <line:12:5, col:12>
-// CHECK-NEXT:`-ImplicitCastExpr 0x{{[0-9A-Fa-f]+}} <col:12> 'int' <LValueToRValue>
-// CHECK-NEXT:`-MemberExpr 0x{{[0-9A-Fa-f]+}} <col:12> 'int' lvalue .Second 0x{{[0-9A-Fa-f]+}}
-// CHECK-NEXT:`-CXXThisExpr 0x{{[0-9A-Fa-f]+}} <col:12> 'Pair' lvalue implicit this
-
-
-// CHECK: CXXMethodDecl 0x{{[0-9A-Fa-f]+}} <line:19:3, line:21:3> line:19:7 used getSum 'int ()' implicit-inline
-// CHECK-NEXT:`-CompoundStmt 0x{{[0-9A-Fa-f]+}} <col:16, line:21:3>
-// CHECK-NEXT:`-ReturnStmt 0x{{[0-9A-Fa-f]+}} <line:20:5, col:25>
-// CHECK-NEXT:`-BinaryOperator 0x{{[0-9A-Fa-f]+}} <col:12, col:25> 'int' '+'
-// CHECK-NEXT:-ImplicitCastExpr 0x{{[0-9A-Fa-f]+}} <col:12, col:17> 'int' <LValueToRValue>
-// CHECK-NEXT:`-MemberExpr 0x{{[0-9A-Fa-f]+}} <col:12, col:17> 'int' lvalue .First 0x{{[0-9A-Fa-f]+}}
-// CHECK-NEXT:`-ImplicitCastExpr 0x{{[0-9A-Fa-f]+}} <col:12> 'Pair' lvalue <UncheckedDerivedToBase (Pair)>
-// CHECK-NEXT:`-CXXThisExpr 0x{{[0-9A-Fa-f]+}} <col:12> 'PairInfo' lvalue this
-// CHECK-NEXT:`-ImplicitCastExpr 0x{{[0-9A-Fa-f]+}} <col:25> 'int' <LValueToRValue>
-// CHECK-NEXT:`-MemberExpr 0x{{[0-9A-Fa-f]+}} <col:25> 'int' lvalue .Second 0x{{[0-9A-Fa-f]+}}
-// CHECK-NEXT:`-ImplicitCastExpr 0x{{[0-9A-Fa-f]+}} <col:25> 'Pair' lvalue <UncheckedDerivedToBase (Pair)>
-// CHECK-NEXT:`-CXXThisExpr 0x{{[0-9A-Fa-f]+}} <col:25> 'PairInfo' lvalue implicit this
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -disable-llvm-passes -o - -hlsl-entry main %s | FileCheck %s
+
+class Pair {
+ int First;
+ int Second;
+
+ int getFirst() {
+ return this.First;
+ }
+
+ int getSecond() {
+ return Second;
+ }
+};
+
+class PairInfo : Pair {
+ int Sum;
+
+ int getSum() {
+ return this.First + Second;
+ }
+};
+
+[numthreads(1, 1, 1)]
+void main() {
+ Pair Vals = {1, 2};
+ Vals.First = Vals.getFirst();
+ Vals.Second = Vals.getSecond();
+
+ PairInfo ValsInfo;
+ ValsInfo.First = Vals.First;
+ ValsInfo.Second = Vals.Second;
+ ValsInfo.Sum = ValsInfo.getSum();
+
+}
+
+// CHECK: -CXXMethodDecl 0x{{[0-9A-Fa-f]+}} <line:7:3, line:9:3> line:7:7 used getFirst 'int ()' implicit-inline
+// CHECK-NEXT:`-CompoundStmt 0x{{[0-9A-Fa-f]+}} <col:18, line:9:3>
+// CHECK-NEXT:`-ReturnStmt 0x{{[0-9A-Fa-f]+}} <line:8:4, col:16>
+// CHECK-NEXT:`-ImplicitCastExpr 0x{{[0-9A-Fa-f]+}} <col:11, col:16> 'int' <LValueToRValue>
+// CHECK-NEXT:`-MemberExpr 0x{{[0-9A-Fa-f]+}} <col:11, col:16> 'int' lvalue .First 0x{{[0-9A-Fa-f]+}}
+// CHECK-NEXT:`-CXXThisExpr 0x{{[0-9A-Fa-f]+}} <col:11> 'Pair' lvalue this
+// CHECK-NEXT:-CXXMethodDecl 0x{{[0-9A-Fa-f]+}} <line:11:3, line:13:3> line:11:7 used getSecond 'int ()' implicit-inline
+// CHECK-NEXT:`-CompoundStmt 0x{{[0-9A-Fa-f]+}} <col:19, line:13:3>
+// CHECK-NEXT:`-ReturnStmt 0x{{[0-9A-Fa-f]+}} <line:12:5, col:12>
+// CHECK-NEXT:`-ImplicitCastExpr 0x{{[0-9A-Fa-f]+}} <col:12> 'int' <LValueToRValue>
+// CHECK-NEXT:`-MemberExpr 0x{{[0-9A-Fa-f]+}} <col:12> 'int' lvalue .Second 0x{{[0-9A-Fa-f]+}}
+// CHECK-NEXT:`-CXXThisExpr 0x{{[0-9A-Fa-f]+}} <col:12> 'Pair' lvalue implicit this
+
+
+// CHECK: CXXMethodDecl 0x{{[0-9A-Fa-f]+}} <line:19:3, line:21:3> line:19:7 used getSum 'int ()' implicit-inline
+// CHECK-NEXT:`-CompoundStmt 0x{{[0-9A-Fa-f]+}} <col:16, line:21:3>
+// CHECK-NEXT:`-ReturnStmt 0x{{[0-9A-Fa-f]+}} <line:20:5, col:25>
+// CHECK-NEXT:`-BinaryOperator 0x{{[0-9A-Fa-f]+}} <col:12, col:25> 'int' '+'
+// CHECK-NEXT:-ImplicitCastExpr 0x{{[0-9A-Fa-f]+}} <col:12, col:17> 'int' <LValueToRValue>
+// CHECK-NEXT:`-MemberExpr 0x{{[0-9A-Fa-f]+}} <col:12, col:17> 'int' lvalue .First 0x{{[0-9A-Fa-f]+}}
+// CHECK-NEXT:`-ImplicitCastExpr 0x{{[0-9A-Fa-f]+}} <col:12> 'Pair' lvalue <UncheckedDerivedToBase (Pair)>
+// CHECK-NEXT:`-CXXThisExpr 0x{{[0-9A-Fa-f]+}} <col:12> 'PairInfo' lvalue this
+// CHECK-NEXT:`-ImplicitCastExpr 0x{{[0-9A-Fa-f]+}} <col:25> 'int' <LValueToRValue>
+// CHECK-NEXT:`-MemberExpr 0x{{[0-9A-Fa-f]+}} <col:25> 'int' lvalue .Second 0x{{[0-9A-Fa-f]+}}
+// CHECK-NEXT:`-ImplicitCastExpr 0x{{[0-9A-Fa-f]+}} <col:25> 'Pair' lvalue <UncheckedDerivedToBase (Pair)>
+// CHECK-NEXT:`-CXXThisExpr 0x{{[0-9A-Fa-f]+}} <col:25> 'PairInfo' lvalue implicit this
diff --git a/clang/test/AST/objc-default-ctor-init.mm b/clang/test/AST/objc-default-ctor-init.mm
index a14a243a31cca8..a01dcd790b9a7f 100644
--- a/clang/test/AST/objc-default-ctor-init.mm
+++ b/clang/test/AST/objc-default-ctor-init.mm
@@ -1,21 +1,21 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macosx10.10 -std=c++11 -ast-dump %s | FileCheck %s
-// CHECK: CXXCtorInitializer Field {{.*}} 'ptr' 'void *'
-// CHECK: CXXCtorInitializer Field {{.*}} 'q' 'Q'
-
- at interface NSObject
- at end
-
- at interface I : NSObject
- at end
-
-struct Q { Q(); };
-
-struct S {
- S();
- void *ptr = nullptr;
- Q q;
-};
-
- at implementation I
-S::S() {}
- at end
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.10 -std=c++11 -ast-dump %s | FileCheck %s
+// CHECK: CXXCtorInitializer Field {{.*}} 'ptr' 'void *'
+// CHECK: CXXCtorInitializer Field {{.*}} 'q' 'Q'
+
+ at interface NSObject
+ at end
+
+ at interface I : NSObject
+ at end
+
+struct Q { Q(); };
+
+struct S {
+ S();
+ void *ptr = nullptr;
+ Q q;
+};
+
+ at implementation I
+S::S() {}
+ at end
diff --git a/clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp b/clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp
index 46593b7e2adb9c..77aef99eaa7c80 100644
--- a/clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp
+++ b/clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp
@@ -1,56 +1,56 @@
-// RUN: %clang_cc1 -ast-dump %s 2>&1 | FileCheck %s
-
-// CHECK-LABEL: example0
-void example0() {
- double d = 2.0;
- // CHECK: VarDecl{{.*}}rd 'double &'
- // CHECK-NEXT: DeclRefExpr
- double &rd = d;
- // CHECK: VarDecl{{.*}}rcd 'const double &'
- // CHECK-NEXT: ImplicitCastExpr{{.*}}'const double' lvalue <NoOp>
- const double &rcd = d;
-}
-
-struct A { };
-struct B : A { } b;
-
-// CHECK-LABEL: example1
-void example1() {
- // CHECK: VarDecl{{.*}}ra 'A &'
- // CHECK: ImplicitCastExpr{{.*}}'A' lvalue <DerivedToBase (A)>
- A &ra = b;
- // CHECK: VarDecl{{.*}}rca 'const A &'
- // CHECK: ImplicitCastExpr{{.*}}'const A' lvalue <DerivedToBase (A)>
- // CHECK-NOT: MaterializeTemporaryExpr
- // CHECK: ImplicitCastExpr{{.*}}'const B' lvalue <NoOp>
- const A& rca = b;
-}
-
-extern B f();
-
-struct X {
- operator B();
-} x;
-
-// CHECK-LABEL: example2
-void example2() {
- // CHECK: VarDecl{{.*}}rca 'const A &'
- // CHECK: ImplicitCastExpr{{.*}}'const A' lvalue <DerivedToBase (A)>
- // CHECK: MaterializeTemporaryExpr{{.*}}'const B'
- // CHECK: ImplicitCastExpr{{.*}}'const B' <NoOp>
- // CHECK: CallExpr{{.*}}B
- const A &rca = f();
- // CHECK: VarDecl{{.*}}r 'const A &'
- // CHECK: ImplicitCastExpr{{.*}}'const A' lvalue <DerivedToBase (A)>
- // CHECK: MaterializeTemporaryExpr{{.*}}'const B'
- // CHECK: ImplicitCastExpr{{.*}}'const B' <NoOp>
- // CHECK: CXXMemberCallExpr{{.*}}'B'
- const A& r = x;
-}
-
-// CHECK-LABEL: example3
-void example3() {
- // CHECK: VarDecl{{.*}}rcd2 'const double &'
- // CHECK: ImplicitCastExpr{{.*}} <IntegralToFloating>
- const double& rcd2 = 2;
-}
+// RUN: %clang_cc1 -ast-dump %s 2>&1 | FileCheck %s
+
+// CHECK-LABEL: example0
+void example0() {
+ double d = 2.0;
+ // CHECK: VarDecl{{.*}}rd 'double &'
+ // CHECK-NEXT: DeclRefExpr
+ double &rd = d;
+ // CHECK: VarDecl{{.*}}rcd 'const double &'
+ // CHECK-NEXT: ImplicitCastExpr{{.*}}'const double' lvalue <NoOp>
+ const double &rcd = d;
+}
+
+struct A { };
+struct B : A { } b;
+
+// CHECK-LABEL: example1
+void example1() {
+ // CHECK: VarDecl{{.*}}ra 'A &'
+ // CHECK: ImplicitCastExpr{{.*}}'A' lvalue <DerivedToBase (A)>
+ A &ra = b;
+ // CHECK: VarDecl{{.*}}rca 'const A &'
+ // CHECK: ImplicitCastExpr{{.*}}'const A' lvalue <DerivedToBase (A)>
+ // CHECK-NOT: MaterializeTemporaryExpr
+ // CHECK: ImplicitCastExpr{{.*}}'const B' lvalue <NoOp>
+ const A& rca = b;
+}
+
+extern B f();
+
+struct X {
+ operator B();
+} x;
+
+// CHECK-LABEL: example2
+void example2() {
+ // CHECK: VarDecl{{.*}}rca 'const A &'
+ // CHECK: ImplicitCastExpr{{.*}}'const A' lvalue <DerivedToBase (A)>
+ // CHECK: MaterializeTemporaryExpr{{.*}}'const B'
+ // CHECK: ImplicitCastExpr{{.*}}'const B' <NoOp>
+ // CHECK: CallExpr{{.*}}B
+ const A &rca = f();
+ // CHECK: VarDecl{{.*}}r 'const A &'
+ // CHECK: ImplicitCastExpr{{.*}}'const A' lvalue <DerivedToBase (A)>
+ // CHECK: MaterializeTemporaryExpr{{.*}}'const B'
+ // CHECK: ImplicitCastExpr{{.*}}'const B' <NoOp>
+ // CHECK: CXXMemberCallExpr{{.*}}'B'
+ const A& r = x;
+}
+
+// CHECK-LABEL: example3
+void example3() {
+ // CHECK: VarDecl{{.*}}rcd2 'const double &'
+ // CHECK: ImplicitCastExpr{{.*}} <IntegralToFloating>
+ const double& rcd2 = 2;
+}
diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p15-star-this-capture.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p15-star-this-capture.cpp
index bae1e25add352f..eac6c40c6085e7 100644
--- a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p15-star-this-capture.cpp
+++ b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p15-star-this-capture.cpp
@@ -1,22 +1,22 @@
-// RUN: %clang_cc1 -fsyntax-only -std=c++1z %s -verify
-
-class NonCopyable {
- NonCopyable(const NonCopyable&) = delete; //expected-note3{{explicitly marked deleted here}}
- int x = 10;
- void foo() {
- auto L = [this] { return x; };
- const auto &M = [*this] { return x; };//expected-error{{call to deleted}}
- const auto &M2 = [this] () -> auto&& {
- ++x;
- return [*this] { //expected-error{{call to deleted}} expected-warning{{reference to local}}
- return ++x; //expected-error{{read-only}}
- };
- };
- const auto &M3 = [*this] () mutable -> auto&& { //expected-error{{call to deleted}}
- ++x;
- return [this] { // expected-warning{{reference to local}}
- return x;
- };
- };
- }
-};
+// RUN: %clang_cc1 -fsyntax-only -std=c++1z %s -verify
+
+class NonCopyable {
+ NonCopyable(const NonCopyable&) = delete; //expected-note3{{explicitly marked deleted here}}
+ int x = 10;
+ void foo() {
+ auto L = [this] { return x; };
+ const auto &M = [*this] { return x; };//expected-error{{call to deleted}}
+ const auto &M2 = [this] () -> auto&& {
+ ++x;
+ return [*this] { //expected-error{{call to deleted}} expected-warning{{reference to local}}
+ return ++x; //expected-error{{read-only}}
+ };
+ };
+ const auto &M3 = [*this] () mutable -> auto&& { //expected-error{{call to deleted}}
+ ++x;
+ return [this] { // expected-warning{{reference to local}}
+ return x;
+ };
+ };
+ }
+};
diff --git a/clang/test/CXX/lex/lex.literal/lex.string/p4.cpp b/clang/test/CXX/lex/lex.literal/lex.string/p4.cpp
index f8561ba17bcfd2..b73c8ed711a9fd 100644
--- a/clang/test/CXX/lex/lex.literal/lex.string/p4.cpp
+++ b/clang/test/CXX/lex/lex.literal/lex.string/p4.cpp
@@ -1,17 +1,17 @@
-// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
-// expected-no-diagnostics
-
-// NOTE: This file intentionally uses DOS-style line endings to test
-// that we don't propagate them into string literals as per [lex.string]p4.
-
-constexpr const char* p = R"(a\
-b
-c)";
-
-static_assert(p[0] == 'a', "");
-static_assert(p[1] == '\\', "");
-static_assert(p[2] == '\n', "");
-static_assert(p[3] == 'b', "");
-static_assert(p[4] == '\n', "");
-static_assert(p[5] == 'c', "");
-static_assert(p[6] == '\0', "");
+// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
+// expected-no-diagnostics
+
+// NOTE: This file intentionally uses DOS-style line endings to test
+// that we don't propagate them into string literals as per [lex.string]p4.
+
+constexpr const char* p = R"(a\
+b
+c)";
+
+static_assert(p[0] == 'a', "");
+static_assert(p[1] == '\\', "");
+static_assert(p[2] == '\n', "");
+static_assert(p[3] == 'b', "");
+static_assert(p[4] == '\n', "");
+static_assert(p[5] == 'c', "");
+static_assert(p[6] == '\0', "");
diff --git a/clang/test/CodeGen/fpconstrained.c b/clang/test/CodeGen/fpconstrained.c
index dd853527c2155d..97a5d23449a154 100644
--- a/clang/test/CodeGen/fpconstrained.c
+++ b/clang/test/CodeGen/fpconstrained.c
@@ -1,25 +1,25 @@
-// RUN: %clang_cc1 -frounding-math -ffp-exception-behavior=strict -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=FPMODELSTRICT
-// RUN: %clang_cc1 -ffp-contract=fast -emit-llvm -o - %s | FileCheck %s -check-prefix=PRECISE
-// RUN: %clang_cc1 -ffast-math -ffp-contract=fast -emit-llvm -o - %s | FileCheck %s -check-prefix=FAST
-// RUN: %clang_cc1 -ffast-math -emit-llvm -o - %s | FileCheck %s -check-prefix=FASTNOCONTRACT
-// RUN: %clang_cc1 -ffast-math -ffp-contract=fast -ffp-exception-behavior=ignore -emit-llvm -o - %s | FileCheck %s -check-prefix=FAST
-// RUN: %clang_cc1 -ffast-math -ffp-contract=fast -ffp-exception-behavior=strict -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=EXCEPT
-// RUN: %clang_cc1 -ffast-math -ffp-contract=fast -ffp-exception-behavior=maytrap -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=MAYTRAP
-
-float f0, f1, f2;
-
-void foo(void) {
- // CHECK-LABEL: define {{.*}}void @foo()
-
- // MAYTRAP: llvm.experimental.constrained.fadd.f32(float %{{.*}}, float %{{.*}}, metadata !"round.tonearest", metadata !"fpexcept.maytrap")
- // EXCEPT: llvm.experimental.constrained.fadd.f32(float %{{.*}}, float %{{.*}}, metadata !"round.tonearest", metadata !"fpexcept.strict")
- // FPMODELSTRICT: llvm.experimental.constrained.fadd.f32(float %{{.*}}, float %{{.*}}, metadata !"round.dynamic", metadata !"fpexcept.strict")
- // STRICTEXCEPT: llvm.experimental.constrained.fadd.f32(float %{{.*}}, float %{{.*}}, metadata !"round.dynamic", metadata !"fpexcept.strict")
- // STRICTNOEXCEPT: llvm.experimental.constrained.fadd.f32(float %{{.*}}, float %{{.*}}, metadata !"round.dynamic", metadata !"fpexcept.ignore")
- // PRECISE: fadd contract float %{{.*}}, %{{.*}}
- // FAST: fadd fast
- // FASTNOCONTRACT: fadd reassoc nnan ninf nsz arcp afn float
- f0 = f1 + f2;
-
- // CHECK: ret
-}
+// RUN: %clang_cc1 -frounding-math -ffp-exception-behavior=strict -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=FPMODELSTRICT
+// RUN: %clang_cc1 -ffp-contract=fast -emit-llvm -o - %s | FileCheck %s -check-prefix=PRECISE
+// RUN: %clang_cc1 -ffast-math -ffp-contract=fast -emit-llvm -o - %s | FileCheck %s -check-prefix=FAST
+// RUN: %clang_cc1 -ffast-math -emit-llvm -o - %s | FileCheck %s -check-prefix=FASTNOCONTRACT
+// RUN: %clang_cc1 -ffast-math -ffp-contract=fast -ffp-exception-behavior=ignore -emit-llvm -o - %s | FileCheck %s -check-prefix=FAST
+// RUN: %clang_cc1 -ffast-math -ffp-contract=fast -ffp-exception-behavior=strict -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=EXCEPT
+// RUN: %clang_cc1 -ffast-math -ffp-contract=fast -ffp-exception-behavior=maytrap -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=MAYTRAP
+
+float f0, f1, f2;
+
+void foo(void) {
+ // CHECK-LABEL: define {{.*}}void @foo()
+
+ // MAYTRAP: llvm.experimental.constrained.fadd.f32(float %{{.*}}, float %{{.*}}, metadata !"round.tonearest", metadata !"fpexcept.maytrap")
+ // EXCEPT: llvm.experimental.constrained.fadd.f32(float %{{.*}}, float %{{.*}}, metadata !"round.tonearest", metadata !"fpexcept.strict")
+ // FPMODELSTRICT: llvm.experimental.constrained.fadd.f32(float %{{.*}}, float %{{.*}}, metadata !"round.dynamic", metadata !"fpexcept.strict")
+ // STRICTEXCEPT: llvm.experimental.constrained.fadd.f32(float %{{.*}}, float %{{.*}}, metadata !"round.dynamic", metadata !"fpexcept.strict")
+ // STRICTNOEXCEPT: llvm.experimental.constrained.fadd.f32(float %{{.*}}, float %{{.*}}, metadata !"round.dynamic", metadata !"fpexcept.ignore")
+ // PRECISE: fadd contract float %{{.*}}, %{{.*}}
+ // FAST: fadd fast
+ // FASTNOCONTRACT: fadd reassoc nnan ninf nsz arcp afn float
+ f0 = f1 + f2;
+
+ // CHECK: ret
+}
diff --git a/clang/test/CodeGen/fpconstrained.cpp b/clang/test/CodeGen/fpconstrained.cpp
index 884c359acab345..6fd39bd16eed2e 100644
--- a/clang/test/CodeGen/fpconstrained.cpp
+++ b/clang/test/CodeGen/fpconstrained.cpp
@@ -1,49 +1,49 @@
-// RUN: %clang_cc1 -x c++ -fexceptions -fcxx-exceptions -frounding-math -ffp-exception-behavior=strict -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=FPMODELSTRICT
-// RUN: %clang_cc1 -x c++ -ffp-contract=fast -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s -check-prefix=PRECISE
-// RUN: %clang_cc1 -x c++ -ffast-math -fexceptions -fcxx-exceptions -ffp-contract=fast -emit-llvm -o - %s | FileCheck %s -check-prefix=FAST
-// RUN: %clang_cc1 -x c++ -ffast-math -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s -check-prefix=FASTNOCONTRACT
-// RUN: %clang_cc1 -x c++ -ffast-math -fexceptions -fcxx-exceptions -ffp-contract=fast -ffp-exception-behavior=ignore -emit-llvm -o - %s | FileCheck %s -check-prefix=FAST
-// RUN: %clang_cc1 -x c++ -ffast-math -fexceptions -fcxx-exceptions -ffp-contract=fast -ffp-exception-behavior=strict -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=EXCEPT
-// RUN: %clang_cc1 -x c++ -ffast-math -fexceptions -fcxx-exceptions -ffp-contract=fast -ffp-exception-behavior=maytrap -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=MAYTRAP
-
-float f0, f1, f2;
-
- template <class>
- class aaaa {
- public:
- ~aaaa();
- void b();
- };
-
- template <class c>
- aaaa<c>::~aaaa() { try {
- b();
- // CHECK-LABEL: define {{.*}}void @_ZN4aaaaIiED2Ev{{.*}}
-
- } catch (...) {
- // MAYTRAP: llvm.experimental.constrained.fadd.f32(float %{{.*}}, float %{{.*}}, metadata !"round.tonearest", metadata !"fpexcept.maytrap")
- // EXCEPT: llvm.experimental.constrained.fadd.f32(float %{{.*}}, float %{{.*}}, metadata !"round.tonearest", metadata !"fpexcept.strict")
- // FPMODELSTRICT: llvm.experimental.constrained.fadd.f32(float %{{.*}}, float %{{.*}}, metadata !"round.dynamic", metadata !"fpexcept.strict")
- // STRICTEXCEPT: llvm.experimental.constrained.fadd.f32(float %{{.*}}, float %{{.*}}, metadata !"round.dynamic", metadata !"fpexcept.strict")
- // STRICTNOEXCEPT: llvm.experimental.constrained.fadd.f32(float %{{.*}}, float %{{.*}}, metadata !"round.dynamic", metadata !"fpexcept.ignore")
- // PRECISE: fadd contract float %{{.*}}, %{{.*}}
- // FAST: fadd fast
- // FASTNOCONTRACT: fadd reassoc nnan ninf nsz arcp afn float
- f0 = f1 + f2;
-
- // CHECK: ret void
- }
- }
-
- class d {
- public:
- d(const char *, int);
- aaaa<int> e;
- };
-
-float foo() {
- d x("", 1);
- aaaa<int> a;
- return f0;
-}
-
+// RUN: %clang_cc1 -x c++ -fexceptions -fcxx-exceptions -frounding-math -ffp-exception-behavior=strict -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=FPMODELSTRICT
+// RUN: %clang_cc1 -x c++ -ffp-contract=fast -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s -check-prefix=PRECISE
+// RUN: %clang_cc1 -x c++ -ffast-math -fexceptions -fcxx-exceptions -ffp-contract=fast -emit-llvm -o - %s | FileCheck %s -check-prefix=FAST
+// RUN: %clang_cc1 -x c++ -ffast-math -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s -check-prefix=FASTNOCONTRACT
+// RUN: %clang_cc1 -x c++ -ffast-math -fexceptions -fcxx-exceptions -ffp-contract=fast -ffp-exception-behavior=ignore -emit-llvm -o - %s | FileCheck %s -check-prefix=FAST
+// RUN: %clang_cc1 -x c++ -ffast-math -fexceptions -fcxx-exceptions -ffp-contract=fast -ffp-exception-behavior=strict -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=EXCEPT
+// RUN: %clang_cc1 -x c++ -ffast-math -fexceptions -fcxx-exceptions -ffp-contract=fast -ffp-exception-behavior=maytrap -fexperimental-strict-floating-point -emit-llvm -o - %s | FileCheck %s -check-prefix=MAYTRAP
+
+float f0, f1, f2;
+
+ template <class>
+ class aaaa {
+ public:
+ ~aaaa();
+ void b();
+ };
+
+ template <class c>
+ aaaa<c>::~aaaa() { try {
+ b();
+ // CHECK-LABEL: define {{.*}}void @_ZN4aaaaIiED2Ev{{.*}}
+
+ } catch (...) {
+ // MAYTRAP: llvm.experimental.constrained.fadd.f32(float %{{.*}}, float %{{.*}}, metadata !"round.tonearest", metadata !"fpexcept.maytrap")
+ // EXCEPT: llvm.experimental.constrained.fadd.f32(float %{{.*}}, float %{{.*}}, metadata !"round.tonearest", metadata !"fpexcept.strict")
+ // FPMODELSTRICT: llvm.experimental.constrained.fadd.f32(float %{{.*}}, float %{{.*}}, metadata !"round.dynamic", metadata !"fpexcept.strict")
+ // STRICTEXCEPT: llvm.experimental.constrained.fadd.f32(float %{{.*}}, float %{{.*}}, metadata !"round.dynamic", metadata !"fpexcept.strict")
+ // STRICTNOEXCEPT: llvm.experimental.constrained.fadd.f32(float %{{.*}}, float %{{.*}}, metadata !"round.dynamic", metadata !"fpexcept.ignore")
+ // PRECISE: fadd contract float %{{.*}}, %{{.*}}
+ // FAST: fadd fast
+ // FASTNOCONTRACT: fadd reassoc nnan ninf nsz arcp afn float
+ f0 = f1 + f2;
+
+ // CHECK: ret void
+ }
+ }
+
+ class d {
+ public:
+ d(const char *, int);
+ aaaa<int> e;
+ };
+
+float foo() {
+ d x("", 1);
+ aaaa<int> a;
+ return f0;
+}
+
diff --git a/clang/test/CodeGenCXX/attr-x86-no_caller_saved_registers.cpp b/clang/test/CodeGenCXX/attr-x86-no_caller_saved_registers.cpp
index f90f9361fb4351..68fc10305218cd 100644
--- a/clang/test/CodeGenCXX/attr-x86-no_caller_saved_registers.cpp
+++ b/clang/test/CodeGenCXX/attr-x86-no_caller_saved_registers.cpp
@@ -1,31 +1,31 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu %s -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -triple x86_64-pc-win32 %s -emit-llvm -o - | FileCheck %s
-
-// CHECK: foo{{[^#]*}}#[[ATTRS:[0-9]+]]
-__attribute__((no_caller_saved_registers)) void foo() {}
-namespace S {
-// CHECK: bar{{[^#]*}}#[[ATTRS]]
-__attribute__((no_caller_saved_registers)) void bar(int *a) { foo(); }
-}
-
-struct St {
- static void baz(int *a) __attribute__((no_caller_saved_registers)) { S::bar(a); }
-};
-
-__attribute((no_caller_saved_registers)) void (*foobar)(void);
-
-// CHECK-LABEL: @main
-int main(int argc, char **argv) {
- St::baz(&argc);
- // CHECK: [[FOOBAR:%.+]] = load ptr, ptr @{{.*}}foobar{{.*}},
- // CHECK-NEXT: call void [[FOOBAR]]() #[[ATTRS1:.+]]
- foobar();
- return 0;
-}
-
-// CHECK: baz{{[^#]*}}#[[ATTRS]]
-
-// CHECK: attributes #[[ATTRS]] = {
-// CHECK-SAME: "no_caller_saved_registers"
-// CHECK-SAME: }
-// CHECK: attributes #[[ATTRS1]] = { "no_caller_saved_registers" }
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-pc-win32 %s -emit-llvm -o - | FileCheck %s
+
+// CHECK: foo{{[^#]*}}#[[ATTRS:[0-9]+]]
+__attribute__((no_caller_saved_registers)) void foo() {}
+namespace S {
+// CHECK: bar{{[^#]*}}#[[ATTRS]]
+__attribute__((no_caller_saved_registers)) void bar(int *a) { foo(); }
+}
+
+struct St {
+ static void baz(int *a) __attribute__((no_caller_saved_registers)) { S::bar(a); }
+};
+
+__attribute((no_caller_saved_registers)) void (*foobar)(void);
+
+// CHECK-LABEL: @main
+int main(int argc, char **argv) {
+ St::baz(&argc);
+ // CHECK: [[FOOBAR:%.+]] = load ptr, ptr @{{.*}}foobar{{.*}},
+ // CHECK-NEXT: call void [[FOOBAR]]() #[[ATTRS1:.+]]
+ foobar();
+ return 0;
+}
+
+// CHECK: baz{{[^#]*}}#[[ATTRS]]
+
+// CHECK: attributes #[[ATTRS]] = {
+// CHECK-SAME: "no_caller_saved_registers"
+// CHECK-SAME: }
+// CHECK: attributes #[[ATTRS1]] = { "no_caller_saved_registers" }
diff --git a/clang/test/CodeGenCXX/debug-info-atexit-stub.cpp b/clang/test/CodeGenCXX/debug-info-atexit-stub.cpp
index 0282bdd1a28364..ca9bc3a13a1e46 100644
--- a/clang/test/CodeGenCXX/debug-info-atexit-stub.cpp
+++ b/clang/test/CodeGenCXX/debug-info-atexit-stub.cpp
@@ -1,22 +1,22 @@
-// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-windows-msvc -gcodeview -debug-info-kind=limited -o - | FileCheck %s
-
-struct a {
- ~a();
-};
-template <typename b> struct c : a {
- c(void (b::*)());
-};
-struct B {
- virtual void e();
-};
-c<B> *d() {
- static c<B> f(&B::e);
- return &f;
-}
-
-// CHECK: define internal void @"??__Ff@?1??d@@YAPEAU?$c at UB@@@@XZ at YAXXZ"()
-// CHECK-SAME: !dbg ![[SUBPROGRAM:[0-9]+]] {
-// CHECK: call void @"??1?$c at UB@@@@QEAA at XZ"(ptr @"?f@?1??d@@YAPEAU?$c at UB@@@@XZ at 4U2@A"), !dbg ![[LOCATION:[0-9]+]]
-// CHECK: ![[SUBPROGRAM]] = distinct !DISubprogram(name: "`dynamic atexit destructor for 'f'"
-// CHECK-SAME: flags: DIFlagArtificial
-// CHECK: ![[LOCATION]] = !DILocation(line: 0, scope: ![[SUBPROGRAM]])
+// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-windows-msvc -gcodeview -debug-info-kind=limited -o - | FileCheck %s
+
+struct a {
+ ~a();
+};
+template <typename b> struct c : a {
+ c(void (b::*)());
+};
+struct B {
+ virtual void e();
+};
+c<B> *d() {
+ static c<B> f(&B::e);
+ return &f;
+}
+
+// CHECK: define internal void @"??__Ff@?1??d@@YAPEAU?$c at UB@@@@XZ at YAXXZ"()
+// CHECK-SAME: !dbg ![[SUBPROGRAM:[0-9]+]] {
+// CHECK: call void @"??1?$c at UB@@@@QEAA at XZ"(ptr @"?f@?1??d@@YAPEAU?$c at UB@@@@XZ at 4U2@A"), !dbg ![[LOCATION:[0-9]+]]
+// CHECK: ![[SUBPROGRAM]] = distinct !DISubprogram(name: "`dynamic atexit destructor for 'f'"
+// CHECK-SAME: flags: DIFlagArtificial
+// CHECK: ![[LOCATION]] = !DILocation(line: 0, scope: ![[SUBPROGRAM]])
diff --git a/clang/test/CodeGenHLSL/builtins/clamp.hlsl b/clang/test/CodeGenHLSL/builtins/clamp.hlsl
index 029e48ffe25865..cb5d0910ed7950 100644
--- a/clang/test/CodeGenHLSL/builtins/clamp.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/clamp.hlsl
@@ -1,134 +1,134 @@
-// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
-// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
-// RUN: --check-prefixes=CHECK,NATIVE_HALF
-// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
-// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
-
-#ifdef __HLSL_ENABLE_16_BIT
-// NATIVE_HALF: define noundef i16 @
-// NATIVE_HALF: call i16 @llvm.dx.clamp.i16(
-int16_t test_clamp_short(int16_t p0, int16_t p1) { return clamp(p0, p1,p1); }
-// NATIVE_HALF: define noundef <2 x i16> @
-// NATIVE_HALF: call <2 x i16> @llvm.dx.clamp.v2i16(
-int16_t2 test_clamp_short2(int16_t2 p0, int16_t2 p1) { return clamp(p0, p1,p1); }
-// NATIVE_HALF: define noundef <3 x i16> @
-// NATIVE_HALF: call <3 x i16> @llvm.dx.clamp.v3i16
-int16_t3 test_clamp_short3(int16_t3 p0, int16_t3 p1) { return clamp(p0, p1,p1); }
-// NATIVE_HALF: define noundef <4 x i16> @
-// NATIVE_HALF: call <4 x i16> @llvm.dx.clamp.v4i16
-int16_t4 test_clamp_short4(int16_t4 p0, int16_t4 p1) { return clamp(p0, p1,p1); }
-
-// NATIVE_HALF: define noundef i16 @
-// NATIVE_HALF: call i16 @llvm.dx.uclamp.i16(
-uint16_t test_clamp_ushort(uint16_t p0, uint16_t p1) { return clamp(p0, p1,p1); }
-// NATIVE_HALF: define noundef <2 x i16> @
-// NATIVE_HALF: call <2 x i16> @llvm.dx.uclamp.v2i16
-uint16_t2 test_clamp_ushort2(uint16_t2 p0, uint16_t2 p1) { return clamp(p0, p1,p1); }
-// NATIVE_HALF: define noundef <3 x i16> @
-// NATIVE_HALF: call <3 x i16> @llvm.dx.uclamp.v3i16
-uint16_t3 test_clamp_ushort3(uint16_t3 p0, uint16_t3 p1) { return clamp(p0, p1,p1); }
-// NATIVE_HALF: define noundef <4 x i16> @
-// NATIVE_HALF: call <4 x i16> @llvm.dx.uclamp.v4i16
-uint16_t4 test_clamp_ushort4(uint16_t4 p0, uint16_t4 p1) { return clamp(p0, p1,p1); }
-#endif
-
-// CHECK: define noundef i32 @
-// CHECK: call i32 @llvm.dx.clamp.i32(
-int test_clamp_int(int p0, int p1) { return clamp(p0, p1,p1); }
-// CHECK: define noundef <2 x i32> @
-// CHECK: call <2 x i32> @llvm.dx.clamp.v2i32
-int2 test_clamp_int2(int2 p0, int2 p1) { return clamp(p0, p1,p1); }
-// CHECK: define noundef <3 x i32> @
-// CHECK: call <3 x i32> @llvm.dx.clamp.v3i32
-int3 test_clamp_int3(int3 p0, int3 p1) { return clamp(p0, p1,p1); }
-// CHECK: define noundef <4 x i32> @
-// CHECK: call <4 x i32> @llvm.dx.clamp.v4i32
-int4 test_clamp_int4(int4 p0, int4 p1) { return clamp(p0, p1,p1); }
-
-// CHECK: define noundef i32 @
-// CHECK: call i32 @llvm.dx.uclamp.i32(
-int test_clamp_uint(uint p0, uint p1) { return clamp(p0, p1,p1); }
-// CHECK: define noundef <2 x i32> @
-// CHECK: call <2 x i32> @llvm.dx.uclamp.v2i32
-uint2 test_clamp_uint2(uint2 p0, uint2 p1) { return clamp(p0, p1,p1); }
-// CHECK: define noundef <3 x i32> @
-// CHECK: call <3 x i32> @llvm.dx.uclamp.v3i32
-uint3 test_clamp_uint3(uint3 p0, uint3 p1) { return clamp(p0, p1,p1); }
-// CHECK: define noundef <4 x i32> @
-// CHECK: call <4 x i32> @llvm.dx.uclamp.v4i32
-uint4 test_clamp_uint4(uint4 p0, uint4 p1) { return clamp(p0, p1,p1); }
-
-// CHECK: define noundef i64 @
-// CHECK: call i64 @llvm.dx.clamp.i64(
-int64_t test_clamp_long(int64_t p0, int64_t p1) { return clamp(p0, p1,p1); }
-// CHECK: define noundef <2 x i64> @
-// CHECK: call <2 x i64> @llvm.dx.clamp.v2i64
-int64_t2 test_clamp_long2(int64_t2 p0, int64_t2 p1) { return clamp(p0, p1,p1); }
-// CHECK: define noundef <3 x i64> @
-// CHECK: call <3 x i64> @llvm.dx.clamp.v3i64
-int64_t3 test_clamp_long3(int64_t3 p0, int64_t3 p1) { return clamp(p0, p1,p1); }
-// CHECK: define noundef <4 x i64> @
-// CHECK: call <4 x i64> @llvm.dx.clamp.v4i64
-int64_t4 test_clamp_long4(int64_t4 p0, int64_t4 p1) { return clamp(p0, p1,p1); }
-
-// CHECK: define noundef i64 @
-// CHECK: call i64 @llvm.dx.uclamp.i64(
-uint64_t test_clamp_long(uint64_t p0, uint64_t p1) { return clamp(p0, p1,p1); }
-// CHECK: define noundef <2 x i64> @
-// CHECK: call <2 x i64> @llvm.dx.uclamp.v2i64
-uint64_t2 test_clamp_long2(uint64_t2 p0, uint64_t2 p1) { return clamp(p0, p1,p1); }
-// CHECK: define noundef <3 x i64> @
-// CHECK: call <3 x i64> @llvm.dx.uclamp.v3i64
-uint64_t3 test_clamp_long3(uint64_t3 p0, uint64_t3 p1) { return clamp(p0, p1,p1); }
-// CHECK: define noundef <4 x i64> @
-// CHECK: call <4 x i64> @llvm.dx.uclamp.v4i64
-uint64_t4 test_clamp_long4(uint64_t4 p0, uint64_t4 p1) { return clamp(p0, p1,p1); }
-
-// NATIVE_HALF: define noundef half @
-// NATIVE_HALF: call half @llvm.dx.clamp.f16(
-// NO_HALF: define noundef float @"?test_clamp_half
-// NO_HALF: call float @llvm.dx.clamp.f32(
-half test_clamp_half(half p0, half p1) { return clamp(p0, p1,p1); }
-// NATIVE_HALF: define noundef <2 x half> @
-// NATIVE_HALF: call <2 x half> @llvm.dx.clamp.v2f16
-// NO_HALF: define noundef <2 x float> @"?test_clamp_half2
-// NO_HALF: call <2 x float> @llvm.dx.clamp.v2f32(
-half2 test_clamp_half2(half2 p0, half2 p1) { return clamp(p0, p1,p1); }
-// NATIVE_HALF: define noundef <3 x half> @
-// NATIVE_HALF: call <3 x half> @llvm.dx.clamp.v3f16
-// NO_HALF: define noundef <3 x float> @"?test_clamp_half3
-// NO_HALF: call <3 x float> @llvm.dx.clamp.v3f32(
-half3 test_clamp_half3(half3 p0, half3 p1) { return clamp(p0, p1,p1); }
-// NATIVE_HALF: define noundef <4 x half> @
-// NATIVE_HALF: call <4 x half> @llvm.dx.clamp.v4f16
-// NO_HALF: define noundef <4 x float> @"?test_clamp_half4
-// NO_HALF: call <4 x float> @llvm.dx.clamp.v4f32(
-half4 test_clamp_half4(half4 p0, half4 p1) { return clamp(p0, p1,p1); }
-
-// CHECK: define noundef float @"?test_clamp_float
-// CHECK: call float @llvm.dx.clamp.f32(
-float test_clamp_float(float p0, float p1) { return clamp(p0, p1,p1); }
-// CHECK: define noundef <2 x float> @"?test_clamp_float2
-// CHECK: call <2 x float> @llvm.dx.clamp.v2f32
-float2 test_clamp_float2(float2 p0, float2 p1) { return clamp(p0, p1,p1); }
-// CHECK: define noundef <3 x float> @"?test_clamp_float3
-// CHECK: call <3 x float> @llvm.dx.clamp.v3f32
-float3 test_clamp_float3(float3 p0, float3 p1) { return clamp(p0, p1,p1); }
-// CHECK: define noundef <4 x float> @"?test_clamp_float4
-// CHECK: call <4 x float> @llvm.dx.clamp.v4f32
-float4 test_clamp_float4(float4 p0, float4 p1) { return clamp(p0, p1,p1); }
-
-// CHECK: define noundef double @
-// CHECK: call double @llvm.dx.clamp.f64(
-double test_clamp_double(double p0, double p1) { return clamp(p0, p1,p1); }
-// CHECK: define noundef <2 x double> @
-// CHECK: call <2 x double> @llvm.dx.clamp.v2f64
-double2 test_clamp_double2(double2 p0, double2 p1) { return clamp(p0, p1,p1); }
-// CHECK: define noundef <3 x double> @
-// CHECK: call <3 x double> @llvm.dx.clamp.v3f64
-double3 test_clamp_double3(double3 p0, double3 p1) { return clamp(p0, p1,p1); }
-// CHECK: define noundef <4 x double> @
-// CHECK: call <4 x double> @llvm.dx.clamp.v4f64
-double4 test_clamp_double4(double4 p0, double4 p1) { return clamp(p0, p1,p1); }
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN: --check-prefixes=CHECK,NATIVE_HALF
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
+// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
+
+#ifdef __HLSL_ENABLE_16_BIT
+// NATIVE_HALF: define noundef i16 @
+// NATIVE_HALF: call i16 @llvm.dx.clamp.i16(
+int16_t test_clamp_short(int16_t p0, int16_t p1) { return clamp(p0, p1,p1); }
+// NATIVE_HALF: define noundef <2 x i16> @
+// NATIVE_HALF: call <2 x i16> @llvm.dx.clamp.v2i16(
+int16_t2 test_clamp_short2(int16_t2 p0, int16_t2 p1) { return clamp(p0, p1,p1); }
+// NATIVE_HALF: define noundef <3 x i16> @
+// NATIVE_HALF: call <3 x i16> @llvm.dx.clamp.v3i16
+int16_t3 test_clamp_short3(int16_t3 p0, int16_t3 p1) { return clamp(p0, p1,p1); }
+// NATIVE_HALF: define noundef <4 x i16> @
+// NATIVE_HALF: call <4 x i16> @llvm.dx.clamp.v4i16
+int16_t4 test_clamp_short4(int16_t4 p0, int16_t4 p1) { return clamp(p0, p1,p1); }
+
+// NATIVE_HALF: define noundef i16 @
+// NATIVE_HALF: call i16 @llvm.dx.uclamp.i16(
+uint16_t test_clamp_ushort(uint16_t p0, uint16_t p1) { return clamp(p0, p1,p1); }
+// NATIVE_HALF: define noundef <2 x i16> @
+// NATIVE_HALF: call <2 x i16> @llvm.dx.uclamp.v2i16
+uint16_t2 test_clamp_ushort2(uint16_t2 p0, uint16_t2 p1) { return clamp(p0, p1,p1); }
+// NATIVE_HALF: define noundef <3 x i16> @
+// NATIVE_HALF: call <3 x i16> @llvm.dx.uclamp.v3i16
+uint16_t3 test_clamp_ushort3(uint16_t3 p0, uint16_t3 p1) { return clamp(p0, p1,p1); }
+// NATIVE_HALF: define noundef <4 x i16> @
+// NATIVE_HALF: call <4 x i16> @llvm.dx.uclamp.v4i16
+uint16_t4 test_clamp_ushort4(uint16_t4 p0, uint16_t4 p1) { return clamp(p0, p1,p1); }
+#endif
+
+// CHECK: define noundef i32 @
+// CHECK: call i32 @llvm.dx.clamp.i32(
+int test_clamp_int(int p0, int p1) { return clamp(p0, p1,p1); }
+// CHECK: define noundef <2 x i32> @
+// CHECK: call <2 x i32> @llvm.dx.clamp.v2i32
+int2 test_clamp_int2(int2 p0, int2 p1) { return clamp(p0, p1,p1); }
+// CHECK: define noundef <3 x i32> @
+// CHECK: call <3 x i32> @llvm.dx.clamp.v3i32
+int3 test_clamp_int3(int3 p0, int3 p1) { return clamp(p0, p1,p1); }
+// CHECK: define noundef <4 x i32> @
+// CHECK: call <4 x i32> @llvm.dx.clamp.v4i32
+int4 test_clamp_int4(int4 p0, int4 p1) { return clamp(p0, p1,p1); }
+
+// CHECK: define noundef i32 @
+// CHECK: call i32 @llvm.dx.uclamp.i32(
+int test_clamp_uint(uint p0, uint p1) { return clamp(p0, p1,p1); }
+// CHECK: define noundef <2 x i32> @
+// CHECK: call <2 x i32> @llvm.dx.uclamp.v2i32
+uint2 test_clamp_uint2(uint2 p0, uint2 p1) { return clamp(p0, p1,p1); }
+// CHECK: define noundef <3 x i32> @
+// CHECK: call <3 x i32> @llvm.dx.uclamp.v3i32
+uint3 test_clamp_uint3(uint3 p0, uint3 p1) { return clamp(p0, p1,p1); }
+// CHECK: define noundef <4 x i32> @
+// CHECK: call <4 x i32> @llvm.dx.uclamp.v4i32
+uint4 test_clamp_uint4(uint4 p0, uint4 p1) { return clamp(p0, p1,p1); }
+
+// CHECK: define noundef i64 @
+// CHECK: call i64 @llvm.dx.clamp.i64(
+int64_t test_clamp_long(int64_t p0, int64_t p1) { return clamp(p0, p1,p1); }
+// CHECK: define noundef <2 x i64> @
+// CHECK: call <2 x i64> @llvm.dx.clamp.v2i64
+int64_t2 test_clamp_long2(int64_t2 p0, int64_t2 p1) { return clamp(p0, p1,p1); }
+// CHECK: define noundef <3 x i64> @
+// CHECK: call <3 x i64> @llvm.dx.clamp.v3i64
+int64_t3 test_clamp_long3(int64_t3 p0, int64_t3 p1) { return clamp(p0, p1,p1); }
+// CHECK: define noundef <4 x i64> @
+// CHECK: call <4 x i64> @llvm.dx.clamp.v4i64
+int64_t4 test_clamp_long4(int64_t4 p0, int64_t4 p1) { return clamp(p0, p1,p1); }
+
+// CHECK: define noundef i64 @
+// CHECK: call i64 @llvm.dx.uclamp.i64(
+uint64_t test_clamp_long(uint64_t p0, uint64_t p1) { return clamp(p0, p1,p1); }
+// CHECK: define noundef <2 x i64> @
+// CHECK: call <2 x i64> @llvm.dx.uclamp.v2i64
+uint64_t2 test_clamp_long2(uint64_t2 p0, uint64_t2 p1) { return clamp(p0, p1,p1); }
+// CHECK: define noundef <3 x i64> @
+// CHECK: call <3 x i64> @llvm.dx.uclamp.v3i64
+uint64_t3 test_clamp_long3(uint64_t3 p0, uint64_t3 p1) { return clamp(p0, p1,p1); }
+// CHECK: define noundef <4 x i64> @
+// CHECK: call <4 x i64> @llvm.dx.uclamp.v4i64
+uint64_t4 test_clamp_long4(uint64_t4 p0, uint64_t4 p1) { return clamp(p0, p1,p1); }
+
+// NATIVE_HALF: define noundef half @
+// NATIVE_HALF: call half @llvm.dx.clamp.f16(
+// NO_HALF: define noundef float @"?test_clamp_half
+// NO_HALF: call float @llvm.dx.clamp.f32(
+half test_clamp_half(half p0, half p1) { return clamp(p0, p1,p1); }
+// NATIVE_HALF: define noundef <2 x half> @
+// NATIVE_HALF: call <2 x half> @llvm.dx.clamp.v2f16
+// NO_HALF: define noundef <2 x float> @"?test_clamp_half2
+// NO_HALF: call <2 x float> @llvm.dx.clamp.v2f32(
+half2 test_clamp_half2(half2 p0, half2 p1) { return clamp(p0, p1,p1); }
+// NATIVE_HALF: define noundef <3 x half> @
+// NATIVE_HALF: call <3 x half> @llvm.dx.clamp.v3f16
+// NO_HALF: define noundef <3 x float> @"?test_clamp_half3
+// NO_HALF: call <3 x float> @llvm.dx.clamp.v3f32(
+half3 test_clamp_half3(half3 p0, half3 p1) { return clamp(p0, p1,p1); }
+// NATIVE_HALF: define noundef <4 x half> @
+// NATIVE_HALF: call <4 x half> @llvm.dx.clamp.v4f16
+// NO_HALF: define noundef <4 x float> @"?test_clamp_half4
+// NO_HALF: call <4 x float> @llvm.dx.clamp.v4f32(
+half4 test_clamp_half4(half4 p0, half4 p1) { return clamp(p0, p1,p1); }
+
+// CHECK: define noundef float @"?test_clamp_float
+// CHECK: call float @llvm.dx.clamp.f32(
+float test_clamp_float(float p0, float p1) { return clamp(p0, p1,p1); }
+// CHECK: define noundef <2 x float> @"?test_clamp_float2
+// CHECK: call <2 x float> @llvm.dx.clamp.v2f32
+float2 test_clamp_float2(float2 p0, float2 p1) { return clamp(p0, p1,p1); }
+// CHECK: define noundef <3 x float> @"?test_clamp_float3
+// CHECK: call <3 x float> @llvm.dx.clamp.v3f32
+float3 test_clamp_float3(float3 p0, float3 p1) { return clamp(p0, p1,p1); }
+// CHECK: define noundef <4 x float> @"?test_clamp_float4
+// CHECK: call <4 x float> @llvm.dx.clamp.v4f32
+float4 test_clamp_float4(float4 p0, float4 p1) { return clamp(p0, p1,p1); }
+
+// CHECK: define noundef double @
+// CHECK: call double @llvm.dx.clamp.f64(
+double test_clamp_double(double p0, double p1) { return clamp(p0, p1,p1); }
+// CHECK: define noundef <2 x double> @
+// CHECK: call <2 x double> @llvm.dx.clamp.v2f64
+double2 test_clamp_double2(double2 p0, double2 p1) { return clamp(p0, p1,p1); }
+// CHECK: define noundef <3 x double> @
+// CHECK: call <3 x double> @llvm.dx.clamp.v3f64
+double3 test_clamp_double3(double3 p0, double3 p1) { return clamp(p0, p1,p1); }
+// CHECK: define noundef <4 x double> @
+// CHECK: call <4 x double> @llvm.dx.clamp.v4f64
+double4 test_clamp_double4(double4 p0, double4 p1) { return clamp(p0, p1,p1); }
diff --git a/clang/test/CodeGenHLSL/builtins/cos.hlsl b/clang/test/CodeGenHLSL/builtins/cos.hlsl
index fb416fcaa49d76..9a0b9ffe103e1a 100644
--- a/clang/test/CodeGenHLSL/builtins/cos.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/cos.hlsl
@@ -1,41 +1,41 @@
-// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
-// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
-// RUN: --check-prefixes=CHECK,NATIVE_HALF
-// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
-// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
-
-// NATIVE_HALF: define noundef half @
-// NATIVE_HALF: call half @llvm.cos.f16(
-// NO_HALF: define noundef float @"?test_cos_half
-// NO_HALF: call float @llvm.cos.f32(
-half test_cos_half(half p0) { return cos(p0); }
-// NATIVE_HALF: define noundef <2 x half> @
-// NATIVE_HALF: call <2 x half> @llvm.cos.v2f16
-// NO_HALF: define noundef <2 x float> @"?test_cos_half2
-// NO_HALF: call <2 x float> @llvm.cos.v2f32(
-half2 test_cos_half2(half2 p0) { return cos(p0); }
-// NATIVE_HALF: define noundef <3 x half> @
-// NATIVE_HALF: call <3 x half> @llvm.cos.v3f16
-// NO_HALF: define noundef <3 x float> @"?test_cos_half3
-// NO_HALF: call <3 x float> @llvm.cos.v3f32(
-half3 test_cos_half3(half3 p0) { return cos(p0); }
-// NATIVE_HALF: define noundef <4 x half> @
-// NATIVE_HALF: call <4 x half> @llvm.cos.v4f16
-// NO_HALF: define noundef <4 x float> @"?test_cos_half4
-// NO_HALF: call <4 x float> @llvm.cos.v4f32(
-half4 test_cos_half4(half4 p0) { return cos(p0); }
-
-// CHECK: define noundef float @"?test_cos_float
-// CHECK: call float @llvm.cos.f32(
-float test_cos_float(float p0) { return cos(p0); }
-// CHECK: define noundef <2 x float> @"?test_cos_float2
-// CHECK: call <2 x float> @llvm.cos.v2f32
-float2 test_cos_float2(float2 p0) { return cos(p0); }
-// CHECK: define noundef <3 x float> @"?test_cos_float3
-// CHECK: call <3 x float> @llvm.cos.v3f32
-float3 test_cos_float3(float3 p0) { return cos(p0); }
-// CHECK: define noundef <4 x float> @"?test_cos_float4
-// CHECK: call <4 x float> @llvm.cos.v4f32
-float4 test_cos_float4(float4 p0) { return cos(p0); }
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN: --check-prefixes=CHECK,NATIVE_HALF
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
+// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
+
+// NATIVE_HALF: define noundef half @
+// NATIVE_HALF: call half @llvm.cos.f16(
+// NO_HALF: define noundef float @"?test_cos_half
+// NO_HALF: call float @llvm.cos.f32(
+half test_cos_half(half p0) { return cos(p0); }
+// NATIVE_HALF: define noundef <2 x half> @
+// NATIVE_HALF: call <2 x half> @llvm.cos.v2f16
+// NO_HALF: define noundef <2 x float> @"?test_cos_half2
+// NO_HALF: call <2 x float> @llvm.cos.v2f32(
+half2 test_cos_half2(half2 p0) { return cos(p0); }
+// NATIVE_HALF: define noundef <3 x half> @
+// NATIVE_HALF: call <3 x half> @llvm.cos.v3f16
+// NO_HALF: define noundef <3 x float> @"?test_cos_half3
+// NO_HALF: call <3 x float> @llvm.cos.v3f32(
+half3 test_cos_half3(half3 p0) { return cos(p0); }
+// NATIVE_HALF: define noundef <4 x half> @
+// NATIVE_HALF: call <4 x half> @llvm.cos.v4f16
+// NO_HALF: define noundef <4 x float> @"?test_cos_half4
+// NO_HALF: call <4 x float> @llvm.cos.v4f32(
+half4 test_cos_half4(half4 p0) { return cos(p0); }
+
+// CHECK: define noundef float @"?test_cos_float
+// CHECK: call float @llvm.cos.f32(
+float test_cos_float(float p0) { return cos(p0); }
+// CHECK: define noundef <2 x float> @"?test_cos_float2
+// CHECK: call <2 x float> @llvm.cos.v2f32
+float2 test_cos_float2(float2 p0) { return cos(p0); }
+// CHECK: define noundef <3 x float> @"?test_cos_float3
+// CHECK: call <3 x float> @llvm.cos.v3f32
+float3 test_cos_float3(float3 p0) { return cos(p0); }
+// CHECK: define noundef <4 x float> @"?test_cos_float4
+// CHECK: call <4 x float> @llvm.cos.v4f32
+float4 test_cos_float4(float4 p0) { return cos(p0); }
diff --git a/clang/test/CodeGenHLSL/builtins/floor.hlsl b/clang/test/CodeGenHLSL/builtins/floor.hlsl
index 07803bfae3be68..4883102f02fcb0 100644
--- a/clang/test/CodeGenHLSL/builtins/floor.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/floor.hlsl
@@ -1,43 +1,43 @@
-// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
-// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
-// RUN: --check-prefixes=CHECK,NATIVE_HALF
-// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
-// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
-
-using hlsl::floor;
-
-// NATIVE_HALF: define noundef half @
-// NATIVE_HALF: call half @llvm.floor.f16(
-// NO_HALF: define noundef float @"?test_floor_half@@YA$halff@$halff@@Z"(
-// NO_HALF: call float @llvm.floor.f32(float %0)
-half test_floor_half(half p0) { return floor(p0); }
-// NATIVE_HALF: define noundef <2 x half> @
-// NATIVE_HALF: call <2 x half> @llvm.floor.v2f16(
-// NO_HALF: define noundef <2 x float> @"?test_floor_half2@@YAT?$__vector@$halff@$01 at __clang@@T12@@Z"(
-// NO_HALF: call <2 x float> @llvm.floor.v2f32(
-half2 test_floor_half2(half2 p0) { return floor(p0); }
-// NATIVE_HALF: define noundef <3 x half> @
-// NATIVE_HALF: call <3 x half> @llvm.floor.v3f16(
-// NO_HALF: define noundef <3 x float> @"?test_floor_half3@@YAT?$__vector@$halff@$02 at __clang@@T12@@Z"(
-// NO_HALF: call <3 x float> @llvm.floor.v3f32(
-half3 test_floor_half3(half3 p0) { return floor(p0); }
-// NATIVE_HALF: define noundef <4 x half> @
-// NATIVE_HALF: call <4 x half> @llvm.floor.v4f16(
-// NO_HALF: define noundef <4 x float> @"?test_floor_half4@@YAT?$__vector@$halff@$03 at __clang@@T12@@Z"(
-// NO_HALF: call <4 x float> @llvm.floor.v4f32(
-half4 test_floor_half4(half4 p0) { return floor(p0); }
-
-// CHECK: define noundef float @
-// CHECK: call float @llvm.floor.f32(
-float test_floor_float(float p0) { return floor(p0); }
-// CHECK: define noundef <2 x float> @
-// CHECK: call <2 x float> @llvm.floor.v2f32(
-float2 test_floor_float2(float2 p0) { return floor(p0); }
-// CHECK: define noundef <3 x float> @
-// CHECK: call <3 x float> @llvm.floor.v3f32(
-float3 test_floor_float3(float3 p0) { return floor(p0); }
-// CHECK: define noundef <4 x float> @
-// CHECK: call <4 x float> @llvm.floor.v4f32(
-float4 test_floor_float4(float4 p0) { return floor(p0); }
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN: --check-prefixes=CHECK,NATIVE_HALF
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
+// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
+
+using hlsl::floor;
+
+// NATIVE_HALF: define noundef half @
+// NATIVE_HALF: call half @llvm.floor.f16(
+// NO_HALF: define noundef float @"?test_floor_half@@YA$halff@$halff@@Z"(
+// NO_HALF: call float @llvm.floor.f32(float %0)
+half test_floor_half(half p0) { return floor(p0); }
+// NATIVE_HALF: define noundef <2 x half> @
+// NATIVE_HALF: call <2 x half> @llvm.floor.v2f16(
+// NO_HALF: define noundef <2 x float> @"?test_floor_half2@@YAT?$__vector@$halff@$01 at __clang@@T12@@Z"(
+// NO_HALF: call <2 x float> @llvm.floor.v2f32(
+half2 test_floor_half2(half2 p0) { return floor(p0); }
+// NATIVE_HALF: define noundef <3 x half> @
+// NATIVE_HALF: call <3 x half> @llvm.floor.v3f16(
+// NO_HALF: define noundef <3 x float> @"?test_floor_half3@@YAT?$__vector@$halff@$02 at __clang@@T12@@Z"(
+// NO_HALF: call <3 x float> @llvm.floor.v3f32(
+half3 test_floor_half3(half3 p0) { return floor(p0); }
+// NATIVE_HALF: define noundef <4 x half> @
+// NATIVE_HALF: call <4 x half> @llvm.floor.v4f16(
+// NO_HALF: define noundef <4 x float> @"?test_floor_half4@@YAT?$__vector@$halff@$03 at __clang@@T12@@Z"(
+// NO_HALF: call <4 x float> @llvm.floor.v4f32(
+half4 test_floor_half4(half4 p0) { return floor(p0); }
+
+// CHECK: define noundef float @
+// CHECK: call float @llvm.floor.f32(
+float test_floor_float(float p0) { return floor(p0); }
+// CHECK: define noundef <2 x float> @
+// CHECK: call <2 x float> @llvm.floor.v2f32(
+float2 test_floor_float2(float2 p0) { return floor(p0); }
+// CHECK: define noundef <3 x float> @
+// CHECK: call <3 x float> @llvm.floor.v3f32(
+float3 test_floor_float3(float3 p0) { return floor(p0); }
+// CHECK: define noundef <4 x float> @
+// CHECK: call <4 x float> @llvm.floor.v4f32(
+float4 test_floor_float4(float4 p0) { return floor(p0); }
diff --git a/clang/test/CodeGenHLSL/builtins/lerp-builtin.hlsl b/clang/test/CodeGenHLSL/builtins/lerp-builtin.hlsl
index cdc9abbd70e40b..f9b3cbcddfb695 100644
--- a/clang/test/CodeGenHLSL/builtins/lerp-builtin.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/lerp-builtin.hlsl
@@ -1,15 +1,15 @@
-// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -o - | FileCheck %s
-
-// CHECK-LABEL: builtin_lerp_half_vector
-// CHECK: %hlsl.lerp = call <3 x half> @llvm.dx.lerp.v3f16(<3 x half> %0, <3 x half> %1, <3 x half> %2)
-// CHECK: ret <3 x half> %hlsl.lerp
-half3 builtin_lerp_half_vector (half3 p0) {
- return __builtin_hlsl_lerp ( p0, p0, p0 );
-}
-
-// CHECK-LABEL: builtin_lerp_floar_vector
-// CHECK: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %2)
-// CHECK: ret <2 x float> %hlsl.lerp
-float2 builtin_lerp_floar_vector ( float2 p0) {
- return __builtin_hlsl_lerp ( p0, p0, p0 );
-}
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -o - | FileCheck %s
+
+// CHECK-LABEL: builtin_lerp_half_vector
+// CHECK: %hlsl.lerp = call <3 x half> @llvm.dx.lerp.v3f16(<3 x half> %0, <3 x half> %1, <3 x half> %2)
+// CHECK: ret <3 x half> %hlsl.lerp
+half3 builtin_lerp_half_vector (half3 p0) {
+ return __builtin_hlsl_lerp ( p0, p0, p0 );
+}
+
+// CHECK-LABEL: builtin_lerp_floar_vector
+// CHECK: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %2)
+// CHECK: ret <2 x float> %hlsl.lerp
+float2 builtin_lerp_floar_vector ( float2 p0) {
+ return __builtin_hlsl_lerp ( p0, p0, p0 );
+}
diff --git a/clang/test/CodeGenHLSL/builtins/lerp.hlsl b/clang/test/CodeGenHLSL/builtins/lerp.hlsl
index 634b20be3a28d6..aa132218b83f40 100644
--- a/clang/test/CodeGenHLSL/builtins/lerp.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/lerp.hlsl
@@ -1,102 +1,102 @@
-// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
-// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
-// RUN: --check-prefixes=CHECK,DXIL_CHECK,DXIL_NATIVE_HALF,NATIVE_HALF
-// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
-// RUN: -o - | FileCheck %s --check-prefixes=CHECK,DXIL_CHECK,NO_HALF,DXIL_NO_HALF
-// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
-// RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \
-// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
-// RUN: --check-prefixes=CHECK,NATIVE_HALF,SPIR_NATIVE_HALF,SPIR_CHECK
-// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
-// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
-// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF,SPIR_NO_HALF,SPIR_CHECK
-
-
-// DXIL_NATIVE_HALF: %hlsl.lerp = call half @llvm.dx.lerp.f16(half %0, half %1, half %2)
-// SPIR_NATIVE_HALF: %hlsl.lerp = call half @llvm.spv.lerp.f16(half %0, half %1, half %2)
-// NATIVE_HALF: ret half %hlsl.lerp
-// DXIL_NO_HALF: %hlsl.lerp = call float @llvm.dx.lerp.f32(float %0, float %1, float %2)
-// SPIR_NO_HALF: %hlsl.lerp = call float @llvm.spv.lerp.f32(float %0, float %1, float %2)
-// NO_HALF: ret float %hlsl.lerp
-half test_lerp_half(half p0) { return lerp(p0, p0, p0); }
-
-// DXIL_NATIVE_HALF: %hlsl.lerp = call <2 x half> @llvm.dx.lerp.v2f16(<2 x half> %0, <2 x half> %1, <2 x half> %2)
-// SPIR_NATIVE_HALF: %hlsl.lerp = call <2 x half> @llvm.spv.lerp.v2f16(<2 x half> %0, <2 x half> %1, <2 x half> %2)
-// NATIVE_HALF: ret <2 x half> %hlsl.lerp
-// DXIL_NO_HALF: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %2)
-// SPIR_NO_HALF: %hlsl.lerp = call <2 x float> @llvm.spv.lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %2)
-// NO_HALF: ret <2 x float> %hlsl.lerp
-half2 test_lerp_half2(half2 p0) { return lerp(p0, p0, p0); }
-
-// DXIL_NATIVE_HALF: %hlsl.lerp = call <3 x half> @llvm.dx.lerp.v3f16(<3 x half> %0, <3 x half> %1, <3 x half> %2)
-// SPIR_NATIVE_HALF: %hlsl.lerp = call <3 x half> @llvm.spv.lerp.v3f16(<3 x half> %0, <3 x half> %1, <3 x half> %2)
-// NATIVE_HALF: ret <3 x half> %hlsl.lerp
-// DXIL_NO_HALF: %hlsl.lerp = call <3 x float> @llvm.dx.lerp.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %2)
-// SPIR_NO_HALF: %hlsl.lerp = call <3 x float> @llvm.spv.lerp.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %2)
-// NO_HALF: ret <3 x float> %hlsl.lerp
-half3 test_lerp_half3(half3 p0) { return lerp(p0, p0, p0); }
-
-// DXIL_NATIVE_HALF: %hlsl.lerp = call <4 x half> @llvm.dx.lerp.v4f16(<4 x half> %0, <4 x half> %1, <4 x half> %2)
-// SPIR_NATIVE_HALF: %hlsl.lerp = call <4 x half> @llvm.spv.lerp.v4f16(<4 x half> %0, <4 x half> %1, <4 x half> %2)
-// NATIVE_HALF: ret <4 x half> %hlsl.lerp
-// DXIL_NO_HALF: %hlsl.lerp = call <4 x float> @llvm.dx.lerp.v4f32(<4 x float> %0, <4 x float> %1, <4 x float> %2)
-// SPIR_NO_HALF: %hlsl.lerp = call <4 x float> @llvm.spv.lerp.v4f32(<4 x float> %0, <4 x float> %1, <4 x float> %2)
-// NO_HALF: ret <4 x float> %hlsl.lerp
-half4 test_lerp_half4(half4 p0) { return lerp(p0, p0, p0); }
-
-// DXIL_CHECK: %hlsl.lerp = call float @llvm.dx.lerp.f32(float %0, float %1, float %2)
-// SPIR_CHECK: %hlsl.lerp = call float @llvm.spv.lerp.f32(float %0, float %1, float %2)
-// CHECK: ret float %hlsl.lerp
-float test_lerp_float(float p0) { return lerp(p0, p0, p0); }
-
-// DXIL_CHECK: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %2)
-// SPIR_CHECK: %hlsl.lerp = call <2 x float> @llvm.spv.lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %2)
-// CHECK: ret <2 x float> %hlsl.lerp
-float2 test_lerp_float2(float2 p0) { return lerp(p0, p0, p0); }
-
-// DXIL_CHECK: %hlsl.lerp = call <3 x float> @llvm.dx.lerp.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %2)
-// SPIR_CHECK: %hlsl.lerp = call <3 x float> @llvm.spv.lerp.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %2)
-// CHECK: ret <3 x float> %hlsl.lerp
-float3 test_lerp_float3(float3 p0) { return lerp(p0, p0, p0); }
-
-// DXIL_CHECK: %hlsl.lerp = call <4 x float> @llvm.dx.lerp.v4f32(<4 x float> %0, <4 x float> %1, <4 x float> %2)
-// SPIR_CHECK: %hlsl.lerp = call <4 x float> @llvm.spv.lerp.v4f32(<4 x float> %0, <4 x float> %1, <4 x float> %2)
-// CHECK: ret <4 x float> %hlsl.lerp
-float4 test_lerp_float4(float4 p0) { return lerp(p0, p0, p0); }
-
-// DXIL_CHECK: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %splat.splat, <2 x float> %1, <2 x float> %2)
-// SPIR_CHECK: %hlsl.lerp = call <2 x float> @llvm.spv.lerp.v2f32(<2 x float> %splat.splat, <2 x float> %1, <2 x float> %2)
-// CHECK: ret <2 x float> %hlsl.lerp
-float2 test_lerp_float2_splat(float p0, float2 p1) { return lerp(p0, p1, p1); }
-
-// DXIL_CHECK: %hlsl.lerp = call <3 x float> @llvm.dx.lerp.v3f32(<3 x float> %splat.splat, <3 x float> %1, <3 x float> %2)
-// SPIR_CHECK: %hlsl.lerp = call <3 x float> @llvm.spv.lerp.v3f32(<3 x float> %splat.splat, <3 x float> %1, <3 x float> %2)
-// CHECK: ret <3 x float> %hlsl.lerp
-float3 test_lerp_float3_splat(float p0, float3 p1) { return lerp(p0, p1, p1); }
-
-// DXIL_CHECK: %hlsl.lerp = call <4 x float> @llvm.dx.lerp.v4f32(<4 x float> %splat.splat, <4 x float> %1, <4 x float> %2)
-// SPIR_CHECK: %hlsl.lerp = call <4 x float> @llvm.spv.lerp.v4f32(<4 x float> %splat.splat, <4 x float> %1, <4 x float> %2)
-// CHECK: ret <4 x float> %hlsl.lerp
-float4 test_lerp_float4_splat(float p0, float4 p1) { return lerp(p0, p1, p1); }
-
-// CHECK: %conv = sitofp i32 %2 to float
-// CHECK: %splat.splatinsert = insertelement <2 x float> poison, float %conv, i64 0
-// CHECK: %splat.splat = shufflevector <2 x float> %splat.splatinsert, <2 x float> poison, <2 x i32> zeroinitializer
-// DXIL_CHECK: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %splat.splat)
-// SPIR_CHECK: %hlsl.lerp = call <2 x float> @llvm.spv.lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %splat.splat)
-// CHECK: ret <2 x float> %hlsl.lerp
-float2 test_lerp_float2_int_splat(float2 p0, int p1) {
- return lerp(p0, p0, p1);
-}
-
-// CHECK: %conv = sitofp i32 %2 to float
-// CHECK: %splat.splatinsert = insertelement <3 x float> poison, float %conv, i64 0
-// CHECK: %splat.splat = shufflevector <3 x float> %splat.splatinsert, <3 x float> poison, <3 x i32> zeroinitializer
-// DXIL_CHECK: %hlsl.lerp = call <3 x float> @llvm.dx.lerp.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %splat.splat)
-// SPIR_CHECK: %hlsl.lerp = call <3 x float> @llvm.spv.lerp.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %splat.splat)
-// CHECK: ret <3 x float> %hlsl.lerp
-float3 test_lerp_float3_int_splat(float3 p0, int p1) {
- return lerp(p0, p0, p1);
-}
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN: --check-prefixes=CHECK,DXIL_CHECK,DXIL_NATIVE_HALF,NATIVE_HALF
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
+// RUN: -o - | FileCheck %s --check-prefixes=CHECK,DXIL_CHECK,NO_HALF,DXIL_NO_HALF
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \
+// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN: --check-prefixes=CHECK,NATIVE_HALF,SPIR_NATIVE_HALF,SPIR_CHECK
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
+// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF,SPIR_NO_HALF,SPIR_CHECK
+
+
+// DXIL_NATIVE_HALF: %hlsl.lerp = call half @llvm.dx.lerp.f16(half %0, half %1, half %2)
+// SPIR_NATIVE_HALF: %hlsl.lerp = call half @llvm.spv.lerp.f16(half %0, half %1, half %2)
+// NATIVE_HALF: ret half %hlsl.lerp
+// DXIL_NO_HALF: %hlsl.lerp = call float @llvm.dx.lerp.f32(float %0, float %1, float %2)
+// SPIR_NO_HALF: %hlsl.lerp = call float @llvm.spv.lerp.f32(float %0, float %1, float %2)
+// NO_HALF: ret float %hlsl.lerp
+half test_lerp_half(half p0) { return lerp(p0, p0, p0); }
+
+// DXIL_NATIVE_HALF: %hlsl.lerp = call <2 x half> @llvm.dx.lerp.v2f16(<2 x half> %0, <2 x half> %1, <2 x half> %2)
+// SPIR_NATIVE_HALF: %hlsl.lerp = call <2 x half> @llvm.spv.lerp.v2f16(<2 x half> %0, <2 x half> %1, <2 x half> %2)
+// NATIVE_HALF: ret <2 x half> %hlsl.lerp
+// DXIL_NO_HALF: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %2)
+// SPIR_NO_HALF: %hlsl.lerp = call <2 x float> @llvm.spv.lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %2)
+// NO_HALF: ret <2 x float> %hlsl.lerp
+half2 test_lerp_half2(half2 p0) { return lerp(p0, p0, p0); }
+
+// DXIL_NATIVE_HALF: %hlsl.lerp = call <3 x half> @llvm.dx.lerp.v3f16(<3 x half> %0, <3 x half> %1, <3 x half> %2)
+// SPIR_NATIVE_HALF: %hlsl.lerp = call <3 x half> @llvm.spv.lerp.v3f16(<3 x half> %0, <3 x half> %1, <3 x half> %2)
+// NATIVE_HALF: ret <3 x half> %hlsl.lerp
+// DXIL_NO_HALF: %hlsl.lerp = call <3 x float> @llvm.dx.lerp.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %2)
+// SPIR_NO_HALF: %hlsl.lerp = call <3 x float> @llvm.spv.lerp.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %2)
+// NO_HALF: ret <3 x float> %hlsl.lerp
+half3 test_lerp_half3(half3 p0) { return lerp(p0, p0, p0); }
+
+// DXIL_NATIVE_HALF: %hlsl.lerp = call <4 x half> @llvm.dx.lerp.v4f16(<4 x half> %0, <4 x half> %1, <4 x half> %2)
+// SPIR_NATIVE_HALF: %hlsl.lerp = call <4 x half> @llvm.spv.lerp.v4f16(<4 x half> %0, <4 x half> %1, <4 x half> %2)
+// NATIVE_HALF: ret <4 x half> %hlsl.lerp
+// DXIL_NO_HALF: %hlsl.lerp = call <4 x float> @llvm.dx.lerp.v4f32(<4 x float> %0, <4 x float> %1, <4 x float> %2)
+// SPIR_NO_HALF: %hlsl.lerp = call <4 x float> @llvm.spv.lerp.v4f32(<4 x float> %0, <4 x float> %1, <4 x float> %2)
+// NO_HALF: ret <4 x float> %hlsl.lerp
+half4 test_lerp_half4(half4 p0) { return lerp(p0, p0, p0); }
+
+// DXIL_CHECK: %hlsl.lerp = call float @llvm.dx.lerp.f32(float %0, float %1, float %2)
+// SPIR_CHECK: %hlsl.lerp = call float @llvm.spv.lerp.f32(float %0, float %1, float %2)
+// CHECK: ret float %hlsl.lerp
+float test_lerp_float(float p0) { return lerp(p0, p0, p0); }
+
+// DXIL_CHECK: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %2)
+// SPIR_CHECK: %hlsl.lerp = call <2 x float> @llvm.spv.lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %2)
+// CHECK: ret <2 x float> %hlsl.lerp
+float2 test_lerp_float2(float2 p0) { return lerp(p0, p0, p0); }
+
+// DXIL_CHECK: %hlsl.lerp = call <3 x float> @llvm.dx.lerp.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %2)
+// SPIR_CHECK: %hlsl.lerp = call <3 x float> @llvm.spv.lerp.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %2)
+// CHECK: ret <3 x float> %hlsl.lerp
+float3 test_lerp_float3(float3 p0) { return lerp(p0, p0, p0); }
+
+// DXIL_CHECK: %hlsl.lerp = call <4 x float> @llvm.dx.lerp.v4f32(<4 x float> %0, <4 x float> %1, <4 x float> %2)
+// SPIR_CHECK: %hlsl.lerp = call <4 x float> @llvm.spv.lerp.v4f32(<4 x float> %0, <4 x float> %1, <4 x float> %2)
+// CHECK: ret <4 x float> %hlsl.lerp
+float4 test_lerp_float4(float4 p0) { return lerp(p0, p0, p0); }
+
+// DXIL_CHECK: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %splat.splat, <2 x float> %1, <2 x float> %2)
+// SPIR_CHECK: %hlsl.lerp = call <2 x float> @llvm.spv.lerp.v2f32(<2 x float> %splat.splat, <2 x float> %1, <2 x float> %2)
+// CHECK: ret <2 x float> %hlsl.lerp
+float2 test_lerp_float2_splat(float p0, float2 p1) { return lerp(p0, p1, p1); }
+
+// DXIL_CHECK: %hlsl.lerp = call <3 x float> @llvm.dx.lerp.v3f32(<3 x float> %splat.splat, <3 x float> %1, <3 x float> %2)
+// SPIR_CHECK: %hlsl.lerp = call <3 x float> @llvm.spv.lerp.v3f32(<3 x float> %splat.splat, <3 x float> %1, <3 x float> %2)
+// CHECK: ret <3 x float> %hlsl.lerp
+float3 test_lerp_float3_splat(float p0, float3 p1) { return lerp(p0, p1, p1); }
+
+// DXIL_CHECK: %hlsl.lerp = call <4 x float> @llvm.dx.lerp.v4f32(<4 x float> %splat.splat, <4 x float> %1, <4 x float> %2)
+// SPIR_CHECK: %hlsl.lerp = call <4 x float> @llvm.spv.lerp.v4f32(<4 x float> %splat.splat, <4 x float> %1, <4 x float> %2)
+// CHECK: ret <4 x float> %hlsl.lerp
+float4 test_lerp_float4_splat(float p0, float4 p1) { return lerp(p0, p1, p1); }
+
+// CHECK: %conv = sitofp i32 %2 to float
+// CHECK: %splat.splatinsert = insertelement <2 x float> poison, float %conv, i64 0
+// CHECK: %splat.splat = shufflevector <2 x float> %splat.splatinsert, <2 x float> poison, <2 x i32> zeroinitializer
+// DXIL_CHECK: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %splat.splat)
+// SPIR_CHECK: %hlsl.lerp = call <2 x float> @llvm.spv.lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %splat.splat)
+// CHECK: ret <2 x float> %hlsl.lerp
+float2 test_lerp_float2_int_splat(float2 p0, int p1) {
+ return lerp(p0, p0, p1);
+}
+
+// CHECK: %conv = sitofp i32 %2 to float
+// CHECK: %splat.splatinsert = insertelement <3 x float> poison, float %conv, i64 0
+// CHECK: %splat.splat = shufflevector <3 x float> %splat.splatinsert, <3 x float> poison, <3 x i32> zeroinitializer
+// DXIL_CHECK: %hlsl.lerp = call <3 x float> @llvm.dx.lerp.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %splat.splat)
+// SPIR_CHECK: %hlsl.lerp = call <3 x float> @llvm.spv.lerp.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %splat.splat)
+// CHECK: ret <3 x float> %hlsl.lerp
+float3 test_lerp_float3_int_splat(float3 p0, int p1) {
+ return lerp(p0, p0, p1);
+}
diff --git a/clang/test/CodeGenHLSL/builtins/log.hlsl b/clang/test/CodeGenHLSL/builtins/log.hlsl
index ecbdf1e98ac346..5bca09189c0a8c 100644
--- a/clang/test/CodeGenHLSL/builtins/log.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/log.hlsl
@@ -1,41 +1,41 @@
-// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
-// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
-// RUN: --check-prefixes=CHECK,NATIVE_HALF
-// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
-// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
-
-// NATIVE_HALF: define noundef half @
-// NATIVE_HALF: call half @llvm.log.f16(
-// NO_HALF: define noundef float @"?test_log_half@@YA$halff@$halff@@Z"(
-// NO_HALF: call float @llvm.log.f32(
-half test_log_half(half p0) { return log(p0); }
-// NATIVE_HALF: define noundef <2 x half> @
-// NATIVE_HALF: call <2 x half> @llvm.log.v2f16
-// NO_HALF: define noundef <2 x float> @"?test_log_half2
-// NO_HALF: call <2 x float> @llvm.log.v2f32(
-half2 test_log_half2(half2 p0) { return log(p0); }
-// NATIVE_HALF: define noundef <3 x half> @
-// NATIVE_HALF: call <3 x half> @llvm.log.v3f16
-// NO_HALF: define noundef <3 x float> @"?test_log_half3
-// NO_HALF: call <3 x float> @llvm.log.v3f32(
-half3 test_log_half3(half3 p0) { return log(p0); }
-// NATIVE_HALF: define noundef <4 x half> @
-// NATIVE_HALF: call <4 x half> @llvm.log.v4f16
-// NO_HALF: define noundef <4 x float> @"?test_log_half4
-// NO_HALF: call <4 x float> @llvm.log.v4f32(
-half4 test_log_half4(half4 p0) { return log(p0); }
-
-// CHECK: define noundef float @"?test_log_float
-// CHECK: call float @llvm.log.f32(
-float test_log_float(float p0) { return log(p0); }
-// CHECK: define noundef <2 x float> @"?test_log_float2
-// CHECK: call <2 x float> @llvm.log.v2f32
-float2 test_log_float2(float2 p0) { return log(p0); }
-// CHECK: define noundef <3 x float> @"?test_log_float3
-// CHECK: call <3 x float> @llvm.log.v3f32
-float3 test_log_float3(float3 p0) { return log(p0); }
-// CHECK: define noundef <4 x float> @"?test_log_float4
-// CHECK: call <4 x float> @llvm.log.v4f32
-float4 test_log_float4(float4 p0) { return log(p0); }
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN: --check-prefixes=CHECK,NATIVE_HALF
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
+// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
+
+// NATIVE_HALF: define noundef half @
+// NATIVE_HALF: call half @llvm.log.f16(
+// NO_HALF: define noundef float @"?test_log_half@@YA$halff@$halff@@Z"(
+// NO_HALF: call float @llvm.log.f32(
+half test_log_half(half p0) { return log(p0); }
+// NATIVE_HALF: define noundef <2 x half> @
+// NATIVE_HALF: call <2 x half> @llvm.log.v2f16
+// NO_HALF: define noundef <2 x float> @"?test_log_half2
+// NO_HALF: call <2 x float> @llvm.log.v2f32(
+half2 test_log_half2(half2 p0) { return log(p0); }
+// NATIVE_HALF: define noundef <3 x half> @
+// NATIVE_HALF: call <3 x half> @llvm.log.v3f16
+// NO_HALF: define noundef <3 x float> @"?test_log_half3
+// NO_HALF: call <3 x float> @llvm.log.v3f32(
+half3 test_log_half3(half3 p0) { return log(p0); }
+// NATIVE_HALF: define noundef <4 x half> @
+// NATIVE_HALF: call <4 x half> @llvm.log.v4f16
+// NO_HALF: define noundef <4 x float> @"?test_log_half4
+// NO_HALF: call <4 x float> @llvm.log.v4f32(
+half4 test_log_half4(half4 p0) { return log(p0); }
+
+// CHECK: define noundef float @"?test_log_float
+// CHECK: call float @llvm.log.f32(
+float test_log_float(float p0) { return log(p0); }
+// CHECK: define noundef <2 x float> @"?test_log_float2
+// CHECK: call <2 x float> @llvm.log.v2f32
+float2 test_log_float2(float2 p0) { return log(p0); }
+// CHECK: define noundef <3 x float> @"?test_log_float3
+// CHECK: call <3 x float> @llvm.log.v3f32
+float3 test_log_float3(float3 p0) { return log(p0); }
+// CHECK: define noundef <4 x float> @"?test_log_float4
+// CHECK: call <4 x float> @llvm.log.v4f32
+float4 test_log_float4(float4 p0) { return log(p0); }
diff --git a/clang/test/CodeGenHLSL/builtins/log2.hlsl b/clang/test/CodeGenHLSL/builtins/log2.hlsl
index 9ed8185a06b04f..721e7b34569d87 100644
--- a/clang/test/CodeGenHLSL/builtins/log2.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/log2.hlsl
@@ -1,41 +1,41 @@
-// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
-// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
-// RUN: --check-prefixes=CHECK,NATIVE_HALF
-// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
-// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
-
-// NATIVE_HALF: define noundef half @
-// NATIVE_HALF: call half @llvm.log2.f16(
-// NO_HALF: define noundef float @"?test_log2_half
-// NO_HALF: call float @llvm.log2.f32(
-half test_log2_half(half p0) { return log2(p0); }
-// NATIVE_HALF: define noundef <2 x half> @
-// NATIVE_HALF: call <2 x half> @llvm.log2.v2f16
-// NO_HALF: define noundef <2 x float> @"?test_log2_half2
-// NO_HALF: call <2 x float> @llvm.log2.v2f32(
-half2 test_log2_half2(half2 p0) { return log2(p0); }
-// NATIVE_HALF: define noundef <3 x half> @
-// NATIVE_HALF: call <3 x half> @llvm.log2.v3f16
-// NO_HALF: define noundef <3 x float> @"?test_log2_half3
-// NO_HALF: call <3 x float> @llvm.log2.v3f32(
-half3 test_log2_half3(half3 p0) { return log2(p0); }
-// NATIVE_HALF: define noundef <4 x half> @
-// NATIVE_HALF: call <4 x half> @llvm.log2.v4f16
-// NO_HALF: define noundef <4 x float> @"?test_log2_half4
-// NO_HALF: call <4 x float> @llvm.log2.v4f32(
-half4 test_log2_half4(half4 p0) { return log2(p0); }
-
-// CHECK: define noundef float @"?test_log2_float
-// CHECK: call float @llvm.log2.f32(
-float test_log2_float(float p0) { return log2(p0); }
-// CHECK: define noundef <2 x float> @"?test_log2_float2
-// CHECK: call <2 x float> @llvm.log2.v2f32
-float2 test_log2_float2(float2 p0) { return log2(p0); }
-// CHECK: define noundef <3 x float> @"?test_log2_float3
-// CHECK: call <3 x float> @llvm.log2.v3f32
-float3 test_log2_float3(float3 p0) { return log2(p0); }
-// CHECK: define noundef <4 x float> @"?test_log2_float4
-// CHECK: call <4 x float> @llvm.log2.v4f32
-float4 test_log2_float4(float4 p0) { return log2(p0); }
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN: --check-prefixes=CHECK,NATIVE_HALF
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
+// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
+
+// NATIVE_HALF: define noundef half @
+// NATIVE_HALF: call half @llvm.log2.f16(
+// NO_HALF: define noundef float @"?test_log2_half
+// NO_HALF: call float @llvm.log2.f32(
+half test_log2_half(half p0) { return log2(p0); }
+// NATIVE_HALF: define noundef <2 x half> @
+// NATIVE_HALF: call <2 x half> @llvm.log2.v2f16
+// NO_HALF: define noundef <2 x float> @"?test_log2_half2
+// NO_HALF: call <2 x float> @llvm.log2.v2f32(
+half2 test_log2_half2(half2 p0) { return log2(p0); }
+// NATIVE_HALF: define noundef <3 x half> @
+// NATIVE_HALF: call <3 x half> @llvm.log2.v3f16
+// NO_HALF: define noundef <3 x float> @"?test_log2_half3
+// NO_HALF: call <3 x float> @llvm.log2.v3f32(
+half3 test_log2_half3(half3 p0) { return log2(p0); }
+// NATIVE_HALF: define noundef <4 x half> @
+// NATIVE_HALF: call <4 x half> @llvm.log2.v4f16
+// NO_HALF: define noundef <4 x float> @"?test_log2_half4
+// NO_HALF: call <4 x float> @llvm.log2.v4f32(
+half4 test_log2_half4(half4 p0) { return log2(p0); }
+
+// CHECK: define noundef float @"?test_log2_float
+// CHECK: call float @llvm.log2.f32(
+float test_log2_float(float p0) { return log2(p0); }
+// CHECK: define noundef <2 x float> @"?test_log2_float2
+// CHECK: call <2 x float> @llvm.log2.v2f32
+float2 test_log2_float2(float2 p0) { return log2(p0); }
+// CHECK: define noundef <3 x float> @"?test_log2_float3
+// CHECK: call <3 x float> @llvm.log2.v3f32
+float3 test_log2_float3(float3 p0) { return log2(p0); }
+// CHECK: define noundef <4 x float> @"?test_log2_float4
+// CHECK: call <4 x float> @llvm.log2.v4f32
+float4 test_log2_float4(float4 p0) { return log2(p0); }
diff --git a/clang/test/CodeGenHLSL/builtins/mad.hlsl b/clang/test/CodeGenHLSL/builtins/mad.hlsl
index bd4f38067a5c59..f6c1c6969293db 100644
--- a/clang/test/CodeGenHLSL/builtins/mad.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/mad.hlsl
@@ -1,247 +1,247 @@
-// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
-// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
-// RUN: --check-prefixes=CHECK,DXIL_CHECK,DXIL_NATIVE_HALF,NATIVE_HALF
-// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
-// RUN: -o - | FileCheck %s --check-prefixes=CHECK,DXIL_CHECK,NO_HALF
-
-// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
-// RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \
-// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
-// RUN: --check-prefixes=CHECK,NATIVE_HALF,SPIR_NATIVE_HALF,SPIR_CHECK
-// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
-// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
-// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF,SPIR_CHECK
-
-#ifdef __HLSL_ENABLE_16_BIT
-// DXIL_NATIVE_HALF: %dx.umad = call i16 @llvm.dx.umad.i16(i16 %0, i16 %1, i16 %2)
-// DXIL_NATIVE_HALF: ret i16 %dx.umad
-// SPIR_NATIVE_HALF: mul nuw i16 %{{.*}}, %{{.*}}
-// SPIR_NATIVE_HALF: add nuw i16 %{{.*}}, %{{.*}}
-uint16_t test_mad_uint16_t(uint16_t p0, uint16_t p1, uint16_t p2) { return mad(p0, p1, p2); }
-
-// DXIL_NATIVE_HALF: %dx.umad = call <2 x i16> @llvm.dx.umad.v2i16(<2 x i16> %0, <2 x i16> %1, <2 x i16> %2)
-// DXIL_NATIVE_HALF: ret <2 x i16> %dx.umad
-// SPIR_NATIVE_HALF: mul nuw <2 x i16> %{{.*}}, %{{.*}}
-// SPIR_NATIVE_HALF: add nuw <2 x i16> %{{.*}}, %{{.*}}
-uint16_t2 test_mad_uint16_t2(uint16_t2 p0, uint16_t2 p1, uint16_t2 p2) { return mad(p0, p1, p2); }
-
-// DXIL_NATIVE_HALF: %dx.umad = call <3 x i16> @llvm.dx.umad.v3i16(<3 x i16> %0, <3 x i16> %1, <3 x i16> %2)
-// DXIL_NATIVE_HALF: ret <3 x i16> %dx.umad
-// SPIR_NATIVE_HALF: mul nuw <3 x i16> %{{.*}}, %{{.*}}
-// SPIR_NATIVE_HALF: add nuw <3 x i16> %{{.*}}, %{{.*}}
-uint16_t3 test_mad_uint16_t3(uint16_t3 p0, uint16_t3 p1, uint16_t3 p2) { return mad(p0, p1, p2); }
-
-// DXIL_NATIVE_HALF: %dx.umad = call <4 x i16> @llvm.dx.umad.v4i16(<4 x i16> %0, <4 x i16> %1, <4 x i16> %2)
-// DXIL_NATIVE_HALF: ret <4 x i16> %dx.umad
-// SPIR_NATIVE_HALF: mul nuw <4 x i16> %{{.*}}, %{{.*}}
-// SPIR_NATIVE_HALF: add nuw <4 x i16> %{{.*}}, %{{.*}}
-uint16_t4 test_mad_uint16_t4(uint16_t4 p0, uint16_t4 p1, uint16_t4 p2) { return mad(p0, p1, p2); }
-
-// DXIL_NATIVE_HALF: %dx.imad = call i16 @llvm.dx.imad.i16(i16 %0, i16 %1, i16 %2)
-// DXIL_NATIVE_HALF: ret i16 %dx.imad
-// SPIR_NATIVE_HALF: mul nsw i16 %{{.*}}, %{{.*}}
-// SPIR_NATIVE_HALF: add nsw i16 %{{.*}}, %{{.*}}
-int16_t test_mad_int16_t(int16_t p0, int16_t p1, int16_t p2) { return mad(p0, p1, p2); }
-
-// DXIL_NATIVE_HALF: %dx.imad = call <2 x i16> @llvm.dx.imad.v2i16(<2 x i16> %0, <2 x i16> %1, <2 x i16> %2)
-// DXIL_NATIVE_HALF: ret <2 x i16> %dx.imad
-// SPIR_NATIVE_HALF: mul nsw <2 x i16> %{{.*}}, %{{.*}}
-// SPIR_NATIVE_HALF: add nsw <2 x i16> %{{.*}}, %{{.*}}
-int16_t2 test_mad_int16_t2(int16_t2 p0, int16_t2 p1, int16_t2 p2) { return mad(p0, p1, p2); }
-
-// DXIL_NATIVE_HALF: %dx.imad = call <3 x i16> @llvm.dx.imad.v3i16(<3 x i16> %0, <3 x i16> %1, <3 x i16> %2)
-// DXIL_NATIVE_HALF: ret <3 x i16> %dx.imad
-// SPIR_NATIVE_HALF: mul nsw <3 x i16> %{{.*}}, %{{.*}}
-// SPIR_NATIVE_HALF: add nsw <3 x i16> %{{.*}}, %{{.*}}
-int16_t3 test_mad_int16_t3(int16_t3 p0, int16_t3 p1, int16_t3 p2) { return mad(p0, p1, p2); }
-
-// DXIL_NATIVE_HALF: %dx.imad = call <4 x i16> @llvm.dx.imad.v4i16(<4 x i16> %0, <4 x i16> %1, <4 x i16> %2)
-// DXIL_NATIVE_HALF: ret <4 x i16> %dx.imad
-// SPIR_NATIVE_HALF: mul nsw <4 x i16> %{{.*}}, %{{.*}}
-// SPIR_NATIVE_HALF: add nsw <4 x i16> %{{.*}}, %{{.*}}
-int16_t4 test_mad_int16_t4(int16_t4 p0, int16_t4 p1, int16_t4 p2) { return mad(p0, p1, p2); }
-#endif // __HLSL_ENABLE_16_BIT
-
-// NATIVE_HALF: %hlsl.fmad = call half @llvm.fmuladd.f16(half %0, half %1, half %2)
-// NATIVE_HALF: ret half %hlsl.fmad
-// NO_HALF: %hlsl.fmad = call float @llvm.fmuladd.f32(float %0, float %1, float %2)
-// NO_HALF: ret float %hlsl.fmad
-half test_mad_half(half p0, half p1, half p2) { return mad(p0, p1, p2); }
-
-// NATIVE_HALF: %hlsl.fmad = call <2 x half> @llvm.fmuladd.v2f16(<2 x half> %0, <2 x half> %1, <2 x half> %2)
-// NATIVE_HALF: ret <2 x half> %hlsl.fmad
-// NO_HALF: %hlsl.fmad = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %2)
-// NO_HALF: ret <2 x float> %hlsl.fmad
-half2 test_mad_half2(half2 p0, half2 p1, half2 p2) { return mad(p0, p1, p2); }
-
-// NATIVE_HALF: %hlsl.fmad = call <3 x half> @llvm.fmuladd.v3f16(<3 x half> %0, <3 x half> %1, <3 x half> %2)
-// NATIVE_HALF: ret <3 x half> %hlsl.fmad
-// NO_HALF: %hlsl.fmad = call <3 x float> @llvm.fmuladd.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %2)
-// NO_HALF: ret <3 x float> %hlsl.fmad
-half3 test_mad_half3(half3 p0, half3 p1, half3 p2) { return mad(p0, p1, p2); }
-
-// NATIVE_HALF: %hlsl.fmad = call <4 x half> @llvm.fmuladd.v4f16(<4 x half> %0, <4 x half> %1, <4 x half> %2)
-// NATIVE_HALF: ret <4 x half> %hlsl.fmad
-// NO_HALF: %hlsl.fmad = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %0, <4 x float> %1, <4 x float> %2)
-// NO_HALF: ret <4 x float> %hlsl.fmad
-half4 test_mad_half4(half4 p0, half4 p1, half4 p2) { return mad(p0, p1, p2); }
-
-// CHECK: %hlsl.fmad = call float @llvm.fmuladd.f32(float %0, float %1, float %2)
-// CHECK: ret float %hlsl.fmad
-float test_mad_float(float p0, float p1, float p2) { return mad(p0, p1, p2); }
-
-// CHECK: %hlsl.fmad = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %2)
-// CHECK: ret <2 x float> %hlsl.fmad
-float2 test_mad_float2(float2 p0, float2 p1, float2 p2) { return mad(p0, p1, p2); }
-
-// CHECK: %hlsl.fmad = call <3 x float> @llvm.fmuladd.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %2)
-// CHECK: ret <3 x float> %hlsl.fmad
-float3 test_mad_float3(float3 p0, float3 p1, float3 p2) { return mad(p0, p1, p2); }
-
-// CHECK: %hlsl.fmad = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %0, <4 x float> %1, <4 x float> %2)
-// CHECK: ret <4 x float> %hlsl.fmad
-float4 test_mad_float4(float4 p0, float4 p1, float4 p2) { return mad(p0, p1, p2); }
-
-// CHECK: %hlsl.fmad = call double @llvm.fmuladd.f64(double %0, double %1, double %2)
-// CHECK: ret double %hlsl.fmad
-double test_mad_double(double p0, double p1, double p2) { return mad(p0, p1, p2); }
-
-// CHECK: %hlsl.fmad = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %0, <2 x double> %1, <2 x double> %2)
-// CHECK: ret <2 x double> %hlsl.fmad
-double2 test_mad_double2(double2 p0, double2 p1, double2 p2) { return mad(p0, p1, p2); }
-
-// CHECK: %hlsl.fmad = call <3 x double> @llvm.fmuladd.v3f64(<3 x double> %0, <3 x double> %1, <3 x double> %2)
-// CHECK: ret <3 x double> %hlsl.fmad
-double3 test_mad_double3(double3 p0, double3 p1, double3 p2) { return mad(p0, p1, p2); }
-
-// CHECK: %hlsl.fmad = call <4 x double> @llvm.fmuladd.v4f64(<4 x double> %0, <4 x double> %1, <4 x double> %2)
-// CHECK: ret <4 x double> %hlsl.fmad
-double4 test_mad_double4(double4 p0, double4 p1, double4 p2) { return mad(p0, p1, p2); }
-
-// DXIL_CHECK: %dx.imad = call i32 @llvm.dx.imad.i32(i32 %0, i32 %1, i32 %2)
-// DXIL_CHECK: ret i32 %dx.imad
-// SPIR_CHECK: mul nsw i32 %{{.*}}, %{{.*}}
-// SPIR_CHECK: add nsw i32 %{{.*}}, %{{.*}}
-int test_mad_int(int p0, int p1, int p2) { return mad(p0, p1, p2); }
-
-// DXIL_CHECK: %dx.imad = call <2 x i32> @llvm.dx.imad.v2i32(<2 x i32> %0, <2 x i32> %1, <2 x i32> %2)
-// DXIL_CHECK: ret <2 x i32> %dx.imad
-// SPIR_CHECK: mul nsw <2 x i32> %{{.*}}, %{{.*}}
-// SPIR_CHECK: add nsw <2 x i32> %{{.*}}, %{{.*}}
-int2 test_mad_int2(int2 p0, int2 p1, int2 p2) { return mad(p0, p1, p2); }
-
-// DXIL_CHECK: %dx.imad = call <3 x i32> @llvm.dx.imad.v3i32(<3 x i32> %0, <3 x i32> %1, <3 x i32> %2)
-// DXIL_CHECK: ret <3 x i32> %dx.imad
-// SPIR_CHECK: mul nsw <3 x i32> %{{.*}}, %{{.*}}
-// SPIR_CHECK: add nsw <3 x i32> %{{.*}}, %{{.*}}
-int3 test_mad_int3(int3 p0, int3 p1, int3 p2) { return mad(p0, p1, p2); }
-
-// DXIL_CHECK: %dx.imad = call <4 x i32> @llvm.dx.imad.v4i32(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2)
-// DXIL_CHECK: ret <4 x i32> %dx.imad
-// SPIR_CHECK: mul nsw <4 x i32> %{{.*}}, %{{.*}}
-// SPIR_CHECK: add nsw <4 x i32> %{{.*}}, %{{.*}}
-int4 test_mad_int4(int4 p0, int4 p1, int4 p2) { return mad(p0, p1, p2); }
-
-// DXIL_CHECK: %dx.imad = call i64 @llvm.dx.imad.i64(i64 %0, i64 %1, i64 %2)
-// DXIL_CHECK: ret i64 %dx.imad
-// SPIR_CHECK: mul nsw i64 %{{.*}}, %{{.*}}
-// SPIR_CHECK: add nsw i64 %{{.*}}, %{{.*}}
-int64_t test_mad_int64_t(int64_t p0, int64_t p1, int64_t p2) { return mad(p0, p1, p2); }
-
-// DXIL_CHECK: %dx.imad = call <2 x i64> @llvm.dx.imad.v2i64(<2 x i64> %0, <2 x i64> %1, <2 x i64> %2)
-// DXIL_CHECK: ret <2 x i64> %dx.imad
-// SPIR_CHECK: mul nsw <2 x i64> %{{.*}}, %{{.*}}
-// SPIR_CHECK: add nsw <2 x i64> %{{.*}}, %{{.*}}
-int64_t2 test_mad_int64_t2(int64_t2 p0, int64_t2 p1, int64_t2 p2) { return mad(p0, p1, p2); }
-
-// DXIL_CHECK: %dx.imad = call <3 x i64> @llvm.dx.imad.v3i64(<3 x i64> %0, <3 x i64> %1, <3 x i64> %2)
-// DXIL_CHECK: ret <3 x i64> %dx.imad
-// SPIR_CHECK: mul nsw <3 x i64> %{{.*}}, %{{.*}}
-// SPIR_CHECK: add nsw <3 x i64> %{{.*}}, %{{.*}}
-int64_t3 test_mad_int64_t3(int64_t3 p0, int64_t3 p1, int64_t3 p2) { return mad(p0, p1, p2); }
-
-// DXIL_CHECK: %dx.imad = call <4 x i64> @llvm.dx.imad.v4i64(<4 x i64> %0, <4 x i64> %1, <4 x i64> %2)
-// DXIL_CHECK: ret <4 x i64> %dx.imad
-// SPIR_CHECK: mul nsw <4 x i64> %{{.*}}, %{{.*}}
-// SPIR_CHECK: add nsw <4 x i64> %{{.*}}, %{{.*}}
-int64_t4 test_mad_int64_t4(int64_t4 p0, int64_t4 p1, int64_t4 p2) { return mad(p0, p1, p2); }
-
-// DXIL_CHECK: %dx.umad = call i32 @llvm.dx.umad.i32(i32 %0, i32 %1, i32 %2)
-// DXIL_CHECK: ret i32 %dx.umad
-// SPIR_CHECK: mul nuw i32 %{{.*}}, %{{.*}}
-// SPIR_CHECK: add nuw i32 %{{.*}}, %{{.*}}
-uint test_mad_uint(uint p0, uint p1, uint p2) { return mad(p0, p1, p2); }
-
-// DXIL_CHECK: %dx.umad = call <2 x i32> @llvm.dx.umad.v2i32(<2 x i32> %0, <2 x i32> %1, <2 x i32> %2)
-// DXIL_CHECK: ret <2 x i32> %dx.umad
-// SPIR_CHECK: mul nuw <2 x i32> %{{.*}}, %{{.*}}
-// SPIR_CHECK: add nuw <2 x i32> %{{.*}}, %{{.*}}
-uint2 test_mad_uint2(uint2 p0, uint2 p1, uint2 p2) { return mad(p0, p1, p2); }
-
-// DXIL_CHECK: %dx.umad = call <3 x i32> @llvm.dx.umad.v3i32(<3 x i32> %0, <3 x i32> %1, <3 x i32> %2)
-// DXIL_CHECK: ret <3 x i32> %dx.umad
-// SPIR_CHECK: mul nuw <3 x i32> %{{.*}}, %{{.*}}
-// SPIR_CHECK: add nuw <3 x i32> %{{.*}}, %{{.*}}
-uint3 test_mad_uint3(uint3 p0, uint3 p1, uint3 p2) { return mad(p0, p1, p2); }
-
-// DXIL_CHECK: %dx.umad = call <4 x i32> @llvm.dx.umad.v4i32(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2)
-// DXIL_CHECK: ret <4 x i32> %dx.umad
-// SPIR_CHECK: mul nuw <4 x i32> %{{.*}}, %{{.*}}
-// SPIR_CHECK: add nuw <4 x i32> %{{.*}}, %{{.*}}
-uint4 test_mad_uint4(uint4 p0, uint4 p1, uint4 p2) { return mad(p0, p1, p2); }
-
-// DXIL_CHECK: %dx.umad = call i64 @llvm.dx.umad.i64(i64 %0, i64 %1, i64 %2)
-// DXIL_CHECK: ret i64 %dx.umad
-// SPIR_CHECK: mul nuw i64 %{{.*}}, %{{.*}}
-// SPIR_CHECK: add nuw i64 %{{.*}}, %{{.*}}
-uint64_t test_mad_uint64_t(uint64_t p0, uint64_t p1, uint64_t p2) { return mad(p0, p1, p2); }
-
-// DXIL_CHECK: %dx.umad = call <2 x i64> @llvm.dx.umad.v2i64(<2 x i64> %0, <2 x i64> %1, <2 x i64> %2)
-// DXIL_CHECK: ret <2 x i64> %dx.umad
-// SPIR_CHECK: mul nuw <2 x i64> %{{.*}}, %{{.*}}
-// SPIR_CHECK: add nuw <2 x i64> %{{.*}}, %{{.*}}
-uint64_t2 test_mad_uint64_t2(uint64_t2 p0, uint64_t2 p1, uint64_t2 p2) { return mad(p0, p1, p2); }
-
-// DXIL_CHECK: %dx.umad = call <3 x i64> @llvm.dx.umad.v3i64(<3 x i64> %0, <3 x i64> %1, <3 x i64> %2)
-// DXIL_CHECK: ret <3 x i64> %dx.umad
-// SPIR_CHECK: mul nuw <3 x i64> %{{.*}}, %{{.*}}
-// SPIR_CHECK: add nuw <3 x i64> %{{.*}}, %{{.*}}
-uint64_t3 test_mad_uint64_t3(uint64_t3 p0, uint64_t3 p1, uint64_t3 p2) { return mad(p0, p1, p2); }
-
-// DXIL_CHECK: %dx.umad = call <4 x i64> @llvm.dx.umad.v4i64(<4 x i64> %0, <4 x i64> %1, <4 x i64> %2)
-// DXIL_CHECK: ret <4 x i64> %dx.umad
-// SPIR_CHECK: mul nuw <4 x i64> %{{.*}}, %{{.*}}
-// SPIR_CHECK: add nuw <4 x i64> %{{.*}}, %{{.*}}
-uint64_t4 test_mad_uint64_t4(uint64_t4 p0, uint64_t4 p1, uint64_t4 p2) { return mad(p0, p1, p2); }
-
-// CHECK: %hlsl.fmad = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %splat.splat, <2 x float> %1, <2 x float> %2)
-// CHECK: ret <2 x float> %hlsl.fmad
-float2 test_mad_float2_splat(float p0, float2 p1, float2 p2) { return mad(p0, p1, p2); }
-
-// CHECK: %hlsl.fmad = call <3 x float> @llvm.fmuladd.v3f32(<3 x float> %splat.splat, <3 x float> %1, <3 x float> %2)
-// CHECK: ret <3 x float> %hlsl.fmad
-float3 test_mad_float3_splat(float p0, float3 p1, float3 p2) { return mad(p0, p1, p2); }
-
-// CHECK: %hlsl.fmad = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %splat.splat, <4 x float> %1, <4 x float> %2)
-// CHECK: ret <4 x float> %hlsl.fmad
-float4 test_mad_float4_splat(float p0, float4 p1, float4 p2) { return mad(p0, p1, p2); }
-
-// CHECK: %conv = sitofp i32 %2 to float
-// CHECK: %splat.splatinsert = insertelement <2 x float> poison, float %conv, i64 0
-// CHECK: %splat.splat = shufflevector <2 x float> %splat.splatinsert, <2 x float> poison, <2 x i32> zeroinitializer
-// CHECK: %hlsl.fmad = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %splat.splat)
-// CHECK: ret <2 x float> %hlsl.fmad
-float2 test_mad_float2_int_splat(float2 p0, float2 p1, int p2) {
- return mad(p0, p1, p2);
-}
-
-// CHECK: %conv = sitofp i32 %2 to float
-// CHECK: %splat.splatinsert = insertelement <3 x float> poison, float %conv, i64 0
-// CHECK: %splat.splat = shufflevector <3 x float> %splat.splatinsert, <3 x float> poison, <3 x i32> zeroinitializer
-// CHECK: %hlsl.fmad = call <3 x float> @llvm.fmuladd.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %splat.splat)
-// CHECK: ret <3 x float> %hlsl.fmad
-float3 test_mad_float3_int_splat(float3 p0, float3 p1, int p2) {
- return mad(p0, p1, p2);
-}
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN: --check-prefixes=CHECK,DXIL_CHECK,DXIL_NATIVE_HALF,NATIVE_HALF
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
+// RUN: -o - | FileCheck %s --check-prefixes=CHECK,DXIL_CHECK,NO_HALF
+
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \
+// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN: --check-prefixes=CHECK,NATIVE_HALF,SPIR_NATIVE_HALF,SPIR_CHECK
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
+// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF,SPIR_CHECK
+
+#ifdef __HLSL_ENABLE_16_BIT
+// DXIL_NATIVE_HALF: %dx.umad = call i16 @llvm.dx.umad.i16(i16 %0, i16 %1, i16 %2)
+// DXIL_NATIVE_HALF: ret i16 %dx.umad
+// SPIR_NATIVE_HALF: mul nuw i16 %{{.*}}, %{{.*}}
+// SPIR_NATIVE_HALF: add nuw i16 %{{.*}}, %{{.*}}
+uint16_t test_mad_uint16_t(uint16_t p0, uint16_t p1, uint16_t p2) { return mad(p0, p1, p2); }
+
+// DXIL_NATIVE_HALF: %dx.umad = call <2 x i16> @llvm.dx.umad.v2i16(<2 x i16> %0, <2 x i16> %1, <2 x i16> %2)
+// DXIL_NATIVE_HALF: ret <2 x i16> %dx.umad
+// SPIR_NATIVE_HALF: mul nuw <2 x i16> %{{.*}}, %{{.*}}
+// SPIR_NATIVE_HALF: add nuw <2 x i16> %{{.*}}, %{{.*}}
+uint16_t2 test_mad_uint16_t2(uint16_t2 p0, uint16_t2 p1, uint16_t2 p2) { return mad(p0, p1, p2); }
+
+// DXIL_NATIVE_HALF: %dx.umad = call <3 x i16> @llvm.dx.umad.v3i16(<3 x i16> %0, <3 x i16> %1, <3 x i16> %2)
+// DXIL_NATIVE_HALF: ret <3 x i16> %dx.umad
+// SPIR_NATIVE_HALF: mul nuw <3 x i16> %{{.*}}, %{{.*}}
+// SPIR_NATIVE_HALF: add nuw <3 x i16> %{{.*}}, %{{.*}}
+uint16_t3 test_mad_uint16_t3(uint16_t3 p0, uint16_t3 p1, uint16_t3 p2) { return mad(p0, p1, p2); }
+
+// DXIL_NATIVE_HALF: %dx.umad = call <4 x i16> @llvm.dx.umad.v4i16(<4 x i16> %0, <4 x i16> %1, <4 x i16> %2)
+// DXIL_NATIVE_HALF: ret <4 x i16> %dx.umad
+// SPIR_NATIVE_HALF: mul nuw <4 x i16> %{{.*}}, %{{.*}}
+// SPIR_NATIVE_HALF: add nuw <4 x i16> %{{.*}}, %{{.*}}
+uint16_t4 test_mad_uint16_t4(uint16_t4 p0, uint16_t4 p1, uint16_t4 p2) { return mad(p0, p1, p2); }
+
+// DXIL_NATIVE_HALF: %dx.imad = call i16 @llvm.dx.imad.i16(i16 %0, i16 %1, i16 %2)
+// DXIL_NATIVE_HALF: ret i16 %dx.imad
+// SPIR_NATIVE_HALF: mul nsw i16 %{{.*}}, %{{.*}}
+// SPIR_NATIVE_HALF: add nsw i16 %{{.*}}, %{{.*}}
+int16_t test_mad_int16_t(int16_t p0, int16_t p1, int16_t p2) { return mad(p0, p1, p2); }
+
+// DXIL_NATIVE_HALF: %dx.imad = call <2 x i16> @llvm.dx.imad.v2i16(<2 x i16> %0, <2 x i16> %1, <2 x i16> %2)
+// DXIL_NATIVE_HALF: ret <2 x i16> %dx.imad
+// SPIR_NATIVE_HALF: mul nsw <2 x i16> %{{.*}}, %{{.*}}
+// SPIR_NATIVE_HALF: add nsw <2 x i16> %{{.*}}, %{{.*}}
+int16_t2 test_mad_int16_t2(int16_t2 p0, int16_t2 p1, int16_t2 p2) { return mad(p0, p1, p2); }
+
+// DXIL_NATIVE_HALF: %dx.imad = call <3 x i16> @llvm.dx.imad.v3i16(<3 x i16> %0, <3 x i16> %1, <3 x i16> %2)
+// DXIL_NATIVE_HALF: ret <3 x i16> %dx.imad
+// SPIR_NATIVE_HALF: mul nsw <3 x i16> %{{.*}}, %{{.*}}
+// SPIR_NATIVE_HALF: add nsw <3 x i16> %{{.*}}, %{{.*}}
+int16_t3 test_mad_int16_t3(int16_t3 p0, int16_t3 p1, int16_t3 p2) { return mad(p0, p1, p2); }
+
+// DXIL_NATIVE_HALF: %dx.imad = call <4 x i16> @llvm.dx.imad.v4i16(<4 x i16> %0, <4 x i16> %1, <4 x i16> %2)
+// DXIL_NATIVE_HALF: ret <4 x i16> %dx.imad
+// SPIR_NATIVE_HALF: mul nsw <4 x i16> %{{.*}}, %{{.*}}
+// SPIR_NATIVE_HALF: add nsw <4 x i16> %{{.*}}, %{{.*}}
+int16_t4 test_mad_int16_t4(int16_t4 p0, int16_t4 p1, int16_t4 p2) { return mad(p0, p1, p2); }
+#endif // __HLSL_ENABLE_16_BIT
+
+// NATIVE_HALF: %hlsl.fmad = call half @llvm.fmuladd.f16(half %0, half %1, half %2)
+// NATIVE_HALF: ret half %hlsl.fmad
+// NO_HALF: %hlsl.fmad = call float @llvm.fmuladd.f32(float %0, float %1, float %2)
+// NO_HALF: ret float %hlsl.fmad
+half test_mad_half(half p0, half p1, half p2) { return mad(p0, p1, p2); }
+
+// NATIVE_HALF: %hlsl.fmad = call <2 x half> @llvm.fmuladd.v2f16(<2 x half> %0, <2 x half> %1, <2 x half> %2)
+// NATIVE_HALF: ret <2 x half> %hlsl.fmad
+// NO_HALF: %hlsl.fmad = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %2)
+// NO_HALF: ret <2 x float> %hlsl.fmad
+half2 test_mad_half2(half2 p0, half2 p1, half2 p2) { return mad(p0, p1, p2); }
+
+// NATIVE_HALF: %hlsl.fmad = call <3 x half> @llvm.fmuladd.v3f16(<3 x half> %0, <3 x half> %1, <3 x half> %2)
+// NATIVE_HALF: ret <3 x half> %hlsl.fmad
+// NO_HALF: %hlsl.fmad = call <3 x float> @llvm.fmuladd.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %2)
+// NO_HALF: ret <3 x float> %hlsl.fmad
+half3 test_mad_half3(half3 p0, half3 p1, half3 p2) { return mad(p0, p1, p2); }
+
+// NATIVE_HALF: %hlsl.fmad = call <4 x half> @llvm.fmuladd.v4f16(<4 x half> %0, <4 x half> %1, <4 x half> %2)
+// NATIVE_HALF: ret <4 x half> %hlsl.fmad
+// NO_HALF: %hlsl.fmad = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %0, <4 x float> %1, <4 x float> %2)
+// NO_HALF: ret <4 x float> %hlsl.fmad
+half4 test_mad_half4(half4 p0, half4 p1, half4 p2) { return mad(p0, p1, p2); }
+
+// CHECK: %hlsl.fmad = call float @llvm.fmuladd.f32(float %0, float %1, float %2)
+// CHECK: ret float %hlsl.fmad
+float test_mad_float(float p0, float p1, float p2) { return mad(p0, p1, p2); }
+
+// CHECK: %hlsl.fmad = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %2)
+// CHECK: ret <2 x float> %hlsl.fmad
+float2 test_mad_float2(float2 p0, float2 p1, float2 p2) { return mad(p0, p1, p2); }
+
+// CHECK: %hlsl.fmad = call <3 x float> @llvm.fmuladd.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %2)
+// CHECK: ret <3 x float> %hlsl.fmad
+float3 test_mad_float3(float3 p0, float3 p1, float3 p2) { return mad(p0, p1, p2); }
+
+// CHECK: %hlsl.fmad = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %0, <4 x float> %1, <4 x float> %2)
+// CHECK: ret <4 x float> %hlsl.fmad
+float4 test_mad_float4(float4 p0, float4 p1, float4 p2) { return mad(p0, p1, p2); }
+
+// CHECK: %hlsl.fmad = call double @llvm.fmuladd.f64(double %0, double %1, double %2)
+// CHECK: ret double %hlsl.fmad
+double test_mad_double(double p0, double p1, double p2) { return mad(p0, p1, p2); }
+
+// CHECK: %hlsl.fmad = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %0, <2 x double> %1, <2 x double> %2)
+// CHECK: ret <2 x double> %hlsl.fmad
+double2 test_mad_double2(double2 p0, double2 p1, double2 p2) { return mad(p0, p1, p2); }
+
+// CHECK: %hlsl.fmad = call <3 x double> @llvm.fmuladd.v3f64(<3 x double> %0, <3 x double> %1, <3 x double> %2)
+// CHECK: ret <3 x double> %hlsl.fmad
+double3 test_mad_double3(double3 p0, double3 p1, double3 p2) { return mad(p0, p1, p2); }
+
+// CHECK: %hlsl.fmad = call <4 x double> @llvm.fmuladd.v4f64(<4 x double> %0, <4 x double> %1, <4 x double> %2)
+// CHECK: ret <4 x double> %hlsl.fmad
+double4 test_mad_double4(double4 p0, double4 p1, double4 p2) { return mad(p0, p1, p2); }
+
+// DXIL_CHECK: %dx.imad = call i32 @llvm.dx.imad.i32(i32 %0, i32 %1, i32 %2)
+// DXIL_CHECK: ret i32 %dx.imad
+// SPIR_CHECK: mul nsw i32 %{{.*}}, %{{.*}}
+// SPIR_CHECK: add nsw i32 %{{.*}}, %{{.*}}
+int test_mad_int(int p0, int p1, int p2) { return mad(p0, p1, p2); }
+
+// DXIL_CHECK: %dx.imad = call <2 x i32> @llvm.dx.imad.v2i32(<2 x i32> %0, <2 x i32> %1, <2 x i32> %2)
+// DXIL_CHECK: ret <2 x i32> %dx.imad
+// SPIR_CHECK: mul nsw <2 x i32> %{{.*}}, %{{.*}}
+// SPIR_CHECK: add nsw <2 x i32> %{{.*}}, %{{.*}}
+int2 test_mad_int2(int2 p0, int2 p1, int2 p2) { return mad(p0, p1, p2); }
+
+// DXIL_CHECK: %dx.imad = call <3 x i32> @llvm.dx.imad.v3i32(<3 x i32> %0, <3 x i32> %1, <3 x i32> %2)
+// DXIL_CHECK: ret <3 x i32> %dx.imad
+// SPIR_CHECK: mul nsw <3 x i32> %{{.*}}, %{{.*}}
+// SPIR_CHECK: add nsw <3 x i32> %{{.*}}, %{{.*}}
+int3 test_mad_int3(int3 p0, int3 p1, int3 p2) { return mad(p0, p1, p2); }
+
+// DXIL_CHECK: %dx.imad = call <4 x i32> @llvm.dx.imad.v4i32(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2)
+// DXIL_CHECK: ret <4 x i32> %dx.imad
+// SPIR_CHECK: mul nsw <4 x i32> %{{.*}}, %{{.*}}
+// SPIR_CHECK: add nsw <4 x i32> %{{.*}}, %{{.*}}
+int4 test_mad_int4(int4 p0, int4 p1, int4 p2) { return mad(p0, p1, p2); }
+
+// DXIL_CHECK: %dx.imad = call i64 @llvm.dx.imad.i64(i64 %0, i64 %1, i64 %2)
+// DXIL_CHECK: ret i64 %dx.imad
+// SPIR_CHECK: mul nsw i64 %{{.*}}, %{{.*}}
+// SPIR_CHECK: add nsw i64 %{{.*}}, %{{.*}}
+int64_t test_mad_int64_t(int64_t p0, int64_t p1, int64_t p2) { return mad(p0, p1, p2); }
+
+// DXIL_CHECK: %dx.imad = call <2 x i64> @llvm.dx.imad.v2i64(<2 x i64> %0, <2 x i64> %1, <2 x i64> %2)
+// DXIL_CHECK: ret <2 x i64> %dx.imad
+// SPIR_CHECK: mul nsw <2 x i64> %{{.*}}, %{{.*}}
+// SPIR_CHECK: add nsw <2 x i64> %{{.*}}, %{{.*}}
+int64_t2 test_mad_int64_t2(int64_t2 p0, int64_t2 p1, int64_t2 p2) { return mad(p0, p1, p2); }
+
+// DXIL_CHECK: %dx.imad = call <3 x i64> @llvm.dx.imad.v3i64(<3 x i64> %0, <3 x i64> %1, <3 x i64> %2)
+// DXIL_CHECK: ret <3 x i64> %dx.imad
+// SPIR_CHECK: mul nsw <3 x i64> %{{.*}}, %{{.*}}
+// SPIR_CHECK: add nsw <3 x i64> %{{.*}}, %{{.*}}
+int64_t3 test_mad_int64_t3(int64_t3 p0, int64_t3 p1, int64_t3 p2) { return mad(p0, p1, p2); }
+
+// DXIL_CHECK: %dx.imad = call <4 x i64> @llvm.dx.imad.v4i64(<4 x i64> %0, <4 x i64> %1, <4 x i64> %2)
+// DXIL_CHECK: ret <4 x i64> %dx.imad
+// SPIR_CHECK: mul nsw <4 x i64> %{{.*}}, %{{.*}}
+// SPIR_CHECK: add nsw <4 x i64> %{{.*}}, %{{.*}}
+int64_t4 test_mad_int64_t4(int64_t4 p0, int64_t4 p1, int64_t4 p2) { return mad(p0, p1, p2); }
+
+// DXIL_CHECK: %dx.umad = call i32 @llvm.dx.umad.i32(i32 %0, i32 %1, i32 %2)
+// DXIL_CHECK: ret i32 %dx.umad
+// SPIR_CHECK: mul nuw i32 %{{.*}}, %{{.*}}
+// SPIR_CHECK: add nuw i32 %{{.*}}, %{{.*}}
+uint test_mad_uint(uint p0, uint p1, uint p2) { return mad(p0, p1, p2); }
+
+// DXIL_CHECK: %dx.umad = call <2 x i32> @llvm.dx.umad.v2i32(<2 x i32> %0, <2 x i32> %1, <2 x i32> %2)
+// DXIL_CHECK: ret <2 x i32> %dx.umad
+// SPIR_CHECK: mul nuw <2 x i32> %{{.*}}, %{{.*}}
+// SPIR_CHECK: add nuw <2 x i32> %{{.*}}, %{{.*}}
+uint2 test_mad_uint2(uint2 p0, uint2 p1, uint2 p2) { return mad(p0, p1, p2); }
+
+// DXIL_CHECK: %dx.umad = call <3 x i32> @llvm.dx.umad.v3i32(<3 x i32> %0, <3 x i32> %1, <3 x i32> %2)
+// DXIL_CHECK: ret <3 x i32> %dx.umad
+// SPIR_CHECK: mul nuw <3 x i32> %{{.*}}, %{{.*}}
+// SPIR_CHECK: add nuw <3 x i32> %{{.*}}, %{{.*}}
+uint3 test_mad_uint3(uint3 p0, uint3 p1, uint3 p2) { return mad(p0, p1, p2); }
+
+// DXIL_CHECK: %dx.umad = call <4 x i32> @llvm.dx.umad.v4i32(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2)
+// DXIL_CHECK: ret <4 x i32> %dx.umad
+// SPIR_CHECK: mul nuw <4 x i32> %{{.*}}, %{{.*}}
+// SPIR_CHECK: add nuw <4 x i32> %{{.*}}, %{{.*}}
+uint4 test_mad_uint4(uint4 p0, uint4 p1, uint4 p2) { return mad(p0, p1, p2); }
+
+// DXIL_CHECK: %dx.umad = call i64 @llvm.dx.umad.i64(i64 %0, i64 %1, i64 %2)
+// DXIL_CHECK: ret i64 %dx.umad
+// SPIR_CHECK: mul nuw i64 %{{.*}}, %{{.*}}
+// SPIR_CHECK: add nuw i64 %{{.*}}, %{{.*}}
+uint64_t test_mad_uint64_t(uint64_t p0, uint64_t p1, uint64_t p2) { return mad(p0, p1, p2); }
+
+// DXIL_CHECK: %dx.umad = call <2 x i64> @llvm.dx.umad.v2i64(<2 x i64> %0, <2 x i64> %1, <2 x i64> %2)
+// DXIL_CHECK: ret <2 x i64> %dx.umad
+// SPIR_CHECK: mul nuw <2 x i64> %{{.*}}, %{{.*}}
+// SPIR_CHECK: add nuw <2 x i64> %{{.*}}, %{{.*}}
+uint64_t2 test_mad_uint64_t2(uint64_t2 p0, uint64_t2 p1, uint64_t2 p2) { return mad(p0, p1, p2); }
+
+// DXIL_CHECK: %dx.umad = call <3 x i64> @llvm.dx.umad.v3i64(<3 x i64> %0, <3 x i64> %1, <3 x i64> %2)
+// DXIL_CHECK: ret <3 x i64> %dx.umad
+// SPIR_CHECK: mul nuw <3 x i64> %{{.*}}, %{{.*}}
+// SPIR_CHECK: add nuw <3 x i64> %{{.*}}, %{{.*}}
+uint64_t3 test_mad_uint64_t3(uint64_t3 p0, uint64_t3 p1, uint64_t3 p2) { return mad(p0, p1, p2); }
+
+// DXIL_CHECK: %dx.umad = call <4 x i64> @llvm.dx.umad.v4i64(<4 x i64> %0, <4 x i64> %1, <4 x i64> %2)
+// DXIL_CHECK: ret <4 x i64> %dx.umad
+// SPIR_CHECK: mul nuw <4 x i64> %{{.*}}, %{{.*}}
+// SPIR_CHECK: add nuw <4 x i64> %{{.*}}, %{{.*}}
+uint64_t4 test_mad_uint64_t4(uint64_t4 p0, uint64_t4 p1, uint64_t4 p2) { return mad(p0, p1, p2); }
+
+// CHECK: %hlsl.fmad = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %splat.splat, <2 x float> %1, <2 x float> %2)
+// CHECK: ret <2 x float> %hlsl.fmad
+float2 test_mad_float2_splat(float p0, float2 p1, float2 p2) { return mad(p0, p1, p2); }
+
+// CHECK: %hlsl.fmad = call <3 x float> @llvm.fmuladd.v3f32(<3 x float> %splat.splat, <3 x float> %1, <3 x float> %2)
+// CHECK: ret <3 x float> %hlsl.fmad
+float3 test_mad_float3_splat(float p0, float3 p1, float3 p2) { return mad(p0, p1, p2); }
+
+// CHECK: %hlsl.fmad = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %splat.splat, <4 x float> %1, <4 x float> %2)
+// CHECK: ret <4 x float> %hlsl.fmad
+float4 test_mad_float4_splat(float p0, float4 p1, float4 p2) { return mad(p0, p1, p2); }
+
+// CHECK: %conv = sitofp i32 %2 to float
+// CHECK: %splat.splatinsert = insertelement <2 x float> poison, float %conv, i64 0
+// CHECK: %splat.splat = shufflevector <2 x float> %splat.splatinsert, <2 x float> poison, <2 x i32> zeroinitializer
+// CHECK: %hlsl.fmad = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %splat.splat)
+// CHECK: ret <2 x float> %hlsl.fmad
+float2 test_mad_float2_int_splat(float2 p0, float2 p1, int p2) {
+ return mad(p0, p1, p2);
+}
+
+// CHECK: %conv = sitofp i32 %2 to float
+// CHECK: %splat.splatinsert = insertelement <3 x float> poison, float %conv, i64 0
+// CHECK: %splat.splat = shufflevector <3 x float> %splat.splatinsert, <3 x float> poison, <3 x i32> zeroinitializer
+// CHECK: %hlsl.fmad = call <3 x float> @llvm.fmuladd.v3f32(<3 x float> %0, <3 x float> %1, <3 x float> %splat.splat)
+// CHECK: ret <3 x float> %hlsl.fmad
+float3 test_mad_float3_int_splat(float3 p0, float3 p1, int p2) {
+ return mad(p0, p1, p2);
+}
diff --git a/clang/test/CodeGenHLSL/builtins/max.hlsl b/clang/test/CodeGenHLSL/builtins/max.hlsl
index 272d1e8a10bd7c..981bb913ecb89a 100644
--- a/clang/test/CodeGenHLSL/builtins/max.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/max.hlsl
@@ -1,134 +1,134 @@
-// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
-// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
-// RUN: --check-prefixes=CHECK,NATIVE_HALF
-// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
-// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
-
-#ifdef __HLSL_ENABLE_16_BIT
-// NATIVE_HALF: define noundef i16 @
-// NATIVE_HALF: call i16 @llvm.smax.i16(
-int16_t test_max_short(int16_t p0, int16_t p1) { return max(p0, p1); }
-// NATIVE_HALF: define noundef <2 x i16> @
-// NATIVE_HALF: call <2 x i16> @llvm.smax.v2i16(
-int16_t2 test_max_short2(int16_t2 p0, int16_t2 p1) { return max(p0, p1); }
-// NATIVE_HALF: define noundef <3 x i16> @
-// NATIVE_HALF: call <3 x i16> @llvm.smax.v3i16
-int16_t3 test_max_short3(int16_t3 p0, int16_t3 p1) { return max(p0, p1); }
-// NATIVE_HALF: define noundef <4 x i16> @
-// NATIVE_HALF: call <4 x i16> @llvm.smax.v4i16
-int16_t4 test_max_short4(int16_t4 p0, int16_t4 p1) { return max(p0, p1); }
-
-// NATIVE_HALF: define noundef i16 @
-// NATIVE_HALF: call i16 @llvm.umax.i16(
-uint16_t test_max_ushort(uint16_t p0, uint16_t p1) { return max(p0, p1); }
-// NATIVE_HALF: define noundef <2 x i16> @
-// NATIVE_HALF: call <2 x i16> @llvm.umax.v2i16
-uint16_t2 test_max_ushort2(uint16_t2 p0, uint16_t2 p1) { return max(p0, p1); }
-// NATIVE_HALF: define noundef <3 x i16> @
-// NATIVE_HALF: call <3 x i16> @llvm.umax.v3i16
-uint16_t3 test_max_ushort3(uint16_t3 p0, uint16_t3 p1) { return max(p0, p1); }
-// NATIVE_HALF: define noundef <4 x i16> @
-// NATIVE_HALF: call <4 x i16> @llvm.umax.v4i16
-uint16_t4 test_max_ushort4(uint16_t4 p0, uint16_t4 p1) { return max(p0, p1); }
-#endif
-
-// CHECK: define noundef i32 @
-// CHECK: call i32 @llvm.smax.i32(
-int test_max_int(int p0, int p1) { return max(p0, p1); }
-// CHECK: define noundef <2 x i32> @
-// CHECK: call <2 x i32> @llvm.smax.v2i32
-int2 test_max_int2(int2 p0, int2 p1) { return max(p0, p1); }
-// CHECK: define noundef <3 x i32> @
-// CHECK: call <3 x i32> @llvm.smax.v3i32
-int3 test_max_int3(int3 p0, int3 p1) { return max(p0, p1); }
-// CHECK: define noundef <4 x i32> @
-// CHECK: call <4 x i32> @llvm.smax.v4i32
-int4 test_max_int4(int4 p0, int4 p1) { return max(p0, p1); }
-
-// CHECK: define noundef i32 @
-// CHECK: call i32 @llvm.umax.i32(
-int test_max_uint(uint p0, uint p1) { return max(p0, p1); }
-// CHECK: define noundef <2 x i32> @
-// CHECK: call <2 x i32> @llvm.umax.v2i32
-uint2 test_max_uint2(uint2 p0, uint2 p1) { return max(p0, p1); }
-// CHECK: define noundef <3 x i32> @
-// CHECK: call <3 x i32> @llvm.umax.v3i32
-uint3 test_max_uint3(uint3 p0, uint3 p1) { return max(p0, p1); }
-// CHECK: define noundef <4 x i32> @
-// CHECK: call <4 x i32> @llvm.umax.v4i32
-uint4 test_max_uint4(uint4 p0, uint4 p1) { return max(p0, p1); }
-
-// CHECK: define noundef i64 @
-// CHECK: call i64 @llvm.smax.i64(
-int64_t test_max_long(int64_t p0, int64_t p1) { return max(p0, p1); }
-// CHECK: define noundef <2 x i64> @
-// CHECK: call <2 x i64> @llvm.smax.v2i64
-int64_t2 test_max_long2(int64_t2 p0, int64_t2 p1) { return max(p0, p1); }
-// CHECK: define noundef <3 x i64> @
-// CHECK: call <3 x i64> @llvm.smax.v3i64
-int64_t3 test_max_long3(int64_t3 p0, int64_t3 p1) { return max(p0, p1); }
-// CHECK: define noundef <4 x i64> @
-// CHECK: call <4 x i64> @llvm.smax.v4i64
-int64_t4 test_max_long4(int64_t4 p0, int64_t4 p1) { return max(p0, p1); }
-
-// CHECK: define noundef i64 @
-// CHECK: call i64 @llvm.umax.i64(
-uint64_t test_max_long(uint64_t p0, uint64_t p1) { return max(p0, p1); }
-// CHECK: define noundef <2 x i64> @
-// CHECK: call <2 x i64> @llvm.umax.v2i64
-uint64_t2 test_max_long2(uint64_t2 p0, uint64_t2 p1) { return max(p0, p1); }
-// CHECK: define noundef <3 x i64> @
-// CHECK: call <3 x i64> @llvm.umax.v3i64
-uint64_t3 test_max_long3(uint64_t3 p0, uint64_t3 p1) { return max(p0, p1); }
-// CHECK: define noundef <4 x i64> @
-// CHECK: call <4 x i64> @llvm.umax.v4i64
-uint64_t4 test_max_long4(uint64_t4 p0, uint64_t4 p1) { return max(p0, p1); }
-
-// NATIVE_HALF: define noundef half @
-// NATIVE_HALF: call half @llvm.maxnum.f16(
-// NO_HALF: define noundef float @"?test_max_half
-// NO_HALF: call float @llvm.maxnum.f32(
-half test_max_half(half p0, half p1) { return max(p0, p1); }
-// NATIVE_HALF: define noundef <2 x half> @
-// NATIVE_HALF: call <2 x half> @llvm.maxnum.v2f16
-// NO_HALF: define noundef <2 x float> @"?test_max_half2
-// NO_HALF: call <2 x float> @llvm.maxnum.v2f32(
-half2 test_max_half2(half2 p0, half2 p1) { return max(p0, p1); }
-// NATIVE_HALF: define noundef <3 x half> @
-// NATIVE_HALF: call <3 x half> @llvm.maxnum.v3f16
-// NO_HALF: define noundef <3 x float> @"?test_max_half3
-// NO_HALF: call <3 x float> @llvm.maxnum.v3f32(
-half3 test_max_half3(half3 p0, half3 p1) { return max(p0, p1); }
-// NATIVE_HALF: define noundef <4 x half> @
-// NATIVE_HALF: call <4 x half> @llvm.maxnum.v4f16
-// NO_HALF: define noundef <4 x float> @"?test_max_half4
-// NO_HALF: call <4 x float> @llvm.maxnum.v4f32(
-half4 test_max_half4(half4 p0, half4 p1) { return max(p0, p1); }
-
-// CHECK: define noundef float @"?test_max_float
-// CHECK: call float @llvm.maxnum.f32(
-float test_max_float(float p0, float p1) { return max(p0, p1); }
-// CHECK: define noundef <2 x float> @"?test_max_float2
-// CHECK: call <2 x float> @llvm.maxnum.v2f32
-float2 test_max_float2(float2 p0, float2 p1) { return max(p0, p1); }
-// CHECK: define noundef <3 x float> @"?test_max_float3
-// CHECK: call <3 x float> @llvm.maxnum.v3f32
-float3 test_max_float3(float3 p0, float3 p1) { return max(p0, p1); }
-// CHECK: define noundef <4 x float> @"?test_max_float4
-// CHECK: call <4 x float> @llvm.maxnum.v4f32
-float4 test_max_float4(float4 p0, float4 p1) { return max(p0, p1); }
-
-// CHECK: define noundef double @
-// CHECK: call double @llvm.maxnum.f64(
-double test_max_double(double p0, double p1) { return max(p0, p1); }
-// CHECK: define noundef <2 x double> @
-// CHECK: call <2 x double> @llvm.maxnum.v2f64
-double2 test_max_double2(double2 p0, double2 p1) { return max(p0, p1); }
-// CHECK: define noundef <3 x double> @
-// CHECK: call <3 x double> @llvm.maxnum.v3f64
-double3 test_max_double3(double3 p0, double3 p1) { return max(p0, p1); }
-// CHECK: define noundef <4 x double> @
-// CHECK: call <4 x double> @llvm.maxnum.v4f64
-double4 test_max_double4(double4 p0, double4 p1) { return max(p0, p1); }
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN: --check-prefixes=CHECK,NATIVE_HALF
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
+// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
+
+#ifdef __HLSL_ENABLE_16_BIT
+// NATIVE_HALF: define noundef i16 @
+// NATIVE_HALF: call i16 @llvm.smax.i16(
+int16_t test_max_short(int16_t p0, int16_t p1) { return max(p0, p1); }
+// NATIVE_HALF: define noundef <2 x i16> @
+// NATIVE_HALF: call <2 x i16> @llvm.smax.v2i16(
+int16_t2 test_max_short2(int16_t2 p0, int16_t2 p1) { return max(p0, p1); }
+// NATIVE_HALF: define noundef <3 x i16> @
+// NATIVE_HALF: call <3 x i16> @llvm.smax.v3i16
+int16_t3 test_max_short3(int16_t3 p0, int16_t3 p1) { return max(p0, p1); }
+// NATIVE_HALF: define noundef <4 x i16> @
+// NATIVE_HALF: call <4 x i16> @llvm.smax.v4i16
+int16_t4 test_max_short4(int16_t4 p0, int16_t4 p1) { return max(p0, p1); }
+
+// NATIVE_HALF: define noundef i16 @
+// NATIVE_HALF: call i16 @llvm.umax.i16(
+uint16_t test_max_ushort(uint16_t p0, uint16_t p1) { return max(p0, p1); }
+// NATIVE_HALF: define noundef <2 x i16> @
+// NATIVE_HALF: call <2 x i16> @llvm.umax.v2i16
+uint16_t2 test_max_ushort2(uint16_t2 p0, uint16_t2 p1) { return max(p0, p1); }
+// NATIVE_HALF: define noundef <3 x i16> @
+// NATIVE_HALF: call <3 x i16> @llvm.umax.v3i16
+uint16_t3 test_max_ushort3(uint16_t3 p0, uint16_t3 p1) { return max(p0, p1); }
+// NATIVE_HALF: define noundef <4 x i16> @
+// NATIVE_HALF: call <4 x i16> @llvm.umax.v4i16
+uint16_t4 test_max_ushort4(uint16_t4 p0, uint16_t4 p1) { return max(p0, p1); }
+#endif
+
+// CHECK: define noundef i32 @
+// CHECK: call i32 @llvm.smax.i32(
+int test_max_int(int p0, int p1) { return max(p0, p1); }
+// CHECK: define noundef <2 x i32> @
+// CHECK: call <2 x i32> @llvm.smax.v2i32
+int2 test_max_int2(int2 p0, int2 p1) { return max(p0, p1); }
+// CHECK: define noundef <3 x i32> @
+// CHECK: call <3 x i32> @llvm.smax.v3i32
+int3 test_max_int3(int3 p0, int3 p1) { return max(p0, p1); }
+// CHECK: define noundef <4 x i32> @
+// CHECK: call <4 x i32> @llvm.smax.v4i32
+int4 test_max_int4(int4 p0, int4 p1) { return max(p0, p1); }
+
+// CHECK: define noundef i32 @
+// CHECK: call i32 @llvm.umax.i32(
+int test_max_uint(uint p0, uint p1) { return max(p0, p1); }
+// CHECK: define noundef <2 x i32> @
+// CHECK: call <2 x i32> @llvm.umax.v2i32
+uint2 test_max_uint2(uint2 p0, uint2 p1) { return max(p0, p1); }
+// CHECK: define noundef <3 x i32> @
+// CHECK: call <3 x i32> @llvm.umax.v3i32
+uint3 test_max_uint3(uint3 p0, uint3 p1) { return max(p0, p1); }
+// CHECK: define noundef <4 x i32> @
+// CHECK: call <4 x i32> @llvm.umax.v4i32
+uint4 test_max_uint4(uint4 p0, uint4 p1) { return max(p0, p1); }
+
+// CHECK: define noundef i64 @
+// CHECK: call i64 @llvm.smax.i64(
+int64_t test_max_long(int64_t p0, int64_t p1) { return max(p0, p1); }
+// CHECK: define noundef <2 x i64> @
+// CHECK: call <2 x i64> @llvm.smax.v2i64
+int64_t2 test_max_long2(int64_t2 p0, int64_t2 p1) { return max(p0, p1); }
+// CHECK: define noundef <3 x i64> @
+// CHECK: call <3 x i64> @llvm.smax.v3i64
+int64_t3 test_max_long3(int64_t3 p0, int64_t3 p1) { return max(p0, p1); }
+// CHECK: define noundef <4 x i64> @
+// CHECK: call <4 x i64> @llvm.smax.v4i64
+int64_t4 test_max_long4(int64_t4 p0, int64_t4 p1) { return max(p0, p1); }
+
+// CHECK: define noundef i64 @
+// CHECK: call i64 @llvm.umax.i64(
+uint64_t test_max_long(uint64_t p0, uint64_t p1) { return max(p0, p1); }
+// CHECK: define noundef <2 x i64> @
+// CHECK: call <2 x i64> @llvm.umax.v2i64
+uint64_t2 test_max_long2(uint64_t2 p0, uint64_t2 p1) { return max(p0, p1); }
+// CHECK: define noundef <3 x i64> @
+// CHECK: call <3 x i64> @llvm.umax.v3i64
+uint64_t3 test_max_long3(uint64_t3 p0, uint64_t3 p1) { return max(p0, p1); }
+// CHECK: define noundef <4 x i64> @
+// CHECK: call <4 x i64> @llvm.umax.v4i64
+uint64_t4 test_max_long4(uint64_t4 p0, uint64_t4 p1) { return max(p0, p1); }
+
+// NATIVE_HALF: define noundef half @
+// NATIVE_HALF: call half @llvm.maxnum.f16(
+// NO_HALF: define noundef float @"?test_max_half
+// NO_HALF: call float @llvm.maxnum.f32(
+half test_max_half(half p0, half p1) { return max(p0, p1); }
+// NATIVE_HALF: define noundef <2 x half> @
+// NATIVE_HALF: call <2 x half> @llvm.maxnum.v2f16
+// NO_HALF: define noundef <2 x float> @"?test_max_half2
+// NO_HALF: call <2 x float> @llvm.maxnum.v2f32(
+half2 test_max_half2(half2 p0, half2 p1) { return max(p0, p1); }
+// NATIVE_HALF: define noundef <3 x half> @
+// NATIVE_HALF: call <3 x half> @llvm.maxnum.v3f16
+// NO_HALF: define noundef <3 x float> @"?test_max_half3
+// NO_HALF: call <3 x float> @llvm.maxnum.v3f32(
+half3 test_max_half3(half3 p0, half3 p1) { return max(p0, p1); }
+// NATIVE_HALF: define noundef <4 x half> @
+// NATIVE_HALF: call <4 x half> @llvm.maxnum.v4f16
+// NO_HALF: define noundef <4 x float> @"?test_max_half4
+// NO_HALF: call <4 x float> @llvm.maxnum.v4f32(
+half4 test_max_half4(half4 p0, half4 p1) { return max(p0, p1); }
+
+// CHECK: define noundef float @"?test_max_float
+// CHECK: call float @llvm.maxnum.f32(
+float test_max_float(float p0, float p1) { return max(p0, p1); }
+// CHECK: define noundef <2 x float> @"?test_max_float2
+// CHECK: call <2 x float> @llvm.maxnum.v2f32
+float2 test_max_float2(float2 p0, float2 p1) { return max(p0, p1); }
+// CHECK: define noundef <3 x float> @"?test_max_float3
+// CHECK: call <3 x float> @llvm.maxnum.v3f32
+float3 test_max_float3(float3 p0, float3 p1) { return max(p0, p1); }
+// CHECK: define noundef <4 x float> @"?test_max_float4
+// CHECK: call <4 x float> @llvm.maxnum.v4f32
+float4 test_max_float4(float4 p0, float4 p1) { return max(p0, p1); }
+
+// CHECK: define noundef double @
+// CHECK: call double @llvm.maxnum.f64(
+double test_max_double(double p0, double p1) { return max(p0, p1); }
+// CHECK: define noundef <2 x double> @
+// CHECK: call <2 x double> @llvm.maxnum.v2f64
+double2 test_max_double2(double2 p0, double2 p1) { return max(p0, p1); }
+// CHECK: define noundef <3 x double> @
+// CHECK: call <3 x double> @llvm.maxnum.v3f64
+double3 test_max_double3(double3 p0, double3 p1) { return max(p0, p1); }
+// CHECK: define noundef <4 x double> @
+// CHECK: call <4 x double> @llvm.maxnum.v4f64
+double4 test_max_double4(double4 p0, double4 p1) { return max(p0, p1); }
diff --git a/clang/test/CodeGenHLSL/builtins/pow.hlsl b/clang/test/CodeGenHLSL/builtins/pow.hlsl
index 057cd7215aa5af..8118984d7da7a3 100644
--- a/clang/test/CodeGenHLSL/builtins/pow.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/pow.hlsl
@@ -1,41 +1,41 @@
-// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
-// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
-// RUN: --check-prefixes=CHECK,NATIVE_HALF
-// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
-// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
-
-// NATIVE_HALF: define noundef half @
-// NATIVE_HALF: call half @llvm.pow.f16(
-// NO_HALF: define noundef float @"?test_pow_half
-// NO_HALF: call float @llvm.pow.f32(
-half test_pow_half(half p0, half p1) { return pow(p0, p1); }
-// NATIVE_HALF: define noundef <2 x half> @"?test_pow_half2
-// NATIVE_HALF: call <2 x half> @llvm.pow.v2f16
-// NO_HALF: define noundef <2 x float> @"?test_pow_half2
-// NO_HALF: call <2 x float> @llvm.pow.v2f32(
-half2 test_pow_half2(half2 p0, half2 p1) { return pow(p0, p1); }
-// NATIVE_HALF: define noundef <3 x half> @"?test_pow_half3
-// NATIVE_HALF: call <3 x half> @llvm.pow.v3f16
-// NO_HALF: define noundef <3 x float> @"?test_pow_half3
-// NO_HALF: call <3 x float> @llvm.pow.v3f32(
-half3 test_pow_half3(half3 p0, half3 p1) { return pow(p0, p1); }
-// NATIVE_HALF: define noundef <4 x half> @"?test_pow_half4
-// NATIVE_HALF: call <4 x half> @llvm.pow.v4f16
-// NO_HALF: define noundef <4 x float> @"?test_pow_half4
-// NO_HALF: call <4 x float> @llvm.pow.v4f32(
-half4 test_pow_half4(half4 p0, half4 p1) { return pow(p0, p1); }
-
-// CHECK: define noundef float @"?test_pow_float
-// CHECK: call float @llvm.pow.f32(
-float test_pow_float(float p0, float p1) { return pow(p0, p1); }
-// CHECK: define noundef <2 x float> @"?test_pow_float2
-// CHECK: call <2 x float> @llvm.pow.v2f32
-float2 test_pow_float2(float2 p0, float2 p1) { return pow(p0, p1); }
-// CHECK: define noundef <3 x float> @"?test_pow_float3
-// CHECK: call <3 x float> @llvm.pow.v3f32
-float3 test_pow_float3(float3 p0, float3 p1) { return pow(p0, p1); }
-// CHECK: define noundef <4 x float> @"?test_pow_float4
-// CHECK: call <4 x float> @llvm.pow.v4f32
-float4 test_pow_float4(float4 p0, float4 p1) { return pow(p0, p1); }
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN: --check-prefixes=CHECK,NATIVE_HALF
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
+// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
+
+// NATIVE_HALF: define noundef half @
+// NATIVE_HALF: call half @llvm.pow.f16(
+// NO_HALF: define noundef float @"?test_pow_half
+// NO_HALF: call float @llvm.pow.f32(
+half test_pow_half(half p0, half p1) { return pow(p0, p1); }
+// NATIVE_HALF: define noundef <2 x half> @"?test_pow_half2
+// NATIVE_HALF: call <2 x half> @llvm.pow.v2f16
+// NO_HALF: define noundef <2 x float> @"?test_pow_half2
+// NO_HALF: call <2 x float> @llvm.pow.v2f32(
+half2 test_pow_half2(half2 p0, half2 p1) { return pow(p0, p1); }
+// NATIVE_HALF: define noundef <3 x half> @"?test_pow_half3
+// NATIVE_HALF: call <3 x half> @llvm.pow.v3f16
+// NO_HALF: define noundef <3 x float> @"?test_pow_half3
+// NO_HALF: call <3 x float> @llvm.pow.v3f32(
+half3 test_pow_half3(half3 p0, half3 p1) { return pow(p0, p1); }
+// NATIVE_HALF: define noundef <4 x half> @"?test_pow_half4
+// NATIVE_HALF: call <4 x half> @llvm.pow.v4f16
+// NO_HALF: define noundef <4 x float> @"?test_pow_half4
+// NO_HALF: call <4 x float> @llvm.pow.v4f32(
+half4 test_pow_half4(half4 p0, half4 p1) { return pow(p0, p1); }
+
+// CHECK: define noundef float @"?test_pow_float
+// CHECK: call float @llvm.pow.f32(
+float test_pow_float(float p0, float p1) { return pow(p0, p1); }
+// CHECK: define noundef <2 x float> @"?test_pow_float2
+// CHECK: call <2 x float> @llvm.pow.v2f32
+float2 test_pow_float2(float2 p0, float2 p1) { return pow(p0, p1); }
+// CHECK: define noundef <3 x float> @"?test_pow_float3
+// CHECK: call <3 x float> @llvm.pow.v3f32
+float3 test_pow_float3(float3 p0, float3 p1) { return pow(p0, p1); }
+// CHECK: define noundef <4 x float> @"?test_pow_float4
+// CHECK: call <4 x float> @llvm.pow.v4f32
+float4 test_pow_float4(float4 p0, float4 p1) { return pow(p0, p1); }
diff --git a/clang/test/CodeGenHLSL/builtins/reversebits.hlsl b/clang/test/CodeGenHLSL/builtins/reversebits.hlsl
index a319417e97a436..fe137b9cae4e98 100644
--- a/clang/test/CodeGenHLSL/builtins/reversebits.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/reversebits.hlsl
@@ -1,80 +1,80 @@
-// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
-// RUN: -emit-llvm -disable-llvm-passes -O3 -o - | FileCheck %s
-
-#ifdef __HLSL_ENABLE_16_BIT
-// CHECK: define noundef i16 @
-// CHECK: call i16 @llvm.bitreverse.i16(
-uint16_t test_bitreverse_ushort(uint16_t p0)
-{
- return reversebits(p0);
-}
-// CHECK: define noundef <2 x i16> @
-// CHECK: call <2 x i16> @llvm.bitreverse.v2i16
-uint16_t2 test_bitreverse_ushort2(uint16_t2 p0)
-{
- return reversebits(p0);
-}
-// CHECK: define noundef <3 x i16> @
-// CHECK: call <3 x i16> @llvm.bitreverse.v3i16
-uint16_t3 test_bitreverse_ushort3(uint16_t3 p0)
-{
- return reversebits(p0);
-}
-// CHECK: define noundef <4 x i16> @
-// CHECK: call <4 x i16> @llvm.bitreverse.v4i16
-uint16_t4 test_bitreverse_ushort4(uint16_t4 p0)
-{
- return reversebits(p0);
-}
-#endif
-
-// CHECK: define noundef i32 @
-// CHECK: call i32 @llvm.bitreverse.i32(
-int test_bitreverse_uint(uint p0)
-{
- return reversebits(p0);
-}
-// CHECK: define noundef <2 x i32> @
-// CHECK: call <2 x i32> @llvm.bitreverse.v2i32
-uint2 test_bitreverse_uint2(uint2 p0)
-{
- return reversebits(p0);
-}
-// CHECK: define noundef <3 x i32> @
-// CHECK: call <3 x i32> @llvm.bitreverse.v3i32
-uint3 test_bitreverse_uint3(uint3 p0)
-{
- return reversebits(p0);
-}
-// CHECK: define noundef <4 x i32> @
-// CHECK: call <4 x i32> @llvm.bitreverse.v4i32
-uint4 test_bitreverse_uint4(uint4 p0)
-{
- return reversebits(p0);
-}
-
-// CHECK: define noundef i64 @
-// CHECK: call i64 @llvm.bitreverse.i64(
-uint64_t test_bitreverse_long(uint64_t p0)
-{
- return reversebits(p0);
-}
-// CHECK: define noundef <2 x i64> @
-// CHECK: call <2 x i64> @llvm.bitreverse.v2i64
-uint64_t2 test_bitreverse_long2(uint64_t2 p0)
-{
- return reversebits(p0);
-}
-// CHECK: define noundef <3 x i64> @
-// CHECK: call <3 x i64> @llvm.bitreverse.v3i64
-uint64_t3 test_bitreverse_long3(uint64_t3 p0)
-{
- return reversebits(p0);
-}
-// CHECK: define noundef <4 x i64> @
-// CHECK: call <4 x i64> @llvm.bitreverse.v4i64
-uint64_t4 test_bitreverse_long4(uint64_t4 p0)
-{
- return reversebits(p0);
-}
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -disable-llvm-passes -O3 -o - | FileCheck %s
+
+#ifdef __HLSL_ENABLE_16_BIT
+// CHECK: define noundef i16 @
+// CHECK: call i16 @llvm.bitreverse.i16(
+uint16_t test_bitreverse_ushort(uint16_t p0)
+{
+ return reversebits(p0);
+}
+// CHECK: define noundef <2 x i16> @
+// CHECK: call <2 x i16> @llvm.bitreverse.v2i16
+uint16_t2 test_bitreverse_ushort2(uint16_t2 p0)
+{
+ return reversebits(p0);
+}
+// CHECK: define noundef <3 x i16> @
+// CHECK: call <3 x i16> @llvm.bitreverse.v3i16
+uint16_t3 test_bitreverse_ushort3(uint16_t3 p0)
+{
+ return reversebits(p0);
+}
+// CHECK: define noundef <4 x i16> @
+// CHECK: call <4 x i16> @llvm.bitreverse.v4i16
+uint16_t4 test_bitreverse_ushort4(uint16_t4 p0)
+{
+ return reversebits(p0);
+}
+#endif
+
+// CHECK: define noundef i32 @
+// CHECK: call i32 @llvm.bitreverse.i32(
+int test_bitreverse_uint(uint p0)
+{
+ return reversebits(p0);
+}
+// CHECK: define noundef <2 x i32> @
+// CHECK: call <2 x i32> @llvm.bitreverse.v2i32
+uint2 test_bitreverse_uint2(uint2 p0)
+{
+ return reversebits(p0);
+}
+// CHECK: define noundef <3 x i32> @
+// CHECK: call <3 x i32> @llvm.bitreverse.v3i32
+uint3 test_bitreverse_uint3(uint3 p0)
+{
+ return reversebits(p0);
+}
+// CHECK: define noundef <4 x i32> @
+// CHECK: call <4 x i32> @llvm.bitreverse.v4i32
+uint4 test_bitreverse_uint4(uint4 p0)
+{
+ return reversebits(p0);
+}
+
+// CHECK: define noundef i64 @
+// CHECK: call i64 @llvm.bitreverse.i64(
+uint64_t test_bitreverse_long(uint64_t p0)
+{
+ return reversebits(p0);
+}
+// CHECK: define noundef <2 x i64> @
+// CHECK: call <2 x i64> @llvm.bitreverse.v2i64
+uint64_t2 test_bitreverse_long2(uint64_t2 p0)
+{
+ return reversebits(p0);
+}
+// CHECK: define noundef <3 x i64> @
+// CHECK: call <3 x i64> @llvm.bitreverse.v3i64
+uint64_t3 test_bitreverse_long3(uint64_t3 p0)
+{
+ return reversebits(p0);
+}
+// CHECK: define noundef <4 x i64> @
+// CHECK: call <4 x i64> @llvm.bitreverse.v4i64
+uint64_t4 test_bitreverse_long4(uint64_t4 p0)
+{
+ return reversebits(p0);
+}
diff --git a/clang/test/CodeGenHLSL/builtins/sin.hlsl b/clang/test/CodeGenHLSL/builtins/sin.hlsl
index ffb52214913886..83e8a5be39d069 100644
--- a/clang/test/CodeGenHLSL/builtins/sin.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/sin.hlsl
@@ -1,41 +1,41 @@
-// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
-// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
-// RUN: --check-prefixes=CHECK,NATIVE_HALF
-// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
-// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
-
-// NATIVE_HALF: define noundef half @
-// NATIVE_HALF: call half @llvm.sin.f16(
-// NO_HALF: define noundef float @"?test_sin_half@@YA$halff@$halff@@Z"(
-// NO_HALF: call float @llvm.sin.f32(
-half test_sin_half(half p0) { return sin(p0); }
-// NATIVE_HALF: define noundef <2 x half> @
-// NATIVE_HALF: call <2 x half> @llvm.sin.v2f16
-// NO_HALF: define noundef <2 x float> @"?test_sin_half2
-// NO_HALF: call <2 x float> @llvm.sin.v2f32(
-half2 test_sin_half2(half2 p0) { return sin(p0); }
-// NATIVE_HALF: define noundef <3 x half> @
-// NATIVE_HALF: call <3 x half> @llvm.sin.v3f16
-// NO_HALF: define noundef <3 x float> @"?test_sin_half3
-// NO_HALF: call <3 x float> @llvm.sin.v3f32(
-half3 test_sin_half3(half3 p0) { return sin(p0); }
-// NATIVE_HALF: define noundef <4 x half> @
-// NATIVE_HALF: call <4 x half> @llvm.sin.v4f16
-// NO_HALF: define noundef <4 x float> @"?test_sin_half4
-// NO_HALF: call <4 x float> @llvm.sin.v4f32(
-half4 test_sin_half4(half4 p0) { return sin(p0); }
-
-// CHECK: define noundef float @
-// CHECK: call float @llvm.sin.f32(
-float test_sin_float(float p0) { return sin(p0); }
-// CHECK: define noundef <2 x float> @
-// CHECK: call <2 x float> @llvm.sin.v2f32
-float2 test_sin_float2(float2 p0) { return sin(p0); }
-// CHECK: define noundef <3 x float> @
-// CHECK: call <3 x float> @llvm.sin.v3f32
-float3 test_sin_float3(float3 p0) { return sin(p0); }
-// CHECK: define noundef <4 x float> @
-// CHECK: call <4 x float> @llvm.sin.v4f32
-float4 test_sin_float4(float4 p0) { return sin(p0); }
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN: --check-prefixes=CHECK,NATIVE_HALF
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
+// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
+
+// NATIVE_HALF: define noundef half @
+// NATIVE_HALF: call half @llvm.sin.f16(
+// NO_HALF: define noundef float @"?test_sin_half@@YA$halff@$halff@@Z"(
+// NO_HALF: call float @llvm.sin.f32(
+half test_sin_half(half p0) { return sin(p0); }
+// NATIVE_HALF: define noundef <2 x half> @
+// NATIVE_HALF: call <2 x half> @llvm.sin.v2f16
+// NO_HALF: define noundef <2 x float> @"?test_sin_half2
+// NO_HALF: call <2 x float> @llvm.sin.v2f32(
+half2 test_sin_half2(half2 p0) { return sin(p0); }
+// NATIVE_HALF: define noundef <3 x half> @
+// NATIVE_HALF: call <3 x half> @llvm.sin.v3f16
+// NO_HALF: define noundef <3 x float> @"?test_sin_half3
+// NO_HALF: call <3 x float> @llvm.sin.v3f32(
+half3 test_sin_half3(half3 p0) { return sin(p0); }
+// NATIVE_HALF: define noundef <4 x half> @
+// NATIVE_HALF: call <4 x half> @llvm.sin.v4f16
+// NO_HALF: define noundef <4 x float> @"?test_sin_half4
+// NO_HALF: call <4 x float> @llvm.sin.v4f32(
+half4 test_sin_half4(half4 p0) { return sin(p0); }
+
+// CHECK: define noundef float @
+// CHECK: call float @llvm.sin.f32(
+float test_sin_float(float p0) { return sin(p0); }
+// CHECK: define noundef <2 x float> @
+// CHECK: call <2 x float> @llvm.sin.v2f32
+float2 test_sin_float2(float2 p0) { return sin(p0); }
+// CHECK: define noundef <3 x float> @
+// CHECK: call <3 x float> @llvm.sin.v3f32
+float3 test_sin_float3(float3 p0) { return sin(p0); }
+// CHECK: define noundef <4 x float> @
+// CHECK: call <4 x float> @llvm.sin.v4f32
+float4 test_sin_float4(float4 p0) { return sin(p0); }
diff --git a/clang/test/CodeGenHLSL/builtins/trunc.hlsl b/clang/test/CodeGenHLSL/builtins/trunc.hlsl
index 6078aae5f873fe..ebe6fbc58c5052 100644
--- a/clang/test/CodeGenHLSL/builtins/trunc.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/trunc.hlsl
@@ -1,47 +1,47 @@
-// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
-// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
-// RUN: --check-prefixes=CHECK,NATIVE_HALF
-// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
-// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
-
-// NATIVE_HALF: define noundef half @"?test_trunc_half
-// NATIVE_HALF: call half @llvm.trunc.f16(
-// NO_HALF: define noundef float @"?test_trunc_half
-// NO_HALF: call float @llvm.trunc.f32(
-half test_trunc_half(half p0) { return trunc(p0); }
-
-// NATIVE_HALF: define noundef <2 x half> @"?test_trunc_half2
-// NATIVE_HALF: call <2 x half> @llvm.trunc.v2f16
-// NO_HALF: define noundef <2 x float> @"?test_trunc_half2
-// NO_HALF: call <2 x float> @llvm.trunc.v2f32(
-half2 test_trunc_half2(half2 p0) { return trunc(p0); }
-
-// NATIVE_HALF: define noundef <3 x half> @"?test_trunc_half3
-// NATIVE_HALF: call <3 x half> @llvm.trunc.v3f16
-// NO_HALF: define noundef <3 x float> @"?test_trunc_half3
-// NO_HALF: call <3 x float> @llvm.trunc.v3f32(
-half3 test_trunc_half3(half3 p0) { return trunc(p0); }
-
-// NATIVE_HALF: define noundef <4 x half> @"?test_trunc_half4
-// NATIVE_HALF: call <4 x half> @llvm.trunc.v4f16
-// NO_HALF: define noundef <4 x float> @"?test_trunc_half4
-// NO_HALF: call <4 x float> @llvm.trunc.v4f32(
-half4 test_trunc_half4(half4 p0) { return trunc(p0); }
-
-// CHECK: define noundef float @"?test_trunc_float
-// CHECK: call float @llvm.trunc.f32(
-float test_trunc_float(float p0) { return trunc(p0); }
-
-// CHECK: define noundef <2 x float> @"?test_trunc_float2
-// CHECK: call <2 x float> @llvm.trunc.v2f32
-float2 test_trunc_float2(float2 p0) { return trunc(p0); }
-
-// CHECK: define noundef <3 x float> @"?test_trunc_float3
-// CHECK: call <3 x float> @llvm.trunc.v3f32
-float3 test_trunc_float3(float3 p0) { return trunc(p0); }
-
-// CHECK: define noundef <4 x float> @"?test_trunc_float4
-// CHECK: call <4 x float> @llvm.trunc.v4f32
-float4 test_trunc_float4(float4 p0) { return trunc(p0); }
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN: --check-prefixes=CHECK,NATIVE_HALF
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
+// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
+
+// NATIVE_HALF: define noundef half @"?test_trunc_half
+// NATIVE_HALF: call half @llvm.trunc.f16(
+// NO_HALF: define noundef float @"?test_trunc_half
+// NO_HALF: call float @llvm.trunc.f32(
+half test_trunc_half(half p0) { return trunc(p0); }
+
+// NATIVE_HALF: define noundef <2 x half> @"?test_trunc_half2
+// NATIVE_HALF: call <2 x half> @llvm.trunc.v2f16
+// NO_HALF: define noundef <2 x float> @"?test_trunc_half2
+// NO_HALF: call <2 x float> @llvm.trunc.v2f32(
+half2 test_trunc_half2(half2 p0) { return trunc(p0); }
+
+// NATIVE_HALF: define noundef <3 x half> @"?test_trunc_half3
+// NATIVE_HALF: call <3 x half> @llvm.trunc.v3f16
+// NO_HALF: define noundef <3 x float> @"?test_trunc_half3
+// NO_HALF: call <3 x float> @llvm.trunc.v3f32(
+half3 test_trunc_half3(half3 p0) { return trunc(p0); }
+
+// NATIVE_HALF: define noundef <4 x half> @"?test_trunc_half4
+// NATIVE_HALF: call <4 x half> @llvm.trunc.v4f16
+// NO_HALF: define noundef <4 x float> @"?test_trunc_half4
+// NO_HALF: call <4 x float> @llvm.trunc.v4f32(
+half4 test_trunc_half4(half4 p0) { return trunc(p0); }
+
+// CHECK: define noundef float @"?test_trunc_float
+// CHECK: call float @llvm.trunc.f32(
+float test_trunc_float(float p0) { return trunc(p0); }
+
+// CHECK: define noundef <2 x float> @"?test_trunc_float2
+// CHECK: call <2 x float> @llvm.trunc.v2f32
+float2 test_trunc_float2(float2 p0) { return trunc(p0); }
+
+// CHECK: define noundef <3 x float> @"?test_trunc_float3
+// CHECK: call <3 x float> @llvm.trunc.v3f32
+float3 test_trunc_float3(float3 p0) { return trunc(p0); }
+
+// CHECK: define noundef <4 x float> @"?test_trunc_float4
+// CHECK: call <4 x float> @llvm.trunc.v4f32
+float4 test_trunc_float4(float4 p0) { return trunc(p0); }
diff --git a/clang/test/CodeGenHLSL/semantics/DispatchThreadID.hlsl b/clang/test/CodeGenHLSL/semantics/DispatchThreadID.hlsl
index 3efc36baa35b1a..2004a9d894a579 100644
--- a/clang/test/CodeGenHLSL/semantics/DispatchThreadID.hlsl
+++ b/clang/test/CodeGenHLSL/semantics/DispatchThreadID.hlsl
@@ -1,25 +1,25 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -finclude-default-header -disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-DXIL
-// RUN: %clang_cc1 -triple spirv-linux-vulkan-library -x hlsl -emit-llvm -finclude-default-header -disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-SPIRV
-
-// Make sure SV_DispatchThreadID translated into dx.thread.id.
-
-// CHECK: define void @foo()
-// CHECK-DXIL: %[[#ID:]] = call i32 @llvm.dx.thread.id(i32 0)
-// CHECK-SPIRV: %[[#ID:]] = call i32 @llvm.spv.thread.id(i32 0)
-// CHECK: call void @{{.*}}foo{{.*}}(i32 %[[#ID]])
-[shader("compute")]
-[numthreads(8,8,1)]
-void foo(uint Idx : SV_DispatchThreadID) {}
-
-// CHECK: define void @bar()
-// CHECK-DXIL: %[[#ID_X:]] = call i32 @llvm.dx.thread.id(i32 0)
-// CHECK-SPIRV: %[[#ID_X:]] = call i32 @llvm.spv.thread.id(i32 0)
-// CHECK: %[[#ID_X_:]] = insertelement <2 x i32> poison, i32 %[[#ID_X]], i64 0
-// CHECK-DXIL: %[[#ID_Y:]] = call i32 @llvm.dx.thread.id(i32 1)
-// CHECK-SPIRV: %[[#ID_Y:]] = call i32 @llvm.spv.thread.id(i32 1)
-// CHECK: %[[#ID_XY:]] = insertelement <2 x i32> %[[#ID_X_]], i32 %[[#ID_Y]], i64 1
-// CHECK-DXIL: call void @{{.*}}bar{{.*}}(<2 x i32> %[[#ID_XY]])
-[shader("compute")]
-[numthreads(8,8,1)]
-void bar(uint2 Idx : SV_DispatchThreadID) {}
-
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -finclude-default-header -disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-DXIL
+// RUN: %clang_cc1 -triple spirv-linux-vulkan-library -x hlsl -emit-llvm -finclude-default-header -disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-SPIRV
+
+// Make sure SV_DispatchThreadID translated into dx.thread.id.
+
+// CHECK: define void @foo()
+// CHECK-DXIL: %[[#ID:]] = call i32 @llvm.dx.thread.id(i32 0)
+// CHECK-SPIRV: %[[#ID:]] = call i32 @llvm.spv.thread.id(i32 0)
+// CHECK: call void @{{.*}}foo{{.*}}(i32 %[[#ID]])
+[shader("compute")]
+[numthreads(8,8,1)]
+void foo(uint Idx : SV_DispatchThreadID) {}
+
+// CHECK: define void @bar()
+// CHECK-DXIL: %[[#ID_X:]] = call i32 @llvm.dx.thread.id(i32 0)
+// CHECK-SPIRV: %[[#ID_X:]] = call i32 @llvm.spv.thread.id(i32 0)
+// CHECK: %[[#ID_X_:]] = insertelement <2 x i32> poison, i32 %[[#ID_X]], i64 0
+// CHECK-DXIL: %[[#ID_Y:]] = call i32 @llvm.dx.thread.id(i32 1)
+// CHECK-SPIRV: %[[#ID_Y:]] = call i32 @llvm.spv.thread.id(i32 1)
+// CHECK: %[[#ID_XY:]] = insertelement <2 x i32> %[[#ID_X_]], i32 %[[#ID_Y]], i64 1
+// CHECK-DXIL: call void @{{.*}}bar{{.*}}(<2 x i32> %[[#ID_XY]])
+[shader("compute")]
+[numthreads(8,8,1)]
+void bar(uint2 Idx : SV_DispatchThreadID) {}
+
diff --git a/clang/test/CodeGenHLSL/sret_output.hlsl b/clang/test/CodeGenHLSL/sret_output.hlsl
index 33f88c639525f6..c44914f963a90f 100644
--- a/clang/test/CodeGenHLSL/sret_output.hlsl
+++ b/clang/test/CodeGenHLSL/sret_output.hlsl
@@ -1,22 +1,22 @@
-// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s \
-// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s
-
-// FIXME: add semantic to a.
-// See https://github.com/llvm/llvm-project/issues/57874
-struct S {
- float a;
-};
-
-
-// Make sure sret parameter is generated.
-// CHECK:define internal void @"?ps_main@@YA?AUS@@XZ"(ptr dead_on_unwind noalias writable sret(%struct.S) align 4 %agg.result)
-// FIXME: change it to real value instead of poison value once semantic is add to a.
-// Make sure the function with sret is called.
-// CHECK:call void @"?ps_main@@YA?AUS@@XZ"(ptr poison)
-[shader("pixel")]
-S ps_main() {
- S s;
- s.a = 0;
- return s;
-};
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s \
+// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s
+
+// FIXME: add semantic to a.
+// See https://github.com/llvm/llvm-project/issues/57874
+struct S {
+ float a;
+};
+
+
+// Make sure sret parameter is generated.
+// CHECK:define internal void @"?ps_main@@YA?AUS@@XZ"(ptr dead_on_unwind noalias writable sret(%struct.S) align 4 %agg.result)
+// FIXME: change it to real value instead of poison value once semantic is add to a.
+// Make sure the function with sret is called.
+// CHECK:call void @"?ps_main@@YA?AUS@@XZ"(ptr poison)
+[shader("pixel")]
+S ps_main() {
+ S s;
+ s.a = 0;
+ return s;
+};
diff --git a/clang/test/CodeGenHLSL/this-assignment-overload.hlsl b/clang/test/CodeGenHLSL/this-assignment-overload.hlsl
index 92504dfbd6261e..d2c630a1fb13d5 100644
--- a/clang/test/CodeGenHLSL/this-assignment-overload.hlsl
+++ b/clang/test/CodeGenHLSL/this-assignment-overload.hlsl
@@ -1,55 +1,55 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -emit-llvm -disable-llvm-passes -o - -std=hlsl202x %s | FileCheck %s
-
-struct Pair {
- int First;
- int Second;
- int getFirst() {
- Pair Another = {5, 10};
- this = Another;
- return this.First;
- }
- int getSecond() {
- this = Pair();
- return Second;
- }
- void operator=(Pair P) {
- First = P.First;
- Second = 2;
- }
-};
-[numthreads(1, 1, 1)]
-void main() {
- Pair Vals = {1, 2};
- Vals.First = Vals.getFirst();
- Vals.Second = Vals.getSecond();
-}
-
-// This test makes a probably safe assumption that HLSL 202x includes operator overloading for assignment operators.
-// CHECK: define linkonce_odr noundef i32 @"?getFirst at Pair@@QAAHXZ"(ptr noundef nonnull align 4 dereferenceable(8) %this) #2 align 2 {
-// CHECK-NEXT:entry:
-// CHECK-NEXT:%this.addr = alloca ptr, align 4
-// CHECK-NEXT:%Another = alloca %struct.Pair, align 4
-// CHECK-NEXT:%agg.tmp = alloca %struct.Pair, align 4
-// CHECK-NEXT:store ptr %this, ptr %this.addr, align 4
-// CHECK-NEXT:%this1 = load ptr, ptr %this.addr, align 4
-// CHECK-NEXT:%First = getelementptr inbounds %struct.Pair, ptr %Another, i32 0, i32 0
-// CHECK-NEXT:store i32 5, ptr %First, align 4
-// CHECK-NEXT:%Second = getelementptr inbounds %struct.Pair, ptr %Another, i32 0, i32 1
-// CHECK-NEXT:store i32 10, ptr %Second, align 4
-// CHECK-NEXT:call void @llvm.memcpy.p0.p0.i32(ptr align 4 %agg.tmp, ptr align 4 %Another, i32 8, i1 false)
-// CHECK-NEXT:call void @"??4Pair@@QAAXU0@@Z"(ptr noundef nonnull align 4 dereferenceable(8) %this1, ptr noundef byval(%struct.Pair) align 4 %agg.tmp)
-// CHECK-NEXT:%First2 = getelementptr inbounds %struct.Pair, ptr %this1, i32 0, i32 0
-// CHECK-NEXT:%0 = load i32, ptr %First2, align 4
-// CHECK-NEXT:ret i32 %0
-
-// CHECK: define linkonce_odr noundef i32 @"?getSecond at Pair@@QAAHXZ"(ptr noundef nonnull align 4 dereferenceable(8) %this) #2 align 2 {
-// CHECK-NEXT:entry:
-// CHECK-NEXT:%this.addr = alloca ptr, align 4
-// CHECK-NEXT:%agg.tmp = alloca %struct.Pair, align 4
-// CHECK-NEXT:store ptr %this, ptr %this.addr, align 4
-// CHECK-NEXT:%this1 = load ptr, ptr %this.addr, align 4
-// CHECK-NEXT:call void @llvm.memset.p0.i32(ptr align 4 %agg.tmp, i8 0, i32 8, i1 false)
-// CHECK-NEXT:call void @"??4Pair@@QAAXU0@@Z"(ptr noundef nonnull align 4 dereferenceable(8) %this1, ptr noundef byval(%struct.Pair) align 4 %agg.tmp)
-// CHECK-NEXT:%Second = getelementptr inbounds %struct.Pair, ptr %this1, i32 0, i32 1
-// CHECK-NEXT:%0 = load i32, ptr %Second, align 4
-// CHECK-NEXT:ret i32 %0
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -emit-llvm -disable-llvm-passes -o - -std=hlsl202x %s | FileCheck %s
+
+struct Pair {
+ int First;
+ int Second;
+ int getFirst() {
+ Pair Another = {5, 10};
+ this = Another;
+ return this.First;
+ }
+ int getSecond() {
+ this = Pair();
+ return Second;
+ }
+ void operator=(Pair P) {
+ First = P.First;
+ Second = 2;
+ }
+};
+[numthreads(1, 1, 1)]
+void main() {
+ Pair Vals = {1, 2};
+ Vals.First = Vals.getFirst();
+ Vals.Second = Vals.getSecond();
+}
+
+// This test makes a probably safe assumption that HLSL 202x includes operator overloading for assignment operators.
+// CHECK: define linkonce_odr noundef i32 @"?getFirst at Pair@@QAAHXZ"(ptr noundef nonnull align 4 dereferenceable(8) %this) #2 align 2 {
+// CHECK-NEXT:entry:
+// CHECK-NEXT:%this.addr = alloca ptr, align 4
+// CHECK-NEXT:%Another = alloca %struct.Pair, align 4
+// CHECK-NEXT:%agg.tmp = alloca %struct.Pair, align 4
+// CHECK-NEXT:store ptr %this, ptr %this.addr, align 4
+// CHECK-NEXT:%this1 = load ptr, ptr %this.addr, align 4
+// CHECK-NEXT:%First = getelementptr inbounds %struct.Pair, ptr %Another, i32 0, i32 0
+// CHECK-NEXT:store i32 5, ptr %First, align 4
+// CHECK-NEXT:%Second = getelementptr inbounds %struct.Pair, ptr %Another, i32 0, i32 1
+// CHECK-NEXT:store i32 10, ptr %Second, align 4
+// CHECK-NEXT:call void @llvm.memcpy.p0.p0.i32(ptr align 4 %agg.tmp, ptr align 4 %Another, i32 8, i1 false)
+// CHECK-NEXT:call void @"??4Pair@@QAAXU0@@Z"(ptr noundef nonnull align 4 dereferenceable(8) %this1, ptr noundef byval(%struct.Pair) align 4 %agg.tmp)
+// CHECK-NEXT:%First2 = getelementptr inbounds %struct.Pair, ptr %this1, i32 0, i32 0
+// CHECK-NEXT:%0 = load i32, ptr %First2, align 4
+// CHECK-NEXT:ret i32 %0
+
+// CHECK: define linkonce_odr noundef i32 @"?getSecond at Pair@@QAAHXZ"(ptr noundef nonnull align 4 dereferenceable(8) %this) #2 align 2 {
+// CHECK-NEXT:entry:
+// CHECK-NEXT:%this.addr = alloca ptr, align 4
+// CHECK-NEXT:%agg.tmp = alloca %struct.Pair, align 4
+// CHECK-NEXT:store ptr %this, ptr %this.addr, align 4
+// CHECK-NEXT:%this1 = load ptr, ptr %this.addr, align 4
+// CHECK-NEXT:call void @llvm.memset.p0.i32(ptr align 4 %agg.tmp, i8 0, i32 8, i1 false)
+// CHECK-NEXT:call void @"??4Pair@@QAAXU0@@Z"(ptr noundef nonnull align 4 dereferenceable(8) %this1, ptr noundef byval(%struct.Pair) align 4 %agg.tmp)
+// CHECK-NEXT:%Second = getelementptr inbounds %struct.Pair, ptr %this1, i32 0, i32 1
+// CHECK-NEXT:%0 = load i32, ptr %Second, align 4
+// CHECK-NEXT:ret i32 %0
diff --git a/clang/test/CodeGenHLSL/this-assignment.hlsl b/clang/test/CodeGenHLSL/this-assignment.hlsl
index bb67fb6e103c5d..74b4a2eb81500b 100644
--- a/clang/test/CodeGenHLSL/this-assignment.hlsl
+++ b/clang/test/CodeGenHLSL/this-assignment.hlsl
@@ -1,45 +1,45 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -emit-llvm -disable-llvm-passes -o - -hlsl-entry main %s | FileCheck %s
-
-struct Pair {
- int First;
- int Second;
-
- int getFirst() {
- Pair Another = {5, 10};
- this = Another;
- return this.First;
- }
-
- int getSecond() {
- this = Pair();
- return Second;
- }
-};
-
-[numthreads(1, 1, 1)]
-void main() {
- Pair Vals = {1, 2.0};
- Vals.First = Vals.getFirst();
- Vals.Second = Vals.getSecond();
-}
-
-// This tests reference like implicit this in HLSL
-// CHECK: define linkonce_odr noundef i32 @"?getFirst at Pair@@QAAHXZ"(ptr noundef nonnull align 4 dereferenceable(8) %this) #3 align 2 {
-// CHECK-NEXT:entry:
-// CHECK-NEXT:%this.addr = alloca ptr, align 4
-// CHECK-NEXT:%Another = alloca %struct.Pair, align 4
-// CHECK-NEXT:store ptr %this, ptr %this.addr, align 4
-// CHECK-NEXT:%this1 = load ptr, ptr %this.addr, align 4
-// CHECK-NEXT:call void @llvm.memcpy.p0.p0.i32(ptr align 4 %Another, ptr align 4 @"__const.?getFirst at Pair@@QAAHXZ.Another", i32 8, i1 false)
-// CHECK-NEXT:call void @llvm.memcpy.p0.p0.i32(ptr align 4 %this1, ptr align 4 %Another, i32 8, i1 false)
-// CHECK-NEXT:%First = getelementptr inbounds %struct.Pair, ptr %this1, i32 0, i32 0
-
-// CHECK: define linkonce_odr noundef i32 @"?getSecond at Pair@@QAAHXZ"(ptr noundef nonnull align 4 dereferenceable(8) %this) #3 align 2 {
-// CHECK-NEXT:entry:
-// CHECK-NEXT:%this.addr = alloca ptr, align 4
-// CHECK-NEXT:%ref.tmp = alloca %struct.Pair, align 4
-// CHECK-NEXT:store ptr %this, ptr %this.addr, align 4
-// CHECK-NEXT:%this1 = load ptr, ptr %this.addr, align 4
-// CHECK-NEXT:call void @llvm.memset.p0.i32(ptr align 4 %ref.tmp, i8 0, i32 8, i1 false)
-// CHECK-NEXT:call void @llvm.memcpy.p0.p0.i32(ptr align 4 %this1, ptr align 4 %ref.tmp, i32 8, i1 false)
-// CHECK-NEXT:%Second = getelementptr inbounds %struct.Pair, ptr %this1, i32 0, i32 1
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -emit-llvm -disable-llvm-passes -o - -hlsl-entry main %s | FileCheck %s
+
+struct Pair {
+ int First;
+ int Second;
+
+ int getFirst() {
+ Pair Another = {5, 10};
+ this = Another;
+ return this.First;
+ }
+
+ int getSecond() {
+ this = Pair();
+ return Second;
+ }
+};
+
+[numthreads(1, 1, 1)]
+void main() {
+ Pair Vals = {1, 2.0};
+ Vals.First = Vals.getFirst();
+ Vals.Second = Vals.getSecond();
+}
+
+// This tests reference like implicit this in HLSL
+// CHECK: define linkonce_odr noundef i32 @"?getFirst at Pair@@QAAHXZ"(ptr noundef nonnull align 4 dereferenceable(8) %this) #3 align 2 {
+// CHECK-NEXT:entry:
+// CHECK-NEXT:%this.addr = alloca ptr, align 4
+// CHECK-NEXT:%Another = alloca %struct.Pair, align 4
+// CHECK-NEXT:store ptr %this, ptr %this.addr, align 4
+// CHECK-NEXT:%this1 = load ptr, ptr %this.addr, align 4
+// CHECK-NEXT:call void @llvm.memcpy.p0.p0.i32(ptr align 4 %Another, ptr align 4 @"__const.?getFirst at Pair@@QAAHXZ.Another", i32 8, i1 false)
+// CHECK-NEXT:call void @llvm.memcpy.p0.p0.i32(ptr align 4 %this1, ptr align 4 %Another, i32 8, i1 false)
+// CHECK-NEXT:%First = getelementptr inbounds %struct.Pair, ptr %this1, i32 0, i32 0
+
+// CHECK: define linkonce_odr noundef i32 @"?getSecond at Pair@@QAAHXZ"(ptr noundef nonnull align 4 dereferenceable(8) %this) #3 align 2 {
+// CHECK-NEXT:entry:
+// CHECK-NEXT:%this.addr = alloca ptr, align 4
+// CHECK-NEXT:%ref.tmp = alloca %struct.Pair, align 4
+// CHECK-NEXT:store ptr %this, ptr %this.addr, align 4
+// CHECK-NEXT:%this1 = load ptr, ptr %this.addr, align 4
+// CHECK-NEXT:call void @llvm.memset.p0.i32(ptr align 4 %ref.tmp, i8 0, i32 8, i1 false)
+// CHECK-NEXT:call void @llvm.memcpy.p0.p0.i32(ptr align 4 %this1, ptr align 4 %ref.tmp, i32 8, i1 false)
+// CHECK-NEXT:%Second = getelementptr inbounds %struct.Pair, ptr %this1, i32 0, i32 1
diff --git a/clang/test/CodeGenHLSL/this-reference.hlsl b/clang/test/CodeGenHLSL/this-reference.hlsl
index e57f48ccaf3abd..1addc51da323b0 100644
--- a/clang/test/CodeGenHLSL/this-reference.hlsl
+++ b/clang/test/CodeGenHLSL/this-reference.hlsl
@@ -1,34 +1,34 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -emit-llvm -disable-llvm-passes -o - -hlsl-entry main %s -debug-info-kind=standalone -dwarf-version=4 | FileCheck %s
-
-struct Pair {
- int First;
- float Second;
-
- int getFirst() {
- return this.First;
- }
-
- float getSecond() {
- return Second;
- }
-};
-
-[numthreads(1, 1, 1)]
-void main() {
- Pair Vals = {1, 2.0};
- Vals.First = Vals.getFirst();
- Vals.Second = Vals.getSecond();
-}
-
-// This tests reference like `this` in HLSL
- // CHECK: %call = call noundef i32 @"?getFirst at Pair@@QAAHXZ"(ptr noundef nonnull align 4 dereferenceable(8) %Vals)
- // CHECK-NEXT: %First = getelementptr inbounds %struct.Pair, ptr %Vals, i32 0, i32 0
- // CHECK-NEXT: store i32 %call, ptr %First, align 4
- // CHECK-NEXT: %call1 = call noundef float @"?getSecond at Pair@@QAAMXZ"(ptr noundef nonnull align 4 dereferenceable(8) %Vals)
- // CHECK-NEXT: %Second = getelementptr inbounds %struct.Pair, ptr %Vals, i32 0, i32 1
-
-// CHECK: [[Pair:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Pair"
-// CHECK: [[getFirst:![0-9]+]] = distinct !DISubprogram(name: "getFirst"
-// CHECK-SAME: scope: [[Pair]]
-// CHECK: [[FirstThis:![0-9]+]] = !DILocalVariable(name: "this", arg: 1, scope: [[getFirst]], type: [[thisType:![0-9]+]]
-// CHECK: [[thisType]] = !DIDerivedType(tag: DW_TAG_reference_type, baseType: [[Pair]], size: 32)
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -emit-llvm -disable-llvm-passes -o - -hlsl-entry main %s -debug-info-kind=standalone -dwarf-version=4 | FileCheck %s
+
+struct Pair {
+ int First;
+ float Second;
+
+ int getFirst() {
+ return this.First;
+ }
+
+ float getSecond() {
+ return Second;
+ }
+};
+
+[numthreads(1, 1, 1)]
+void main() {
+ Pair Vals = {1, 2.0};
+ Vals.First = Vals.getFirst();
+ Vals.Second = Vals.getSecond();
+}
+
+// This tests reference like `this` in HLSL
+ // CHECK: %call = call noundef i32 @"?getFirst at Pair@@QAAHXZ"(ptr noundef nonnull align 4 dereferenceable(8) %Vals)
+ // CHECK-NEXT: %First = getelementptr inbounds %struct.Pair, ptr %Vals, i32 0, i32 0
+ // CHECK-NEXT: store i32 %call, ptr %First, align 4
+ // CHECK-NEXT: %call1 = call noundef float @"?getSecond at Pair@@QAAMXZ"(ptr noundef nonnull align 4 dereferenceable(8) %Vals)
+ // CHECK-NEXT: %Second = getelementptr inbounds %struct.Pair, ptr %Vals, i32 0, i32 1
+
+// CHECK: [[Pair:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Pair"
+// CHECK: [[getFirst:![0-9]+]] = distinct !DISubprogram(name: "getFirst"
+// CHECK-SAME: scope: [[Pair]]
+// CHECK: [[FirstThis:![0-9]+]] = !DILocalVariable(name: "this", arg: 1, scope: [[getFirst]], type: [[thisType:![0-9]+]]
+// CHECK: [[thisType]] = !DIDerivedType(tag: DW_TAG_reference_type, baseType: [[Pair]], size: 32)
diff --git a/clang/test/CodeGenObjC/exceptions-personality.m b/clang/test/CodeGenObjC/exceptions-personality.m
index 9c25ee38b6d7cf..bccbc44d615d24 100644
--- a/clang/test/CodeGenObjC/exceptions-personality.m
+++ b/clang/test/CodeGenObjC/exceptions-personality.m
@@ -1,53 +1,53 @@
-// RUN: %clang_cc1 -triple x86_64-w64-windows-gnu -emit-llvm -fobjc-runtime=gnustep-2.0 -fexceptions -fobjc-exceptions -o %t %s
-// RUN: FileCheck --check-prefixes=CHECK-MINGW-OBJC2 < %t %s
-
-// RUN: %clang_cc1 -triple x86_64-w64-windows-gnu -emit-llvm -fobjc-runtime=gcc -fexceptions -fobjc-exceptions -o %t %s
-// RUN: FileCheck --check-prefixes=CHECK-MINGW-GCC < %t %s
-
-// RUN: %clang_cc1 -triple x86_64-w64-windows-msvc -emit-llvm -fobjc-runtime=gnustep-2.0 -fexceptions -fobjc-exceptions -o %t %s
-// RUN: FileCheck --check-prefixes=CHECK-MSVC-OBJC2 < %t %s
-
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -fobjc-runtime=gnustep-2.0 -fexceptions -fobjc-exceptions -o %t %s
-// RUN: FileCheck --check-prefixes=CHECK-LINUX-OBJC2 < %t %s
-
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -fobjc-runtime=gcc -fexceptions -fobjc-exceptions -o %t %s
-// RUN: FileCheck --check-prefixes=CHECK-LINUX-GCC < %t %s
- at interface Foo @end
-
-void throwing(void) {
- @try
- {
- // CHECK-MINGW-OBJC2: personality ptr @__gxx_personality_seh0
- // CHECK-MINGW-OBJC2: invoke void @objc_exception_throw
-
- // CHECK-MINGW-GCC: personality ptr @__gnu_objc_personality_v0
- // CHECK-MINGW-GCC: invoke void @objc_exception_throw
-
- // CHECK-MSVC-OBJC2: personality ptr @__CxxFrameHandler3
- // CHECK-MSVC-OBJC2: invoke void @objc_exception_throw
-
- // CHECK-LINUX-OBJC2: personality ptr @__gnustep_objc_personality_v0
- // CHECK-LINUX-OBJC2: invoke void @objc_exception_throw
-
- // CHECK-LINUX-GCC: personality ptr @__gnu_objc_personality_v0
- @throw(@"error!");
- }
- @catch(...)
- {
- // CHECK-MINGW-OBJC2: call ptr @__cxa_begin_catch
- // CHECK-MINGW-OBJC2: invoke ptr @__cxa_rethrow
- // CHECK-MINGW-OBJC2: invoke void @__cxa_end_catch
-
- // CHECK-MINGW-GCC: call void @objc_exception_throw
-
- // CHECK-MSVC-OBJC2: call void @objc_exception_rethrow
-
- // CHECK-LINUX-OBJC2: call ptr @objc_begin_catch
- // CHECK-LINUX-OBJC2: invoke void @objc_exception_throw
- // CHECK-LINUX-OBJC2: invoke void @objc_end_catch()
-
- // CHECK-LINUX-GCC: invoke void @objc_exception_throw
-
- @throw;
- }
-}
+// RUN: %clang_cc1 -triple x86_64-w64-windows-gnu -emit-llvm -fobjc-runtime=gnustep-2.0 -fexceptions -fobjc-exceptions -o %t %s
+// RUN: FileCheck --check-prefixes=CHECK-MINGW-OBJC2 < %t %s
+
+// RUN: %clang_cc1 -triple x86_64-w64-windows-gnu -emit-llvm -fobjc-runtime=gcc -fexceptions -fobjc-exceptions -o %t %s
+// RUN: FileCheck --check-prefixes=CHECK-MINGW-GCC < %t %s
+
+// RUN: %clang_cc1 -triple x86_64-w64-windows-msvc -emit-llvm -fobjc-runtime=gnustep-2.0 -fexceptions -fobjc-exceptions -o %t %s
+// RUN: FileCheck --check-prefixes=CHECK-MSVC-OBJC2 < %t %s
+
+// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -fobjc-runtime=gnustep-2.0 -fexceptions -fobjc-exceptions -o %t %s
+// RUN: FileCheck --check-prefixes=CHECK-LINUX-OBJC2 < %t %s
+
+// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -fobjc-runtime=gcc -fexceptions -fobjc-exceptions -o %t %s
+// RUN: FileCheck --check-prefixes=CHECK-LINUX-GCC < %t %s
+ at interface Foo @end
+
+void throwing(void) {
+ @try
+ {
+ // CHECK-MINGW-OBJC2: personality ptr @__gxx_personality_seh0
+ // CHECK-MINGW-OBJC2: invoke void @objc_exception_throw
+
+ // CHECK-MINGW-GCC: personality ptr @__gnu_objc_personality_v0
+ // CHECK-MINGW-GCC: invoke void @objc_exception_throw
+
+ // CHECK-MSVC-OBJC2: personality ptr @__CxxFrameHandler3
+ // CHECK-MSVC-OBJC2: invoke void @objc_exception_throw
+
+ // CHECK-LINUX-OBJC2: personality ptr @__gnustep_objc_personality_v0
+ // CHECK-LINUX-OBJC2: invoke void @objc_exception_throw
+
+ // CHECK-LINUX-GCC: personality ptr @__gnu_objc_personality_v0
+ @throw(@"error!");
+ }
+ @catch(...)
+ {
+ // CHECK-MINGW-OBJC2: call ptr @__cxa_begin_catch
+ // CHECK-MINGW-OBJC2: invoke ptr @__cxa_rethrow
+ // CHECK-MINGW-OBJC2: invoke void @__cxa_end_catch
+
+ // CHECK-MINGW-GCC: call void @objc_exception_throw
+
+ // CHECK-MSVC-OBJC2: call void @objc_exception_rethrow
+
+ // CHECK-LINUX-OBJC2: call ptr @objc_begin_catch
+ // CHECK-LINUX-OBJC2: invoke void @objc_exception_throw
+ // CHECK-LINUX-OBJC2: invoke void @objc_end_catch()
+
+ // CHECK-LINUX-GCC: invoke void @objc_exception_throw
+
+ @throw;
+ }
+}
diff --git a/clang/test/Driver/ps4-ps5-relax-relocations.c b/clang/test/Driver/ps4-ps5-relax-relocations.c
index 41ed3f22b19c8e..afb83d61cd053b 100644
--- a/clang/test/Driver/ps4-ps5-relax-relocations.c
+++ b/clang/test/Driver/ps4-ps5-relax-relocations.c
@@ -1,29 +1,29 @@
-// RUN: %clang -### -target x86_64-scei-ps4 %s -o - 2>&1 | \
-// RUN: FileCheck %s
-// RUN: %clang -### -target x86_64-scei-ps4 -Wa,-mrelax-relocations=yes %s -o - 2>&1 | \
-// RUN: FileCheck %s
-// RUN: %clang -### -target x86_64-scei-ps4 -Wa,-mrelax-relocations=no %s -o - 2>&1 | \
-// RUN: FileCheck -check-prefix=UNSET %s
-// RUN: %clang -### -x assembler -target x86_64-scei-ps4 %s -o - 2>&1 | \
-// RUN: FileCheck %s
-// RUN: %clang -### -x assembler -target x86_64-scei-ps4 -Wa,-mrelax-relocations=yes %s -o - 2>&1 | \
-// RUN: FileCheck %s
-// RUN: %clang -### -x assembler -target x86_64-scei-ps4 -Wa,-mrelax-relocations=no %s -o - 2>&1 | \
-// RUN: FileCheck -check-prefix=UNSET %s
-
-// RUN: %clang -### -target x86_64-sie-ps5 %s -o - 2>&1 | \
-// RUN: FileCheck %s
-// RUN: %clang -### -target x86_64-sie-ps5 -Wa,-mrelax-relocations=yes %s -o - 2>&1 | \
-// RUN: FileCheck %s
-// RUN: %clang -### -target x86_64-sie-ps5 -Wa,-mrelax-relocations=no %s -o - 2>&1 | \
-// RUN: FileCheck -check-prefix=UNSET %s
-// RUN: %clang -### -x assembler -target x86_64-sie-ps5 %s -o - 2>&1 | \
-// RUN: FileCheck %s
-// RUN: %clang -### -x assembler -target x86_64-sie-ps5 -Wa,-mrelax-relocations=yes %s -o - 2>&1 | \
-// RUN: FileCheck %s
-// RUN: %clang -### -x assembler -target x86_64-sie-ps5 -Wa,-mrelax-relocations=no %s -o - 2>&1 | \
-// RUN: FileCheck -check-prefix=UNSET %s
-
-// CHECK-NOT: "-mrelax-relocations
-
-// UNSET: "-mrelax-relocations=no"
+// RUN: %clang -### -target x86_64-scei-ps4 %s -o - 2>&1 | \
+// RUN: FileCheck %s
+// RUN: %clang -### -target x86_64-scei-ps4 -Wa,-mrelax-relocations=yes %s -o - 2>&1 | \
+// RUN: FileCheck %s
+// RUN: %clang -### -target x86_64-scei-ps4 -Wa,-mrelax-relocations=no %s -o - 2>&1 | \
+// RUN: FileCheck -check-prefix=UNSET %s
+// RUN: %clang -### -x assembler -target x86_64-scei-ps4 %s -o - 2>&1 | \
+// RUN: FileCheck %s
+// RUN: %clang -### -x assembler -target x86_64-scei-ps4 -Wa,-mrelax-relocations=yes %s -o - 2>&1 | \
+// RUN: FileCheck %s
+// RUN: %clang -### -x assembler -target x86_64-scei-ps4 -Wa,-mrelax-relocations=no %s -o - 2>&1 | \
+// RUN: FileCheck -check-prefix=UNSET %s
+
+// RUN: %clang -### -target x86_64-sie-ps5 %s -o - 2>&1 | \
+// RUN: FileCheck %s
+// RUN: %clang -### -target x86_64-sie-ps5 -Wa,-mrelax-relocations=yes %s -o - 2>&1 | \
+// RUN: FileCheck %s
+// RUN: %clang -### -target x86_64-sie-ps5 -Wa,-mrelax-relocations=no %s -o - 2>&1 | \
+// RUN: FileCheck -check-prefix=UNSET %s
+// RUN: %clang -### -x assembler -target x86_64-sie-ps5 %s -o - 2>&1 | \
+// RUN: FileCheck %s
+// RUN: %clang -### -x assembler -target x86_64-sie-ps5 -Wa,-mrelax-relocations=yes %s -o - 2>&1 | \
+// RUN: FileCheck %s
+// RUN: %clang -### -x assembler -target x86_64-sie-ps5 -Wa,-mrelax-relocations=no %s -o - 2>&1 | \
+// RUN: FileCheck -check-prefix=UNSET %s
+
+// CHECK-NOT: "-mrelax-relocations
+
+// UNSET: "-mrelax-relocations=no"
diff --git a/clang/test/FixIt/fixit-newline-style.c b/clang/test/FixIt/fixit-newline-style.c
index 61e4df67e85bac..2aac143d4d753e 100644
--- a/clang/test/FixIt/fixit-newline-style.c
+++ b/clang/test/FixIt/fixit-newline-style.c
@@ -1,11 +1,11 @@
-// RUN: %clang_cc1 -pedantic -Wunused-label -fno-diagnostics-show-line-numbers -x c %s 2>&1 | FileCheck %s -strict-whitespace
-
-// This file intentionally uses a CRLF newline style
-// CHECK: warning: unused label 'ddd'
-// CHECK-NEXT: {{^ ddd:}}
-// CHECK-NEXT: {{^ \^~~~$}}
-// CHECK-NOT: {{^ ;}}
-void f(void) {
- ddd:
- ;
-}
+// RUN: %clang_cc1 -pedantic -Wunused-label -fno-diagnostics-show-line-numbers -x c %s 2>&1 | FileCheck %s -strict-whitespace
+
+// This file intentionally uses a CRLF newline style
+// CHECK: warning: unused label 'ddd'
+// CHECK-NEXT: {{^ ddd:}}
+// CHECK-NEXT: {{^ \^~~~$}}
+// CHECK-NOT: {{^ ;}}
+void f(void) {
+ ddd:
+ ;
+}
diff --git a/clang/test/Frontend/rewrite-includes-macros.cpp b/clang/test/Frontend/rewrite-includes-macros.cpp
index 1c2bfd440342fe..f374708a76d321 100644
--- a/clang/test/Frontend/rewrite-includes-macros.cpp
+++ b/clang/test/Frontend/rewrite-includes-macros.cpp
@@ -1,15 +1,15 @@
-// RUN: %clang_cl /E -Xclang -frewrite-includes -- %s | %clang_cl /c -Xclang -verify /Tp -
-// expected-no-diagnostics
-
-// This test uses dos-style \r\n line endings.
-// Make sure your editor doesn't rewrite them to unix-style \n line endings.
-int foo();
-int bar();
-#define HELLO \
- foo(); \
- bar();
-
-int main() {
- HELLO
- return 0;
-}
+// RUN: %clang_cl /E -Xclang -frewrite-includes -- %s | %clang_cl /c -Xclang -verify /Tp -
+// expected-no-diagnostics
+
+// This test uses dos-style \r\n line endings.
+// Make sure your editor doesn't rewrite them to unix-style \n line endings.
+int foo();
+int bar();
+#define HELLO \
+ foo(); \
+ bar();
+
+int main() {
+ HELLO
+ return 0;
+}
diff --git a/clang/test/Frontend/rewrite-includes-mixed-eol-crlf.c b/clang/test/Frontend/rewrite-includes-mixed-eol-crlf.c
index d6724444c06676..2faeaba3229218 100644
--- a/clang/test/Frontend/rewrite-includes-mixed-eol-crlf.c
+++ b/clang/test/Frontend/rewrite-includes-mixed-eol-crlf.c
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -E -frewrite-includes %s | %clang_cc1 -
-// expected-no-diagnostics
-// Note: This source file has CRLF line endings.
-// This test validates that -frewrite-includes translates the end of line (EOL)
-// form used in header files to the EOL form used in the the primary source
-// file when the files use different EOL forms.
-#include "rewrite-includes-mixed-eol-crlf.h"
-#include "rewrite-includes-mixed-eol-lf.h"
+// RUN: %clang_cc1 -E -frewrite-includes %s | %clang_cc1 -
+// expected-no-diagnostics
+// Note: This source file has CRLF line endings.
+// This test validates that -frewrite-includes translates the end of line (EOL)
+// form used in header files to the EOL form used in the the primary source
+// file when the files use different EOL forms.
+#include "rewrite-includes-mixed-eol-crlf.h"
+#include "rewrite-includes-mixed-eol-lf.h"
diff --git a/clang/test/Frontend/rewrite-includes-mixed-eol-crlf.h b/clang/test/Frontend/rewrite-includes-mixed-eol-crlf.h
index 0439b88b75e2cf..baedc282296bd7 100644
--- a/clang/test/Frontend/rewrite-includes-mixed-eol-crlf.h
+++ b/clang/test/Frontend/rewrite-includes-mixed-eol-crlf.h
@@ -1,11 +1,11 @@
-// Note: This header file has CRLF line endings.
-// The indentation in some of the conditional inclusion directives below is
-// intentional and is required for this test to function as a regression test
-// for GH59736.
-_Static_assert(__LINE__ == 5, "");
-#if 1
-_Static_assert(__LINE__ == 7, "");
- #if 1
- _Static_assert(__LINE__ == 9, "");
- #endif
-#endif
+// Note: This header file has CRLF line endings.
+// The indentation in some of the conditional inclusion directives below is
+// intentional and is required for this test to function as a regression test
+// for GH59736.
+_Static_assert(__LINE__ == 5, "");
+#if 1
+_Static_assert(__LINE__ == 7, "");
+ #if 1
+ _Static_assert(__LINE__ == 9, "");
+ #endif
+#endif
diff --git a/clang/test/Frontend/system-header-line-directive-ms-lineendings.c b/clang/test/Frontend/system-header-line-directive-ms-lineendings.c
index 92fc07f65e0d4d..dffdd5cf1959ae 100644
--- a/clang/test/Frontend/system-header-line-directive-ms-lineendings.c
+++ b/clang/test/Frontend/system-header-line-directive-ms-lineendings.c
@@ -1,21 +1,21 @@
-// RUN: %clang_cc1 %s -E -o - -I %S/Inputs -isystem %S/Inputs/SystemHeaderPrefix | FileCheck %s
-#include <noline.h>
-#include <line-directive-in-system.h>
-
-#include "line-directive.h"
-
-// This tests that the line numbers for the current file are correctly outputted
-// for the include-file-completed test case. This file should be CRLF.
-
-// CHECK: # 1 "{{.*}}system-header-line-directive-ms-lineendings.c" 2
-// CHECK: # 1 "{{.*}}noline.h" 1 3
-// CHECK: foo(void);
-// CHECK: # 3 "{{.*}}system-header-line-directive-ms-lineendings.c" 2
-// CHECK: # 1 "{{.*}}line-directive-in-system.h" 1 3
-// The "3" below indicates that "foo.h" is considered a system header.
-// CHECK: # 1 "foo.h" 3
-// CHECK: foo(void);
-// CHECK: # 4 "{{.*}}system-header-line-directive-ms-lineendings.c" 2
-// CHECK: # 1 "{{.*}}line-directive.h" 1
-// CHECK: # 10 "foo.h"{{$}}
-// CHECK: # 6 "{{.*}}system-header-line-directive-ms-lineendings.c" 2
+// RUN: %clang_cc1 %s -E -o - -I %S/Inputs -isystem %S/Inputs/SystemHeaderPrefix | FileCheck %s
+#include <noline.h>
+#include <line-directive-in-system.h>
+
+#include "line-directive.h"
+
+// This tests that the line numbers for the current file are correctly outputted
+// for the include-file-completed test case. This file should be CRLF.
+
+// CHECK: # 1 "{{.*}}system-header-line-directive-ms-lineendings.c" 2
+// CHECK: # 1 "{{.*}}noline.h" 1 3
+// CHECK: foo(void);
+// CHECK: # 3 "{{.*}}system-header-line-directive-ms-lineendings.c" 2
+// CHECK: # 1 "{{.*}}line-directive-in-system.h" 1 3
+// The "3" below indicates that "foo.h" is considered a system header.
+// CHECK: # 1 "foo.h" 3
+// CHECK: foo(void);
+// CHECK: # 4 "{{.*}}system-header-line-directive-ms-lineendings.c" 2
+// CHECK: # 1 "{{.*}}line-directive.h" 1
+// CHECK: # 10 "foo.h"{{$}}
+// CHECK: # 6 "{{.*}}system-header-line-directive-ms-lineendings.c" 2
diff --git a/clang/test/Lexer/minimize_source_to_dependency_directives_include.c b/clang/test/Lexer/minimize_source_to_dependency_directives_include.c
index 678753dd4559ac..1d3dd158f2cd1b 100644
--- a/clang/test/Lexer/minimize_source_to_dependency_directives_include.c
+++ b/clang/test/Lexer/minimize_source_to_dependency_directives_include.c
@@ -1,8 +1,8 @@
-// Test double slashes in #include directive along with angle brackets. Previously, this was interpreted as comments.
-// RUN: %clang_cc1 -DTEST -print-dependency-directives-minimized-source %s 2>&1 | FileCheck %s
-
-#include "a//b.h"
-#include <a//b.h>
-
-// CHECK: #include "a//b.h"
-// CHECK: #include <a//b.h>
+// Test double slashes in #include directive along with angle brackets. Previously, this was interpreted as comments.
+// RUN: %clang_cc1 -DTEST -print-dependency-directives-minimized-source %s 2>&1 | FileCheck %s
+
+#include "a//b.h"
+#include <a//b.h>
+
+// CHECK: #include "a//b.h"
+// CHECK: #include <a//b.h>
diff --git a/clang/test/Lexer/minimize_source_to_dependency_directives_utf8bom.c b/clang/test/Lexer/minimize_source_to_dependency_directives_utf8bom.c
index 305442fbd28c46..46aba914441bc9 100644
--- a/clang/test/Lexer/minimize_source_to_dependency_directives_utf8bom.c
+++ b/clang/test/Lexer/minimize_source_to_dependency_directives_utf8bom.c
@@ -1,10 +1,10 @@
-// Test UTF8 BOM at start of file
-// RUN: printf '\xef\xbb\xbf' > %t.c
-// RUN: echo '#ifdef TEST\n' >> %t.c
-// RUN: echo '#include <string>' >> %t.c
-// RUN: echo '#endif' >> %t.c
-// RUN: %clang_cc1 -DTEST -print-dependency-directives-minimized-source %t.c 2>&1 | FileCheck %s
-
-// CHECK: #ifdef TEST
-// CHECK-NEXT: #include <string>
-// CHECK-NEXT: #endif
+// Test UTF8 BOM at start of file
+// RUN: printf '\xef\xbb\xbf' > %t.c
+// RUN: echo '#ifdef TEST\n' >> %t.c
+// RUN: echo '#include <string>' >> %t.c
+// RUN: echo '#endif' >> %t.c
+// RUN: %clang_cc1 -DTEST -print-dependency-directives-minimized-source %t.c 2>&1 | FileCheck %s
+
+// CHECK: #ifdef TEST
+// CHECK-NEXT: #include <string>
+// CHECK-NEXT: #endif
diff --git a/clang/test/Options/HV.hlsl b/clang/test/Options/HV.hlsl
index 9f7e1ebc02f251..f88eb6977f4f46 100644
--- a/clang/test/Options/HV.hlsl
+++ b/clang/test/Options/HV.hlsl
@@ -1,20 +1,20 @@
-// RUN: %clang_dxc -T lib_6_4 -HV 2016 %s 2>&1 -### | FileCheck -check-prefix=2016 %s
-// RUN: %clang_dxc -T lib_6_4 -HV 2017 %s 2>&1 -### | FileCheck -check-prefix=2017 %s
-// RUN: %clang_dxc -T lib_6_4 /HV 2018 %s 2>&1 -### | FileCheck -check-prefix=2018 %s
-// RUN: %clang_dxc -T lib_6_4 /HV 2021 %s 2>&1 -### | FileCheck -check-prefix=2021 %s
-// RUN: %clang_dxc -T lib_6_4 /HV 202x %s 2>&1 -### | FileCheck -check-prefix=202x %s
-// RUN: %clang_dxc -T lib_6_4 %s 2>&1 -### | FileCheck -check-prefix=NO_HV %s
-// RUN: not %clang_dxc -T lib_6_4 /HV gibberish -### %s 2>&1 | FileCheck -check-prefix=CHECK-ERR %s
-
-// 2016: "-std=hlsl2016"
-// 2017: "-std=hlsl2017"
-// 2018: "-std=hlsl2018"
-// 2021: "-std=hlsl2021"
-// 202x: "-std=hlsl202x"
-// NO_HV-NOT: "-std="
-// CHECK-ERR: error: invalid value 'gibberish' in 'HV'
-float4 main(float4 a : A) : SV_TARGET
-{
- return -a.yxxx;
-}
-
+// RUN: %clang_dxc -T lib_6_4 -HV 2016 %s 2>&1 -### | FileCheck -check-prefix=2016 %s
+// RUN: %clang_dxc -T lib_6_4 -HV 2017 %s 2>&1 -### | FileCheck -check-prefix=2017 %s
+// RUN: %clang_dxc -T lib_6_4 /HV 2018 %s 2>&1 -### | FileCheck -check-prefix=2018 %s
+// RUN: %clang_dxc -T lib_6_4 /HV 2021 %s 2>&1 -### | FileCheck -check-prefix=2021 %s
+// RUN: %clang_dxc -T lib_6_4 /HV 202x %s 2>&1 -### | FileCheck -check-prefix=202x %s
+// RUN: %clang_dxc -T lib_6_4 %s 2>&1 -### | FileCheck -check-prefix=NO_HV %s
+// RUN: not %clang_dxc -T lib_6_4 /HV gibberish -### %s 2>&1 | FileCheck -check-prefix=CHECK-ERR %s
+
+// 2016: "-std=hlsl2016"
+// 2017: "-std=hlsl2017"
+// 2018: "-std=hlsl2018"
+// 2021: "-std=hlsl2021"
+// 202x: "-std=hlsl202x"
+// NO_HV-NOT: "-std="
+// CHECK-ERR: error: invalid value 'gibberish' in 'HV'
+float4 main(float4 a : A) : SV_TARGET
+{
+ return -a.yxxx;
+}
+
diff --git a/clang/test/Options/enable_16bit_types_validation.hlsl b/clang/test/Options/enable_16bit_types_validation.hlsl
index 71d336f6f5039f..89fe26790c52be 100644
--- a/clang/test/Options/enable_16bit_types_validation.hlsl
+++ b/clang/test/Options/enable_16bit_types_validation.hlsl
@@ -1,25 +1,25 @@
-// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0 -HV 2016 %s 2>&1 | FileCheck -check-prefix=both_invalid %s
-// RUN: not %clang_dxc -enable-16bit-types -T lib_6_4 -HV 2017 %s 2>&1 | FileCheck -check-prefix=HV_invalid_2017 %s
-// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0 /HV 2021 %s 2>&1 | FileCheck -check-prefix=TP_invalid %s
-// RUN: %clang_dxc -enable-16bit-types -T lib_6_4 /HV 2018 %s 2>&1 -### | FileCheck -check-prefix=valid_2018 %s
-// RUN: %clang_dxc -enable-16bit-types -T lib_6_4 /HV 2021 %s 2>&1 -### | FileCheck -check-prefix=valid_2021 %s
-
-
-// both_invalid: error: '-enable-16bit-types' option requires target HLSL Version >= 2018 and shader model >= 6.2, but HLSL Version is 'hlsl2016' and shader model is '6.0'
-// HV_invalid_2017: error: '-enable-16bit-types' option requires target HLSL Version >= 2018 and shader model >= 6.2, but HLSL Version is 'hlsl2017' and shader model is '6.4'
-// TP_invalid: error: '-enable-16bit-types' option requires target HLSL Version >= 2018 and shader model >= 6.2, but HLSL Version is 'hlsl2021' and shader model is '6.0'
-
-// valid_2021: "dxil-unknown-shadermodel6.4-library"
-// valid_2021-SAME: "-std=hlsl2021"
-// valid_2021-SAME: "-fnative-half-type"
-
-// valid_2018: "dxil-unknown-shadermodel6.4-library"
-// valid_2018-SAME: "-std=hlsl2018"
-// valid_2018-SAME: "-fnative-half-type"
-
-[numthreads(1,1,1)]
-void main()
-{
- return;
-}
-
+// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0 -HV 2016 %s 2>&1 | FileCheck -check-prefix=both_invalid %s
+// RUN: not %clang_dxc -enable-16bit-types -T lib_6_4 -HV 2017 %s 2>&1 | FileCheck -check-prefix=HV_invalid_2017 %s
+// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0 /HV 2021 %s 2>&1 | FileCheck -check-prefix=TP_invalid %s
+// RUN: %clang_dxc -enable-16bit-types -T lib_6_4 /HV 2018 %s 2>&1 -### | FileCheck -check-prefix=valid_2018 %s
+// RUN: %clang_dxc -enable-16bit-types -T lib_6_4 /HV 2021 %s 2>&1 -### | FileCheck -check-prefix=valid_2021 %s
+
+
+// both_invalid: error: '-enable-16bit-types' option requires target HLSL Version >= 2018 and shader model >= 6.2, but HLSL Version is 'hlsl2016' and shader model is '6.0'
+// HV_invalid_2017: error: '-enable-16bit-types' option requires target HLSL Version >= 2018 and shader model >= 6.2, but HLSL Version is 'hlsl2017' and shader model is '6.4'
+// TP_invalid: error: '-enable-16bit-types' option requires target HLSL Version >= 2018 and shader model >= 6.2, but HLSL Version is 'hlsl2021' and shader model is '6.0'
+
+// valid_2021: "dxil-unknown-shadermodel6.4-library"
+// valid_2021-SAME: "-std=hlsl2021"
+// valid_2021-SAME: "-fnative-half-type"
+
+// valid_2018: "dxil-unknown-shadermodel6.4-library"
+// valid_2018-SAME: "-std=hlsl2018"
+// valid_2018-SAME: "-fnative-half-type"
+
+[numthreads(1,1,1)]
+void main()
+{
+ return;
+}
+
diff --git a/clang/test/Options/enable_16bit_types_validation_spirv.hlsl b/clang/test/Options/enable_16bit_types_validation_spirv.hlsl
index a9700ef87a27c3..aeb7a8369f4034 100644
--- a/clang/test/Options/enable_16bit_types_validation_spirv.hlsl
+++ b/clang/test/Options/enable_16bit_types_validation_spirv.hlsl
@@ -1,14 +1,14 @@
-// RUN: not %clang_cc1 -internal-isystem D:\llvm-project\build\x64-Release\lib\clang\19\include -nostdsysteminc -triple spirv-vulkan-library -x hlsl -std=hlsl2016 -fnative-half-type -emit-llvm -disable-llvm-passes -o - %s 2>&1 | FileCheck %s --check-prefix=SPIRV
-// RUN: %clang_cc1 -internal-isystem D:\llvm-project\build\x64-Release\lib\clang\19\include -nostdsysteminc -triple spirv-vulkan-library -x hlsl -std=hlsl2021 -fnative-half-type -emit-llvm -disable-llvm-passes -o - %s 2>&1 | FileCheck %s --check-prefix=valid
-
-// SPIRV: error: '-fnative-half-type' option requires target HLSL Version >= 2018, but HLSL Version is 'hlsl2016'
-
-// valid: "spirv-unknown-vulkan-library"
-// valid: define spir_func void @main() #0 {
-
-[numthreads(1,1,1)]
-void main()
-{
- return;
-}
-
+// RUN: not %clang_cc1 -internal-isystem D:\llvm-project\build\x64-Release\lib\clang\19\include -nostdsysteminc -triple spirv-vulkan-library -x hlsl -std=hlsl2016 -fnative-half-type -emit-llvm -disable-llvm-passes -o - %s 2>&1 | FileCheck %s --check-prefix=SPIRV
+// RUN: %clang_cc1 -internal-isystem D:\llvm-project\build\x64-Release\lib\clang\19\include -nostdsysteminc -triple spirv-vulkan-library -x hlsl -std=hlsl2021 -fnative-half-type -emit-llvm -disable-llvm-passes -o - %s 2>&1 | FileCheck %s --check-prefix=valid
+
+// SPIRV: error: '-fnative-half-type' option requires target HLSL Version >= 2018, but HLSL Version is 'hlsl2016'
+
+// valid: "spirv-unknown-vulkan-library"
+// valid: define spir_func void @main() #0 {
+
+[numthreads(1,1,1)]
+void main()
+{
+ return;
+}
+
diff --git a/clang/test/Parser/objc-attr.m b/clang/test/Parser/objc-attr.m
index e214cf574a4a7a..6d3575391304b1 100644
--- a/clang/test/Parser/objc-attr.m
+++ b/clang/test/Parser/objc-attr.m
@@ -1,28 +1,28 @@
-// RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-macosx10.10.0 -verify %s
-// expected-no-diagnostics
-
- at interface NSObject
- at end
-
-[[clang::objc_exception]]
- at interface Foo {
- [[clang::iboutlet]] NSObject *h;
-}
- at property (readonly) [[clang::objc_returns_inner_pointer]] void *i, *j;
- at property (readonly) [[clang::iboutlet]] NSObject *k;
- at end
-
-[[clang::objc_runtime_name("name")]] @protocol Bar;
-
-[[clang::objc_protocol_requires_explicit_implementation]]
- at protocol Baz
- at end
-
- at interface Quux
--(void)g1 [[clang::ns_consumes_self]];
--(void)g2 __attribute__((ns_consumes_self));
--(void)h1: (int)x [[clang::ns_consumes_self]];
--(void)h2: (int)x __attribute__((ns_consumes_self));
--(void) [[clang::ns_consumes_self]] i1;
--(void) __attribute__((ns_consumes_self)) i2;
- at end
+// RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-macosx10.10.0 -verify %s
+// expected-no-diagnostics
+
+ at interface NSObject
+ at end
+
+[[clang::objc_exception]]
+ at interface Foo {
+ [[clang::iboutlet]] NSObject *h;
+}
+ at property (readonly) [[clang::objc_returns_inner_pointer]] void *i, *j;
+ at property (readonly) [[clang::iboutlet]] NSObject *k;
+ at end
+
+[[clang::objc_runtime_name("name")]] @protocol Bar;
+
+[[clang::objc_protocol_requires_explicit_implementation]]
+ at protocol Baz
+ at end
+
+ at interface Quux
+-(void)g1 [[clang::ns_consumes_self]];
+-(void)g2 __attribute__((ns_consumes_self));
+-(void)h1: (int)x [[clang::ns_consumes_self]];
+-(void)h2: (int)x __attribute__((ns_consumes_self));
+-(void) [[clang::ns_consumes_self]] i1;
+-(void) __attribute__((ns_consumes_self)) i2;
+ at end
diff --git a/clang/test/Preprocessor/macro_vaopt_check.cpp b/clang/test/Preprocessor/macro_vaopt_check.cpp
index 28f92fc17c6c5e..8b507240be48c9 100644
--- a/clang/test/Preprocessor/macro_vaopt_check.cpp
+++ b/clang/test/Preprocessor/macro_vaopt_check.cpp
@@ -1,76 +1,76 @@
-// RUN: %clang_cc1 %s -Eonly -verify -Wno-all -Wno-c++23-extensions -pedantic -std=c++20
-// RUN: %clang_cc1 %s -Eonly -verify -Wno-all -Wno-c++23-extensions -pedantic -std=c++11
-// RUN: %clang_cc1 -x c %s -Eonly -verify -Wno-all -Wno-c2x-extensions -pedantic -std=c99
-
-//expected-error at +1{{missing '('}}
-#define V1(...) __VA_OPT__
-#undef V1
-// OK
-#define V1(...) __VA_OPT__ ()
-#undef V1
-
-//expected-warning at +1{{can only appear in the expansion of a variadic macro}}
-#define V2() __VA_OPT__(x)
-#undef V2
-
-//expected-error at +2{{missing ')' after}}
-//expected-note at +1{{to match this '('}}
-#define V3(...) __VA_OPT__(
-#undef V3
-
-#define V4(...) __VA_OPT__(__VA_ARGS__)
-#undef V4
-
-//expected-error at +1{{nested}}
-#define V5(...) __VA_OPT__(__VA_OPT__())
-#undef V5
-
-//expected-error at +1{{not followed by}}
-#define V1(...) __VA_OPT__ (#)
-#undef V1
-
-//expected-error at +1{{cannot appear at start}}
-#define V1(...) __VA_OPT__ (##)
-#undef V1
-
-//expected-error at +1{{cannot appear at start}}
-#define V1(...) __VA_OPT__ (## X) x
-#undef V1
-
-//expected-error at +1{{cannot appear at end}}
-#define V1(...) y __VA_OPT__ (X ##)
-#undef V1
-
-
-#define FOO(x,...) # __VA_OPT__(x) #x #__VA_OPT__(__VA_ARGS__) //OK
-
-//expected-error at +1{{not followed by a macro parameter}}
-#define V1(...) __VA_OPT__(#)
-#undef V1
-
-//expected-error at +1{{cannot appear at start}}
-#define V1(...) a __VA_OPT__(##) b
-#undef V1
-
-//expected-error at +1{{cannot appear at start}}
-#define V1(...) a __VA_OPT__(a ## b) b __VA_OPT__(##)
-#undef V1
-
-#define V1(x,...) # __VA_OPT__(b x) // OK
-#undef V1
-
-//expected-error at +2{{missing ')' after}}
-//expected-note at +1{{to match this '('}}
-#define V1(...) __VA_OPT__ ((())
-#undef V1
-
-// __VA_OPT__ can't appear anywhere else.
-#if __VA_OPT__ // expected-warning {{__VA_OPT__ can only appear in the expansion of a variadic macro}}
-#endif
-
-// expected-warning at +2 {{__VA_OPT__ can only appear in the expansion of a variadic macro}}
-#ifdef __VA_OPT__ // expected-warning {{__VA_OPT__ can only appear in the expansion of a variadic macro}}
-#elifdef __VA_OPT__
-#endif
-
-#define BAD __VA_OPT__ // expected-warning {{__VA_OPT__ can only appear in the expansion of a variadic macro}}
+// RUN: %clang_cc1 %s -Eonly -verify -Wno-all -Wno-c++23-extensions -pedantic -std=c++20
+// RUN: %clang_cc1 %s -Eonly -verify -Wno-all -Wno-c++23-extensions -pedantic -std=c++11
+// RUN: %clang_cc1 -x c %s -Eonly -verify -Wno-all -Wno-c2x-extensions -pedantic -std=c99
+
+//expected-error at +1{{missing '('}}
+#define V1(...) __VA_OPT__
+#undef V1
+// OK
+#define V1(...) __VA_OPT__ ()
+#undef V1
+
+//expected-warning at +1{{can only appear in the expansion of a variadic macro}}
+#define V2() __VA_OPT__(x)
+#undef V2
+
+//expected-error at +2{{missing ')' after}}
+//expected-note at +1{{to match this '('}}
+#define V3(...) __VA_OPT__(
+#undef V3
+
+#define V4(...) __VA_OPT__(__VA_ARGS__)
+#undef V4
+
+//expected-error at +1{{nested}}
+#define V5(...) __VA_OPT__(__VA_OPT__())
+#undef V5
+
+//expected-error at +1{{not followed by}}
+#define V1(...) __VA_OPT__ (#)
+#undef V1
+
+//expected-error at +1{{cannot appear at start}}
+#define V1(...) __VA_OPT__ (##)
+#undef V1
+
+//expected-error at +1{{cannot appear at start}}
+#define V1(...) __VA_OPT__ (## X) x
+#undef V1
+
+//expected-error at +1{{cannot appear at end}}
+#define V1(...) y __VA_OPT__ (X ##)
+#undef V1
+
+
+#define FOO(x,...) # __VA_OPT__(x) #x #__VA_OPT__(__VA_ARGS__) //OK
+
+//expected-error at +1{{not followed by a macro parameter}}
+#define V1(...) __VA_OPT__(#)
+#undef V1
+
+//expected-error at +1{{cannot appear at start}}
+#define V1(...) a __VA_OPT__(##) b
+#undef V1
+
+//expected-error at +1{{cannot appear at start}}
+#define V1(...) a __VA_OPT__(a ## b) b __VA_OPT__(##)
+#undef V1
+
+#define V1(x,...) # __VA_OPT__(b x) // OK
+#undef V1
+
+//expected-error at +2{{missing ')' after}}
+//expected-note at +1{{to match this '('}}
+#define V1(...) __VA_OPT__ ((())
+#undef V1
+
+// __VA_OPT__ can't appear anywhere else.
+#if __VA_OPT__ // expected-warning {{__VA_OPT__ can only appear in the expansion of a variadic macro}}
+#endif
+
+// expected-warning at +2 {{__VA_OPT__ can only appear in the expansion of a variadic macro}}
+#ifdef __VA_OPT__ // expected-warning {{__VA_OPT__ can only appear in the expansion of a variadic macro}}
+#elifdef __VA_OPT__
+#endif
+
+#define BAD __VA_OPT__ // expected-warning {{__VA_OPT__ can only appear in the expansion of a variadic macro}}
diff --git a/clang/test/Preprocessor/macro_vaopt_expand.cpp b/clang/test/Preprocessor/macro_vaopt_expand.cpp
index 5eb0facb83f736..ec30bbf194f54c 100644
--- a/clang/test/Preprocessor/macro_vaopt_expand.cpp
+++ b/clang/test/Preprocessor/macro_vaopt_expand.cpp
@@ -1,150 +1,150 @@
-// RUN: %clang_cc1 -E %s -pedantic -std=c++20 | FileCheck -strict-whitespace %s
-// RUN: %clang_cc1 -E %s -pedantic -std=c++11 | FileCheck -strict-whitespace %s
-// RUN: %clang_cc1 -E -x c %s -pedantic -std=c99 | FileCheck -strict-whitespace %s
-
-#define LPAREN (
-#define RPAREN )
-
-#define A0 expandedA0
-#define A1 expandedA1 A0
-#define A2 expandedA2 A1
-#define A3 expandedA3 A2
-
-#define A() B LPAREN )
-#define B() C LPAREN )
-#define C() D LPAREN )
-
-
-#define F(x, y) x + y
-#define ELLIP_FUNC(...) __VA_OPT__(__VA_ARGS__)
-
-1: ELLIP_FUNC(F, LPAREN, 'a', 'b', RPAREN);
-2: ELLIP_FUNC(F LPAREN 'a', 'b' RPAREN);
-#undef F
-#undef ELLIP_FUNC
-
-// CHECK: 1: F, (, 'a', 'b', );
-// CHECK: 2: 'a' + 'b';
-
-#define F(...) f(0 __VA_OPT__(,) __VA_ARGS__)
-3: F(a, b, c) // replaced by f(0, a, b, c)
-4: F() // replaced by f(0)
-
-// CHECK: 3: f(0 , a, b, c)
-// CHECK: 4: f(0 )
-#undef F
-
-#define G(X, ...) f(0, X __VA_OPT__(,) __VA_ARGS__)
-
-5: G(a, b, c) // replaced by f(0, a , b, c)
-6: G(a) // replaced by f(0, a)
-7: G(a,) // replaced by f(0, a)
-7.1: G(a,,)
-
-
-// CHECK: 5: f(0, a , b, c)
-// CHECK: 6: f(0, a )
-// CHECK: 7: f(0, a )
-// CHECK: 7.1: f(0, a , ,)
-#undef G
-
-#define HT_B() TONG
-
-#define F(x, ...) HT_ ## __VA_OPT__(x x A() #x)
-
-8: F(1)
-9: F(A(),1)
-
-// CHECK: 8: HT_
-// CHECK: 9: TONG C ( ) B ( ) "A()"
-#undef HT_B
-#undef F
-
-#define F(a,...) #__VA_OPT__(A1 a)
-
-10: F(A())
-11: F(A1 A(), 1)
-// CHECK: 10: ""
-// CHECK: 11: "A1 expandedA1 expandedA0 B ( )"
-#undef F
-
-
-#define F(a,...) a ## __VA_OPT__(A1 a) ## __VA_ARGS__ ## a
-12.0: F()
-12: F(,)
-13: F(B,)
-// CHECK: 12.0:
-// CHECK: 12:
-// CHECK: 13: BB
-#undef F
-
-#define F(...) #__VA_OPT__() X ## __VA_OPT__() #__VA_OPT__( )
-
-14: F()
-15: F(1)
-
-// CHECK: 14: "" X ""
-// CHECK: 15: "" X ""
-
-#undef F
-
-#define SDEF(sname, ...) S sname __VA_OPT__(= { __VA_ARGS__ })
-
-16: SDEF(foo); // replaced by S foo;
-17: SDEF(bar, 1, 2); // replaced by S bar = { 1, 2 };
-
-// CHECK: 16: S foo ;
-// CHECK: 17: S bar = { 1, 2 };
-#undef SDEF
-
-#define F(a,...) A() #__VA_OPT__(A3 __VA_ARGS__ a ## __VA_ARGS__ ## a ## C A3) A()
-
-18: F()
-19: F(,)
-20: F(,A3)
-21: F(A3, A(),A0)
-
-
-// CHECK: 18: B ( ) "" B ( )
-// CHECK: 19: B ( ) "" B ( )
-// CHECK: 20: B ( ) "A3 expandedA3 expandedA2 expandedA1 expandedA0 A3C A3" B ( )
-// CHECK: 21: B ( ) "A3 B ( ),expandedA0 A3A(),A0A3C A3" B ( )
-
-#undef F
-
-#define F(a,...) A() #__VA_OPT__(A3 __VA_ARGS__ a ## __VA_ARGS__ ## a ## C A3) a __VA_OPT__(A0 __VA_ARGS__ a ## __VA_ARGS__ ## a ## C A0) A()
-
-22: F()
-23: F(,)
-24: F(,A0)
-25: F(A0, A(),A0)
-
-
-// CHECK: 22: B ( ) "" B ( )
-// CHECK: 23: B ( ) "" B ( )
-// CHECK: 24: B ( ) "A3 expandedA0 A0C A3" expandedA0 expandedA0 A0C expandedA0 B ( )
-// CHECK: 25: B ( ) "A3 B ( ),expandedA0 A0A(),A0A0C A3" expandedA0 expandedA0 C ( ),expandedA0 A0A(),A0A0C expandedA0 B ( )
-
-#undef F
-
-#define F(a,...) __VA_OPT__(B a ## a) ## 1
-#define G(a,...) __VA_OPT__(B a) ## 1
-26: F(,1)
-26_1: G(,1)
-// CHECK: 26: B 1
-// CHECK: 26_1: B 1
-#undef F
-#undef G
-
-#define F(a,...) B ## __VA_OPT__(a 1) ## 1
-#define G(a,...) B ## __VA_OPT__(a ## a 1) ## 1
-
-27: F(,1)
-27_1: F(A0,1)
-28: G(,1)
-// CHECK: 27: B 11
-// CHECK: 27_1: BexpandedA0 11
-// CHECK: 28: B 11
-
-#undef F
-#undef G
+// RUN: %clang_cc1 -E %s -pedantic -std=c++20 | FileCheck -strict-whitespace %s
+// RUN: %clang_cc1 -E %s -pedantic -std=c++11 | FileCheck -strict-whitespace %s
+// RUN: %clang_cc1 -E -x c %s -pedantic -std=c99 | FileCheck -strict-whitespace %s
+
+#define LPAREN (
+#define RPAREN )
+
+#define A0 expandedA0
+#define A1 expandedA1 A0
+#define A2 expandedA2 A1
+#define A3 expandedA3 A2
+
+#define A() B LPAREN )
+#define B() C LPAREN )
+#define C() D LPAREN )
+
+
+#define F(x, y) x + y
+#define ELLIP_FUNC(...) __VA_OPT__(__VA_ARGS__)
+
+1: ELLIP_FUNC(F, LPAREN, 'a', 'b', RPAREN);
+2: ELLIP_FUNC(F LPAREN 'a', 'b' RPAREN);
+#undef F
+#undef ELLIP_FUNC
+
+// CHECK: 1: F, (, 'a', 'b', );
+// CHECK: 2: 'a' + 'b';
+
+#define F(...) f(0 __VA_OPT__(,) __VA_ARGS__)
+3: F(a, b, c) // replaced by f(0, a, b, c)
+4: F() // replaced by f(0)
+
+// CHECK: 3: f(0 , a, b, c)
+// CHECK: 4: f(0 )
+#undef F
+
+#define G(X, ...) f(0, X __VA_OPT__(,) __VA_ARGS__)
+
+5: G(a, b, c) // replaced by f(0, a , b, c)
+6: G(a) // replaced by f(0, a)
+7: G(a,) // replaced by f(0, a)
+7.1: G(a,,)
+
+
+// CHECK: 5: f(0, a , b, c)
+// CHECK: 6: f(0, a )
+// CHECK: 7: f(0, a )
+// CHECK: 7.1: f(0, a , ,)
+#undef G
+
+#define HT_B() TONG
+
+#define F(x, ...) HT_ ## __VA_OPT__(x x A() #x)
+
+8: F(1)
+9: F(A(),1)
+
+// CHECK: 8: HT_
+// CHECK: 9: TONG C ( ) B ( ) "A()"
+#undef HT_B
+#undef F
+
+#define F(a,...) #__VA_OPT__(A1 a)
+
+10: F(A())
+11: F(A1 A(), 1)
+// CHECK: 10: ""
+// CHECK: 11: "A1 expandedA1 expandedA0 B ( )"
+#undef F
+
+
+#define F(a,...) a ## __VA_OPT__(A1 a) ## __VA_ARGS__ ## a
+12.0: F()
+12: F(,)
+13: F(B,)
+// CHECK: 12.0:
+// CHECK: 12:
+// CHECK: 13: BB
+#undef F
+
+#define F(...) #__VA_OPT__() X ## __VA_OPT__() #__VA_OPT__( )
+
+14: F()
+15: F(1)
+
+// CHECK: 14: "" X ""
+// CHECK: 15: "" X ""
+
+#undef F
+
+#define SDEF(sname, ...) S sname __VA_OPT__(= { __VA_ARGS__ })
+
+16: SDEF(foo); // replaced by S foo;
+17: SDEF(bar, 1, 2); // replaced by S bar = { 1, 2 };
+
+// CHECK: 16: S foo ;
+// CHECK: 17: S bar = { 1, 2 };
+#undef SDEF
+
+#define F(a,...) A() #__VA_OPT__(A3 __VA_ARGS__ a ## __VA_ARGS__ ## a ## C A3) A()
+
+18: F()
+19: F(,)
+20: F(,A3)
+21: F(A3, A(),A0)
+
+
+// CHECK: 18: B ( ) "" B ( )
+// CHECK: 19: B ( ) "" B ( )
+// CHECK: 20: B ( ) "A3 expandedA3 expandedA2 expandedA1 expandedA0 A3C A3" B ( )
+// CHECK: 21: B ( ) "A3 B ( ),expandedA0 A3A(),A0A3C A3" B ( )
+
+#undef F
+
+#define F(a,...) A() #__VA_OPT__(A3 __VA_ARGS__ a ## __VA_ARGS__ ## a ## C A3) a __VA_OPT__(A0 __VA_ARGS__ a ## __VA_ARGS__ ## a ## C A0) A()
+
+22: F()
+23: F(,)
+24: F(,A0)
+25: F(A0, A(),A0)
+
+
+// CHECK: 22: B ( ) "" B ( )
+// CHECK: 23: B ( ) "" B ( )
+// CHECK: 24: B ( ) "A3 expandedA0 A0C A3" expandedA0 expandedA0 A0C expandedA0 B ( )
+// CHECK: 25: B ( ) "A3 B ( ),expandedA0 A0A(),A0A0C A3" expandedA0 expandedA0 C ( ),expandedA0 A0A(),A0A0C expandedA0 B ( )
+
+#undef F
+
+#define F(a,...) __VA_OPT__(B a ## a) ## 1
+#define G(a,...) __VA_OPT__(B a) ## 1
+26: F(,1)
+26_1: G(,1)
+// CHECK: 26: B 1
+// CHECK: 26_1: B 1
+#undef F
+#undef G
+
+#define F(a,...) B ## __VA_OPT__(a 1) ## 1
+#define G(a,...) B ## __VA_OPT__(a ## a 1) ## 1
+
+27: F(,1)
+27_1: F(A0,1)
+28: G(,1)
+// CHECK: 27: B 11
+// CHECK: 27_1: BexpandedA0 11
+// CHECK: 28: B 11
+
+#undef F
+#undef G
diff --git a/clang/test/Sema/aarch64-sve-vector-log-ops.c b/clang/test/Sema/aarch64-sve-vector-log-ops.c
index 2beb616c1edb16..ef16e8581844d7 100644
--- a/clang/test/Sema/aarch64-sve-vector-log-ops.c
+++ b/clang/test/Sema/aarch64-sve-vector-log-ops.c
@@ -1,23 +1,23 @@
-// RUN: %clang_cc1 -triple aarch64 -target-feature +sve \
-// RUN: -disable-O0-optnone -o - -fsyntax-only %s -verify
-// REQUIRES: aarch64-registered-target
-
-#include <arm_sve.h>
-
-svfloat32_t test_log_vv_i8mf8(svfloat32_t v) {
-
- return __builtin_elementwise_log(v);
- // expected-error at -1 {{1st argument must be a vector, integer or floating point type}}
-}
-
-svfloat32_t test_log10_vv_i8mf8(svfloat32_t v) {
-
- return __builtin_elementwise_log10(v);
- // expected-error at -1 {{1st argument must be a vector, integer or floating point type}}
-}
-
-svfloat32_t test_log2_vv_i8mf8(svfloat32_t v) {
-
- return __builtin_elementwise_log2(v);
- // expected-error at -1 {{1st argument must be a vector, integer or floating point type}}
-}
+// RUN: %clang_cc1 -triple aarch64 -target-feature +sve \
+// RUN: -disable-O0-optnone -o - -fsyntax-only %s -verify
+// REQUIRES: aarch64-registered-target
+
+#include <arm_sve.h>
+
+svfloat32_t test_log_vv_i8mf8(svfloat32_t v) {
+
+ return __builtin_elementwise_log(v);
+ // expected-error at -1 {{1st argument must be a vector, integer or floating point type}}
+}
+
+svfloat32_t test_log10_vv_i8mf8(svfloat32_t v) {
+
+ return __builtin_elementwise_log10(v);
+ // expected-error at -1 {{1st argument must be a vector, integer or floating point type}}
+}
+
+svfloat32_t test_log2_vv_i8mf8(svfloat32_t v) {
+
+ return __builtin_elementwise_log2(v);
+ // expected-error at -1 {{1st argument must be a vector, integer or floating point type}}
+}
diff --git a/clang/test/Sema/aarch64-sve-vector-trig-ops.c b/clang/test/Sema/aarch64-sve-vector-trig-ops.c
index 7ca941f578c70d..5681721093d804 100644
--- a/clang/test/Sema/aarch64-sve-vector-trig-ops.c
+++ b/clang/test/Sema/aarch64-sve-vector-trig-ops.c
@@ -1,18 +1,18 @@
-// RUN: %clang_cc1 -triple aarch64 -target-feature +sve \
-// RUN: -disable-O0-optnone -o - -fsyntax-only %s -verify
-// REQUIRES: aarch64-registered-target
-
-#include <arm_sve.h>
-
-
-svfloat32_t test_sin_vv_i8mf8(svfloat32_t v) {
-
- return __builtin_elementwise_sin(v);
- // expected-error at -1 {{1st argument must be a vector, integer or floating point type}}
-}
-
-svfloat32_t test_cos_vv_i8mf8(svfloat32_t v) {
-
- return __builtin_elementwise_cos(v);
- // expected-error at -1 {{1st argument must be a vector, integer or floating point type}}
-}
+// RUN: %clang_cc1 -triple aarch64 -target-feature +sve \
+// RUN: -disable-O0-optnone -o - -fsyntax-only %s -verify
+// REQUIRES: aarch64-registered-target
+
+#include <arm_sve.h>
+
+
+svfloat32_t test_sin_vv_i8mf8(svfloat32_t v) {
+
+ return __builtin_elementwise_sin(v);
+ // expected-error at -1 {{1st argument must be a vector, integer or floating point type}}
+}
+
+svfloat32_t test_cos_vv_i8mf8(svfloat32_t v) {
+
+ return __builtin_elementwise_cos(v);
+ // expected-error at -1 {{1st argument must be a vector, integer or floating point type}}
+}
diff --git a/clang/test/Sema/incorrect_pure.cpp b/clang/test/Sema/incorrect_pure.cpp
index 69ae41c421300e..acafb7ffabaa74 100644
--- a/clang/test/Sema/incorrect_pure.cpp
+++ b/clang/test/Sema/incorrect_pure.cpp
@@ -1,14 +1,14 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
-
-[[gnu::pure]] void foo(); // expected-warning{{'pure' attribute on function returning 'void'; attribute ignored}}
-
-[[gnu::const]] void bar(); // expected-warning{{'const' attribute on function returning 'void'; attribute ignored}}
-
-struct A {
- [[gnu::pure]] A(); // expected-warning{{'pure' attribute on function returning 'void'; attribute ignored}}
-
- [[gnu::const]] A(int); // expected-warning{{'const' attribute on function returning 'void'; attribute ignored}}
- [[gnu::pure]] ~A(); // expected-warning{{'pure' attribute on function returning 'void'; attribute ignored}}
-
- [[gnu::const]] [[gnu::pure]] int m(); // expected-warning{{'const' attribute imposes more restrictions; 'pure' attribute ignored}}
-};
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+[[gnu::pure]] void foo(); // expected-warning{{'pure' attribute on function returning 'void'; attribute ignored}}
+
+[[gnu::const]] void bar(); // expected-warning{{'const' attribute on function returning 'void'; attribute ignored}}
+
+struct A {
+ [[gnu::pure]] A(); // expected-warning{{'pure' attribute on function returning 'void'; attribute ignored}}
+
+ [[gnu::const]] A(int); // expected-warning{{'const' attribute on function returning 'void'; attribute ignored}}
+ [[gnu::pure]] ~A(); // expected-warning{{'pure' attribute on function returning 'void'; attribute ignored}}
+
+ [[gnu::const]] [[gnu::pure]] int m(); // expected-warning{{'const' attribute imposes more restrictions; 'pure' attribute ignored}}
+};
diff --git a/clang/test/Sema/riscv-rvv-vector-log-ops.c b/clang/test/Sema/riscv-rvv-vector-log-ops.c
index dfbfa0664fde20..707ff84da66046 100644
--- a/clang/test/Sema/riscv-rvv-vector-log-ops.c
+++ b/clang/test/Sema/riscv-rvv-vector-log-ops.c
@@ -1,25 +1,25 @@
-// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d \
-// RUN: -target-feature +v -target-feature +zfh -target-feature +zvfh \
-// RUN: -disable-O0-optnone -o - -fsyntax-only %s -verify
-// REQUIRES: riscv-registered-target
-
-#include <riscv_vector.h>
-
-
-vfloat32mf2_t test_log_vv_i8mf8(vfloat32mf2_t v) {
-
- return __builtin_elementwise_log(v);
- // expected-error at -1 {{1st argument must be a vector, integer or floating point type}}
-}
-
-vfloat32mf2_t test_log10_vv_i8mf8(vfloat32mf2_t v) {
-
- return __builtin_elementwise_log10(v);
- // expected-error at -1 {{1st argument must be a vector, integer or floating point type}}
-}
-
-vfloat32mf2_t test_log2_vv_i8mf8(vfloat32mf2_t v) {
-
- return __builtin_elementwise_log2(v);
- // expected-error at -1 {{1st argument must be a vector, integer or floating point type}}
-}
+// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d \
+// RUN: -target-feature +v -target-feature +zfh -target-feature +zvfh \
+// RUN: -disable-O0-optnone -o - -fsyntax-only %s -verify
+// REQUIRES: riscv-registered-target
+
+#include <riscv_vector.h>
+
+
+vfloat32mf2_t test_log_vv_i8mf8(vfloat32mf2_t v) {
+
+ return __builtin_elementwise_log(v);
+ // expected-error at -1 {{1st argument must be a vector, integer or floating point type}}
+}
+
+vfloat32mf2_t test_log10_vv_i8mf8(vfloat32mf2_t v) {
+
+ return __builtin_elementwise_log10(v);
+ // expected-error at -1 {{1st argument must be a vector, integer or floating point type}}
+}
+
+vfloat32mf2_t test_log2_vv_i8mf8(vfloat32mf2_t v) {
+
+ return __builtin_elementwise_log2(v);
+ // expected-error at -1 {{1st argument must be a vector, integer or floating point type}}
+}
diff --git a/clang/test/Sema/riscv-rvv-vector-trig-ops.c b/clang/test/Sema/riscv-rvv-vector-trig-ops.c
index a457e484860602..982bda8593085f 100644
--- a/clang/test/Sema/riscv-rvv-vector-trig-ops.c
+++ b/clang/test/Sema/riscv-rvv-vector-trig-ops.c
@@ -1,19 +1,19 @@
-// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d \
-// RUN: -target-feature +v -target-feature +zfh -target-feature +zvfh \
-// RUN: -disable-O0-optnone -o - -fsyntax-only %s -verify
-// REQUIRES: riscv-registered-target
-
-#include <riscv_vector.h>
-
-
-vfloat32mf2_t test_sin_vv_i8mf8(vfloat32mf2_t v) {
-
- return __builtin_elementwise_sin(v);
- // expected-error at -1 {{1st argument must be a vector, integer or floating point type}}
-}
-
-vfloat32mf2_t test_cos_vv_i8mf8(vfloat32mf2_t v) {
-
- return __builtin_elementwise_cos(v);
- // expected-error at -1 {{1st argument must be a vector, integer or floating point type}}
-}
+// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d \
+// RUN: -target-feature +v -target-feature +zfh -target-feature +zvfh \
+// RUN: -disable-O0-optnone -o - -fsyntax-only %s -verify
+// REQUIRES: riscv-registered-target
+
+#include <riscv_vector.h>
+
+
+vfloat32mf2_t test_sin_vv_i8mf8(vfloat32mf2_t v) {
+
+ return __builtin_elementwise_sin(v);
+ // expected-error at -1 {{1st argument must be a vector, integer or floating point type}}
+}
+
+vfloat32mf2_t test_cos_vv_i8mf8(vfloat32mf2_t v) {
+
+ return __builtin_elementwise_cos(v);
+ // expected-error at -1 {{1st argument must be a vector, integer or floating point type}}
+}
diff --git a/clang/test/SemaCXX/attr-non-x86-no_caller_saved_registers.cpp b/clang/test/SemaCXX/attr-non-x86-no_caller_saved_registers.cpp
index e31a16e3400da4..00fa5bd7336b65 100644
--- a/clang/test/SemaCXX/attr-non-x86-no_caller_saved_registers.cpp
+++ b/clang/test/SemaCXX/attr-non-x86-no_caller_saved_registers.cpp
@@ -1,29 +1,29 @@
-// RUN: %clang_cc1 -std=c++11 -triple armv7-unknown-linux-gnueabi -fsyntax-only -verify %s
-
-struct a {
- int __attribute__((no_caller_saved_registers)) b; // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}}
- static void foo(int *a) __attribute__((no_caller_saved_registers)) {} // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}}
-};
-
-struct a test __attribute__((no_caller_saved_registers)); // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}}
-
-__attribute__((no_caller_saved_registers(999))) void bar(int *) {} // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}}
-
-__attribute__((no_caller_saved_registers)) void foo(int *){} // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}}
-
-[[gnu::no_caller_saved_registers]] void foo2(int *) {} // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}}
-
-typedef __attribute__((no_caller_saved_registers)) void (*foo3)(int *); // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}}
-
-typedef void (*foo5)(int *);
-
-int (*foo4)(double a, __attribute__((no_caller_saved_registers)) float b); // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}}
-
-int main(int argc, char **argv) {
- void (*fp)(int *) = foo;
- a::foo(&argc);
- foo3 func = foo2;
- func(&argc);
- foo5 __attribute__((no_caller_saved_registers)) func2 = foo2; // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}}
- return 0;
-}
+// RUN: %clang_cc1 -std=c++11 -triple armv7-unknown-linux-gnueabi -fsyntax-only -verify %s
+
+struct a {
+ int __attribute__((no_caller_saved_registers)) b; // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}}
+ static void foo(int *a) __attribute__((no_caller_saved_registers)) {} // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}}
+};
+
+struct a test __attribute__((no_caller_saved_registers)); // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}}
+
+__attribute__((no_caller_saved_registers(999))) void bar(int *) {} // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}}
+
+__attribute__((no_caller_saved_registers)) void foo(int *){} // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}}
+
+[[gnu::no_caller_saved_registers]] void foo2(int *) {} // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}}
+
+typedef __attribute__((no_caller_saved_registers)) void (*foo3)(int *); // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}}
+
+typedef void (*foo5)(int *);
+
+int (*foo4)(double a, __attribute__((no_caller_saved_registers)) float b); // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}}
+
+int main(int argc, char **argv) {
+ void (*fp)(int *) = foo;
+ a::foo(&argc);
+ foo3 func = foo2;
+ func(&argc);
+ foo5 __attribute__((no_caller_saved_registers)) func2 = foo2; // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}}
+ return 0;
+}
diff --git a/clang/test/SemaCXX/attr-x86-no_caller_saved_registers.cpp b/clang/test/SemaCXX/attr-x86-no_caller_saved_registers.cpp
index 55500519c49ef1..ec69e986144fa8 100644
--- a/clang/test/SemaCXX/attr-x86-no_caller_saved_registers.cpp
+++ b/clang/test/SemaCXX/attr-x86-no_caller_saved_registers.cpp
@@ -1,33 +1,33 @@
-// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu -fsyntax-only -verify %s
-
-struct a {
- int b __attribute__((no_caller_saved_registers)); // expected-warning {{'no_caller_saved_registers' only applies to function types; type here is 'int'}}
- static void foo(int *a) __attribute__((no_caller_saved_registers)) {}
-};
-
-struct a test __attribute__((no_caller_saved_registers)); // expected-warning {{'no_caller_saved_registers' only applies to function types; type here is 'struct a'}}
-
-__attribute__((no_caller_saved_registers(999))) void bar(int *) {} // expected-error {{'no_caller_saved_registers' attribute takes no arguments}}
-
-void __attribute__((no_caller_saved_registers)) foo(int *){}
-
-[[gnu::no_caller_saved_registers]] void foo2(int *) {}
-
-typedef __attribute__((no_caller_saved_registers)) void (*foo3)(int *);
-
-int (*foo4)(double a, __attribute__((no_caller_saved_registers)) float b); // expected-warning {{'no_caller_saved_registers' only applies to function types; type here is 'float'}}
-
-typedef void (*foo5)(int *);
-
-void foo6(){} // expected-note {{previous declaration is here}}
-
-void __attribute__((no_caller_saved_registers)) foo6(); // expected-error {{function declared with 'no_caller_saved_registers' attribute was previously declared without the 'no_caller_saved_registers' attribute}}
-
-int main(int argc, char **argv) {
- void (*fp)(int *) = foo; // expected-error {{cannot initialize a variable of type 'void (*)(int *)' with an lvalue of type 'void (int *) __attribute__((no_caller_saved_registers))'}}
- a::foo(&argc);
- foo3 func = foo2;
- func(&argc);
- foo5 __attribute__((no_caller_saved_registers)) func2 = foo2;
- return 0;
-}
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu -fsyntax-only -verify %s
+
+struct a {
+ int b __attribute__((no_caller_saved_registers)); // expected-warning {{'no_caller_saved_registers' only applies to function types; type here is 'int'}}
+ static void foo(int *a) __attribute__((no_caller_saved_registers)) {}
+};
+
+struct a test __attribute__((no_caller_saved_registers)); // expected-warning {{'no_caller_saved_registers' only applies to function types; type here is 'struct a'}}
+
+__attribute__((no_caller_saved_registers(999))) void bar(int *) {} // expected-error {{'no_caller_saved_registers' attribute takes no arguments}}
+
+void __attribute__((no_caller_saved_registers)) foo(int *){}
+
+[[gnu::no_caller_saved_registers]] void foo2(int *) {}
+
+typedef __attribute__((no_caller_saved_registers)) void (*foo3)(int *);
+
+int (*foo4)(double a, __attribute__((no_caller_saved_registers)) float b); // expected-warning {{'no_caller_saved_registers' only applies to function types; type here is 'float'}}
+
+typedef void (*foo5)(int *);
+
+void foo6(){} // expected-note {{previous declaration is here}}
+
+void __attribute__((no_caller_saved_registers)) foo6(); // expected-error {{function declared with 'no_caller_saved_registers' attribute was previously declared without the 'no_caller_saved_registers' attribute}}
+
+int main(int argc, char **argv) {
+ void (*fp)(int *) = foo; // expected-error {{cannot initialize a variable of type 'void (*)(int *)' with an lvalue of type 'void (int *) __attribute__((no_caller_saved_registers))'}}
+ a::foo(&argc);
+ foo3 func = foo2;
+ func(&argc);
+ foo5 __attribute__((no_caller_saved_registers)) func2 = foo2;
+ return 0;
+}
diff --git a/clang/test/SemaCXX/compound-literal.cpp b/clang/test/SemaCXX/compound-literal.cpp
index a3d3b9faa9fee9..2b3f716030da24 100644
--- a/clang/test/SemaCXX/compound-literal.cpp
+++ b/clang/test/SemaCXX/compound-literal.cpp
@@ -1,131 +1,131 @@
-// RUN: %clang_cc1 -fsyntax-only -std=c++03 -verify -ast-dump %s > %t-03
-// RUN: FileCheck --input-file=%t-03 %s
-// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify -ast-dump %s > %t-11
-// RUN: FileCheck --input-file=%t-11 %s
-// RUN: FileCheck --input-file=%t-11 %s --check-prefix=CHECK-CXX11
-// RUN: %clang_cc1 -verify -std=c++17 %s
-
-// http://llvm.org/PR7905
-namespace PR7905 {
-struct S; // expected-note {{forward declaration}}
-void foo1() {
- (void)(S[]) {{3}}; // expected-error {{array has incomplete element type}}
-}
-
-template <typename T> struct M { T m; };
-void foo2() {
- (void)(M<short> []) {{3}};
-}
-}
-
-// Check compound literals mixed with C++11 list-initialization.
-namespace brace_initializers {
- struct POD {
- int x, y;
- };
- struct HasCtor {
- HasCtor(int x, int y);
- };
- struct HasDtor {
- int x, y;
- ~HasDtor();
- };
- struct HasCtorDtor {
- HasCtorDtor(int x, int y);
- ~HasCtorDtor();
- };
-
- POD p = (POD){1, 2};
- // CHECK-NOT: CXXBindTemporaryExpr {{.*}} 'brace_initializers::POD'
- // CHECK: CompoundLiteralExpr {{.*}} 'POD':'brace_initializers::POD'
- // CHECK-NEXT: InitListExpr {{.*}} 'POD':'brace_initializers::POD'
- // CHECK-NEXT: ConstantExpr {{.*}}
- // CHECK-NEXT: IntegerLiteral {{.*}} 1{{$}}
- // CHECK-NEXT: ConstantExpr {{.*}}
- // CHECK-NEXT: IntegerLiteral {{.*}} 2{{$}}
-
- void test() {
- (void)(POD){1, 2};
- // CHECK-NOT: CXXBindTemporaryExpr {{.*}} 'POD':'brace_initializers::POD'
- // CHECK-NOT: ConstantExpr {{.*}} 'POD':'brace_initializers::POD'
- // CHECK: CompoundLiteralExpr {{.*}} 'POD':'brace_initializers::POD'
- // CHECK-NEXT: InitListExpr {{.*}} 'POD':'brace_initializers::POD'
- // CHECK-NEXT: IntegerLiteral {{.*}} 1{{$}}
- // CHECK-NEXT: IntegerLiteral {{.*}} 2{{$}}
-
- (void)(HasDtor){1, 2};
- // CHECK: CXXBindTemporaryExpr {{.*}} 'HasDtor':'brace_initializers::HasDtor'
- // CHECK-NEXT: CompoundLiteralExpr {{.*}} 'HasDtor':'brace_initializers::HasDtor'
- // CHECK-NEXT: InitListExpr {{.*}} 'HasDtor':'brace_initializers::HasDtor'
- // CHECK-NEXT: IntegerLiteral {{.*}} 1{{$}}
- // CHECK-NEXT: IntegerLiteral {{.*}} 2{{$}}
-
-#if __cplusplus >= 201103L
- (void)(HasCtor){1, 2};
- // CHECK-CXX11-NOT: CXXBindTemporaryExpr {{.*}} 'HasCtor':'brace_initializers::HasCtor'
- // CHECK-CXX11-NOT: ConstantExpr {{.*}} 'HasCtor':'brace_initializers::HasCtor'
- // CHECK-CXX11: CompoundLiteralExpr {{.*}} 'HasCtor':'brace_initializers::HasCtor'
- // CHECK-CXX11-NEXT: CXXTemporaryObjectExpr {{.*}} 'HasCtor':'brace_initializers::HasCtor'
- // CHECK-CXX11-NEXT: IntegerLiteral {{.*}} 1{{$}}
- // CHECK-CXX11-NEXT: IntegerLiteral {{.*}} 2{{$}}
-
- (void)(HasCtorDtor){1, 2};
- // CHECK-CXX11: CXXBindTemporaryExpr {{.*}} 'HasCtorDtor':'brace_initializers::HasCtorDtor'
- // CHECK-CXX11-NOT: ConstantExpr {{.*}} 'HasCtorDtor':'brace_initializers::HasCtorDtor'
- // CHECK-CXX11: CompoundLiteralExpr {{.*}} 'HasCtorDtor':'brace_initializers::HasCtorDtor'
- // CHECK-CXX11-NEXT: CXXTemporaryObjectExpr {{.*}} 'HasCtorDtor':'brace_initializers::HasCtorDtor'
- // CHECK-CXX11-NEXT: IntegerLiteral {{.*}} 1{{$}}
- // CHECK-CXX11-NEXT: IntegerLiteral {{.*}} 2{{$}}
-#endif
- }
-
- struct PrivateDtor {
- int x, y;
- private:
- ~PrivateDtor(); // expected-note {{declared private here}}
- };
-
- void testPrivateDtor() {
- (void)(PrivateDtor){1, 2}; // expected-error {{temporary of type 'PrivateDtor' has private destructor}}
- }
-}
-
-// This doesn't necessarily need to be an error, but CodeGen can't handle it
-// at the moment.
-int PR17415 = (int){PR17415}; // expected-error {{initializer element is not a compile-time constant}}
-
-// Make sure we accept this. (Not sure if we actually should... but we do
-// at the moment.)
-template<unsigned> struct Value { };
-template<typename T>
-int &check_narrowed(Value<sizeof((T){1.1})>);
-
-#if __cplusplus >= 201103L
-// Compound literals in global lambdas have automatic storage duration
-// and are not subject to the constant-initialization rules.
-int computed_with_lambda = [] {
- int x = 5;
- int result = ((int[]) { x, x + 2, x + 4, x + 6 })[0];
- return result;
-}();
-#endif
-
-namespace DynamicFileScopeLiteral {
-// This covers the case where we have a file-scope compound literal with a
-// non-constant initializer in C++. Previously, we had a bug where Clang forgot
-// to consider initializer list elements for bases.
-struct Empty {};
-struct Foo : Empty { // expected-note 0+ {{candidate constructor}}
- int x;
- int y;
-};
-int f();
-#if __cplusplus < 201103L
-// expected-error at +6 {{non-aggregate type 'Foo' cannot be initialized with an initializer list}}
-#elif __cplusplus < 201703L
-// expected-error at +4 {{no matching constructor}}
-#else
-// expected-error at +2 {{initializer element is not a compile-time constant}}
-#endif
-Foo o = (Foo){ {}, 1, f() };
-}
+// RUN: %clang_cc1 -fsyntax-only -std=c++03 -verify -ast-dump %s > %t-03
+// RUN: FileCheck --input-file=%t-03 %s
+// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify -ast-dump %s > %t-11
+// RUN: FileCheck --input-file=%t-11 %s
+// RUN: FileCheck --input-file=%t-11 %s --check-prefix=CHECK-CXX11
+// RUN: %clang_cc1 -verify -std=c++17 %s
+
+// http://llvm.org/PR7905
+namespace PR7905 {
+struct S; // expected-note {{forward declaration}}
+void foo1() {
+ (void)(S[]) {{3}}; // expected-error {{array has incomplete element type}}
+}
+
+template <typename T> struct M { T m; };
+void foo2() {
+ (void)(M<short> []) {{3}};
+}
+}
+
+// Check compound literals mixed with C++11 list-initialization.
+namespace brace_initializers {
+ struct POD {
+ int x, y;
+ };
+ struct HasCtor {
+ HasCtor(int x, int y);
+ };
+ struct HasDtor {
+ int x, y;
+ ~HasDtor();
+ };
+ struct HasCtorDtor {
+ HasCtorDtor(int x, int y);
+ ~HasCtorDtor();
+ };
+
+ POD p = (POD){1, 2};
+ // CHECK-NOT: CXXBindTemporaryExpr {{.*}} 'brace_initializers::POD'
+ // CHECK: CompoundLiteralExpr {{.*}} 'POD':'brace_initializers::POD'
+ // CHECK-NEXT: InitListExpr {{.*}} 'POD':'brace_initializers::POD'
+ // CHECK-NEXT: ConstantExpr {{.*}}
+ // CHECK-NEXT: IntegerLiteral {{.*}} 1{{$}}
+ // CHECK-NEXT: ConstantExpr {{.*}}
+ // CHECK-NEXT: IntegerLiteral {{.*}} 2{{$}}
+
+ void test() {
+ (void)(POD){1, 2};
+ // CHECK-NOT: CXXBindTemporaryExpr {{.*}} 'POD':'brace_initializers::POD'
+ // CHECK-NOT: ConstantExpr {{.*}} 'POD':'brace_initializers::POD'
+ // CHECK: CompoundLiteralExpr {{.*}} 'POD':'brace_initializers::POD'
+ // CHECK-NEXT: InitListExpr {{.*}} 'POD':'brace_initializers::POD'
+ // CHECK-NEXT: IntegerLiteral {{.*}} 1{{$}}
+ // CHECK-NEXT: IntegerLiteral {{.*}} 2{{$}}
+
+ (void)(HasDtor){1, 2};
+ // CHECK: CXXBindTemporaryExpr {{.*}} 'HasDtor':'brace_initializers::HasDtor'
+ // CHECK-NEXT: CompoundLiteralExpr {{.*}} 'HasDtor':'brace_initializers::HasDtor'
+ // CHECK-NEXT: InitListExpr {{.*}} 'HasDtor':'brace_initializers::HasDtor'
+ // CHECK-NEXT: IntegerLiteral {{.*}} 1{{$}}
+ // CHECK-NEXT: IntegerLiteral {{.*}} 2{{$}}
+
+#if __cplusplus >= 201103L
+ (void)(HasCtor){1, 2};
+ // CHECK-CXX11-NOT: CXXBindTemporaryExpr {{.*}} 'HasCtor':'brace_initializers::HasCtor'
+ // CHECK-CXX11-NOT: ConstantExpr {{.*}} 'HasCtor':'brace_initializers::HasCtor'
+ // CHECK-CXX11: CompoundLiteralExpr {{.*}} 'HasCtor':'brace_initializers::HasCtor'
+ // CHECK-CXX11-NEXT: CXXTemporaryObjectExpr {{.*}} 'HasCtor':'brace_initializers::HasCtor'
+ // CHECK-CXX11-NEXT: IntegerLiteral {{.*}} 1{{$}}
+ // CHECK-CXX11-NEXT: IntegerLiteral {{.*}} 2{{$}}
+
+ (void)(HasCtorDtor){1, 2};
+ // CHECK-CXX11: CXXBindTemporaryExpr {{.*}} 'HasCtorDtor':'brace_initializers::HasCtorDtor'
+ // CHECK-CXX11-NOT: ConstantExpr {{.*}} 'HasCtorDtor':'brace_initializers::HasCtorDtor'
+ // CHECK-CXX11: CompoundLiteralExpr {{.*}} 'HasCtorDtor':'brace_initializers::HasCtorDtor'
+ // CHECK-CXX11-NEXT: CXXTemporaryObjectExpr {{.*}} 'HasCtorDtor':'brace_initializers::HasCtorDtor'
+ // CHECK-CXX11-NEXT: IntegerLiteral {{.*}} 1{{$}}
+ // CHECK-CXX11-NEXT: IntegerLiteral {{.*}} 2{{$}}
+#endif
+ }
+
+ struct PrivateDtor {
+ int x, y;
+ private:
+ ~PrivateDtor(); // expected-note {{declared private here}}
+ };
+
+ void testPrivateDtor() {
+ (void)(PrivateDtor){1, 2}; // expected-error {{temporary of type 'PrivateDtor' has private destructor}}
+ }
+}
+
+// This doesn't necessarily need to be an error, but CodeGen can't handle it
+// at the moment.
+int PR17415 = (int){PR17415}; // expected-error {{initializer element is not a compile-time constant}}
+
+// Make sure we accept this. (Not sure if we actually should... but we do
+// at the moment.)
+template<unsigned> struct Value { };
+template<typename T>
+int &check_narrowed(Value<sizeof((T){1.1})>);
+
+#if __cplusplus >= 201103L
+// Compound literals in global lambdas have automatic storage duration
+// and are not subject to the constant-initialization rules.
+int computed_with_lambda = [] {
+ int x = 5;
+ int result = ((int[]) { x, x + 2, x + 4, x + 6 })[0];
+ return result;
+}();
+#endif
+
+namespace DynamicFileScopeLiteral {
+// This covers the case where we have a file-scope compound literal with a
+// non-constant initializer in C++. Previously, we had a bug where Clang forgot
+// to consider initializer list elements for bases.
+struct Empty {};
+struct Foo : Empty { // expected-note 0+ {{candidate constructor}}
+ int x;
+ int y;
+};
+int f();
+#if __cplusplus < 201103L
+// expected-error at +6 {{non-aggregate type 'Foo' cannot be initialized with an initializer list}}
+#elif __cplusplus < 201703L
+// expected-error at +4 {{no matching constructor}}
+#else
+// expected-error at +2 {{initializer element is not a compile-time constant}}
+#endif
+Foo o = (Foo){ {}, 1, f() };
+}
diff --git a/clang/test/SemaCXX/cxx23-static-callop-lambda-expression.cpp b/clang/test/SemaCXX/cxx23-static-callop-lambda-expression.cpp
index 2b89e7a3a71291..fa1497e4c2938d 100644
--- a/clang/test/SemaCXX/cxx23-static-callop-lambda-expression.cpp
+++ b/clang/test/SemaCXX/cxx23-static-callop-lambda-expression.cpp
@@ -1,33 +1,33 @@
-// RUN: %clang_cc1 -std=c++23 -fsyntax-only -verify %s
-// RUN: %clang_cc1 -std=c++23 -fsyntax-only -verify %s -fexperimental-new-constant-interpreter
-
-namespace ns1 {
- auto lstatic = []() static { return 3; };
- int (*f2)(void) = lstatic;
-
-}
-
-namespace ns1_1 {
-
- auto lstatic = []() static consteval //expected-error{{cannot take address of consteval call}} \
- expected-note {{declared here}}
- { return 3; };
-
- // FIXME: the above error should indicate that it was triggered below.
- int (*f2)(void) = lstatic;
-
-}
-
-
-namespace ns2 {
- auto lstatic = []() static { return 3; };
- constexpr int (*f2)(void) = lstatic;
- static_assert(lstatic() == f2());
-}
-
-namespace ns3 {
- void main() {
- static int x = 10;
- auto L = []() static { return x; };
- }
-}
+// RUN: %clang_cc1 -std=c++23 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -std=c++23 -fsyntax-only -verify %s -fexperimental-new-constant-interpreter
+
+namespace ns1 {
+ auto lstatic = []() static { return 3; };
+ int (*f2)(void) = lstatic;
+
+}
+
+namespace ns1_1 {
+
+ auto lstatic = []() static consteval //expected-error{{cannot take address of consteval call}} \
+ expected-note {{declared here}}
+ { return 3; };
+
+ // FIXME: the above error should indicate that it was triggered below.
+ int (*f2)(void) = lstatic;
+
+}
+
+
+namespace ns2 {
+ auto lstatic = []() static { return 3; };
+ constexpr int (*f2)(void) = lstatic;
+ static_assert(lstatic() == f2());
+}
+
+namespace ns3 {
+ void main() {
+ static int x = 10;
+ auto L = []() static { return x; };
+ }
+}
diff --git a/clang/test/SemaCXX/vla-ext-diag.cpp b/clang/test/SemaCXX/vla-ext-diag.cpp
index 7492bbae6c4685..08b78c1f3e11ce 100644
--- a/clang/test/SemaCXX/vla-ext-diag.cpp
+++ b/clang/test/SemaCXX/vla-ext-diag.cpp
@@ -1,40 +1,40 @@
-// RUN: %clang_cc1 -verify=gnu -std=gnu++11 %s
-// RUN: %clang_cc1 -verify=expected,cxx11 -Wvla -std=gnu++11 %s
-// RUN: %clang_cc1 -verify=expected,cxx11 -std=c++11 %s
-// RUN: %clang_cc1 -verify=expected,cxx98 -std=c++98 %s
-// RUN: %clang_cc1 -verify=expected,off -std=c++11 -Wno-vla-extension-static-assert %s
-// gnu-no-diagnostics
-
-// Demonstrate that we do not diagnose use of VLAs by default in GNU mode, but
-// we do diagnose them in C++ mode. Also note that we suggest use of
-// static_assert, but only in C++11 and later and only if the warning group is
-// not disabled.
-
-// C++98 mode does not emit the same notes as C++11 mode because in C++98,
-// we're looking for an integer constant expression, whereas in C++11 and later,
-// we're looking for a constant expression that is of integer type (these are
-// different operations; ICE looks at the syntactic form of the expression, but
-// C++11 constant expressions require calculating the expression value).
-void func(int n) { // cxx11-note {{declared here}} off-note {{declared here}}
- int vla[n]; // expected-warning {{variable length arrays in C++ are a Clang extension}} \
- cxx11-note {{function parameter 'n' with unknown value cannot be used in a constant expression}} \
- off-note {{function parameter 'n' with unknown value cannot be used in a constant expression}}
-}
-
-void old_style_static_assert(int n) { // cxx11-note 5 {{declared here}} off-note 2 {{declared here}}
- int array1[n != 12 ? 1 : -1]; // cxx11-warning {{variable length arrays in C++ are a Clang extension; did you mean to use 'static_assert'?}} \
- cxx98-warning {{variable length arrays in C++ are a Clang extension}} \
- cxx11-note {{function parameter 'n' with unknown value cannot be used in a constant expression}}
- int array2[n != 12 ? -1 : 1]; // cxx11-warning {{variable length arrays in C++ are a Clang extension; did you mean to use 'static_assert'?}} \
- cxx98-warning {{variable length arrays in C++ are a Clang extension}} \
- cxx11-note {{function parameter 'n' with unknown value cannot be used in a constant expression}}
- int array3[n != 12 ? 1 : n]; // expected-warning {{variable length arrays in C++ are a Clang extension}} \
- cxx11-note {{function parameter 'n' with unknown value cannot be used in a constant expression}} \
- off-note {{function parameter 'n' with unknown value cannot be used in a constant expression}}
- int array4[(n ? 1 : -1)]; // cxx11-warning {{variable length arrays in C++ are a Clang extension; did you mean to use 'static_assert'?}} \
- cxx98-warning {{variable length arrays in C++ are a Clang extension}} \
- cxx11-note {{function parameter 'n' with unknown value cannot be used in a constant expression}}
- int array5[n ? 1 : 0]; // expected-warning {{variable length arrays in C++ are a Clang extension}} \
- cxx11-note {{function parameter 'n' with unknown value cannot be used in a constant expression}} \
- off-note {{function parameter 'n' with unknown value cannot be used in a constant expression}}
-}
+// RUN: %clang_cc1 -verify=gnu -std=gnu++11 %s
+// RUN: %clang_cc1 -verify=expected,cxx11 -Wvla -std=gnu++11 %s
+// RUN: %clang_cc1 -verify=expected,cxx11 -std=c++11 %s
+// RUN: %clang_cc1 -verify=expected,cxx98 -std=c++98 %s
+// RUN: %clang_cc1 -verify=expected,off -std=c++11 -Wno-vla-extension-static-assert %s
+// gnu-no-diagnostics
+
+// Demonstrate that we do not diagnose use of VLAs by default in GNU mode, but
+// we do diagnose them in C++ mode. Also note that we suggest use of
+// static_assert, but only in C++11 and later and only if the warning group is
+// not disabled.
+
+// C++98 mode does not emit the same notes as C++11 mode because in C++98,
+// we're looking for an integer constant expression, whereas in C++11 and later,
+// we're looking for a constant expression that is of integer type (these are
+// different operations; ICE looks at the syntactic form of the expression, but
+// C++11 constant expressions require calculating the expression value).
+void func(int n) { // cxx11-note {{declared here}} off-note {{declared here}}
+ int vla[n]; // expected-warning {{variable length arrays in C++ are a Clang extension}} \
+ cxx11-note {{function parameter 'n' with unknown value cannot be used in a constant expression}} \
+ off-note {{function parameter 'n' with unknown value cannot be used in a constant expression}}
+}
+
+void old_style_static_assert(int n) { // cxx11-note 5 {{declared here}} off-note 2 {{declared here}}
+ int array1[n != 12 ? 1 : -1]; // cxx11-warning {{variable length arrays in C++ are a Clang extension; did you mean to use 'static_assert'?}} \
+ cxx98-warning {{variable length arrays in C++ are a Clang extension}} \
+ cxx11-note {{function parameter 'n' with unknown value cannot be used in a constant expression}}
+ int array2[n != 12 ? -1 : 1]; // cxx11-warning {{variable length arrays in C++ are a Clang extension; did you mean to use 'static_assert'?}} \
+ cxx98-warning {{variable length arrays in C++ are a Clang extension}} \
+ cxx11-note {{function parameter 'n' with unknown value cannot be used in a constant expression}}
+ int array3[n != 12 ? 1 : n]; // expected-warning {{variable length arrays in C++ are a Clang extension}} \
+ cxx11-note {{function parameter 'n' with unknown value cannot be used in a constant expression}} \
+ off-note {{function parameter 'n' with unknown value cannot be used in a constant expression}}
+ int array4[(n ? 1 : -1)]; // cxx11-warning {{variable length arrays in C++ are a Clang extension; did you mean to use 'static_assert'?}} \
+ cxx98-warning {{variable length arrays in C++ are a Clang extension}} \
+ cxx11-note {{function parameter 'n' with unknown value cannot be used in a constant expression}}
+ int array5[n ? 1 : 0]; // expected-warning {{variable length arrays in C++ are a Clang extension}} \
+ cxx11-note {{function parameter 'n' with unknown value cannot be used in a constant expression}} \
+ off-note {{function parameter 'n' with unknown value cannot be used in a constant expression}}
+}
diff --git a/clang/test/SemaCXX/warn-redundant-move.cpp b/clang/test/SemaCXX/warn-redundant-move.cpp
index 2bfc8c9312f02e..97f4a7c37baa25 100644
--- a/clang/test/SemaCXX/warn-redundant-move.cpp
+++ b/clang/test/SemaCXX/warn-redundant-move.cpp
@@ -1,116 +1,116 @@
-// RUN: %clang_cc1 -fsyntax-only -Wredundant-move -std=c++11 -verify %s
-// RUN: %clang_cc1 -fsyntax-only -Wredundant-move -std=c++11 -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
-// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -ast-dump | FileCheck %s --check-prefix=CHECK-AST
-
-// definitions for std::move
-namespace std {
-inline namespace foo {
-template <class T> struct remove_reference { typedef T type; };
-template <class T> struct remove_reference<T&> { typedef T type; };
-template <class T> struct remove_reference<T&&> { typedef T type; };
-
-template <class T> typename remove_reference<T>::type &&move(T &&t);
-}
-}
-
-// test1 and test2 should not warn until after implementation of DR1579.
-struct A {};
-struct B : public A {};
-
-A test1(B b1) {
- B b2;
- return b1;
- return b2;
- return std::move(b1);
- return std::move(b2);
-}
-
-struct C {
- C() {}
- C(A) {}
-};
-
-C test2(A a1, B b1) {
- A a2;
- B b2;
-
- return a1;
- return a2;
- return b1;
- return b2;
-
- return std::move(a1);
- return std::move(a2);
- return std::move(b1);
- return std::move(b2);
-}
-
-// Copy of tests above with types changed to reference types.
-A test3(B& b1) {
- B& b2 = b1;
- return b1;
- return b2;
- return std::move(b1);
- return std::move(b2);
-}
-
-C test4(A& a1, B& b1) {
- A& a2 = a1;
- B& b2 = b1;
-
- return a1;
- return a2;
- return b1;
- return b2;
-
- return std::move(a1);
- return std::move(a2);
- return std::move(b1);
- return std::move(b2);
-}
-
-// PR23819, case 2
-struct D {};
-D test5(D d) {
- return d;
- // Verify the implicit move from the AST dump
- // CHECK-AST: ReturnStmt{{.*}}line:[[@LINE-2]]
- // CHECK-AST-NEXT: CXXConstructExpr{{.*}}D{{.*}}void (D &&)
- // CHECK-AST-NEXT: ImplicitCastExpr
- // CHECK-AST-NEXT: DeclRefExpr{{.*}}ParmVar{{.*}}'d'
-
- return std::move(d);
- // expected-warning at -1{{redundant move in return statement}}
- // expected-note at -2{{remove std::move call here}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:10-[[@LINE-3]]:20}:""
- // CHECK: fix-it:"{{.*}}":{[[@LINE-4]]:21-[[@LINE-4]]:22}:""
-}
-
-namespace templates {
- struct A {};
- struct B { B(A); };
-
- // Warn once here since the type is not dependent.
- template <typename T>
- A test1(A a) {
- return std::move(a);
- // expected-warning at -1{{redundant move in return statement}}
- // expected-note at -2{{remove std::move call here}}
- // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:12-[[@LINE-3]]:22}:""
- // CHECK: fix-it:"{{.*}}":{[[@LINE-4]]:23-[[@LINE-4]]:24}:""
- }
- void run_test1() {
- test1<A>(A());
- test1<B>(A());
- }
-
- // T1 and T2 may not be the same, the warning may not always apply.
- template <typename T1, typename T2>
- T1 test2(T2 t) {
- return std::move(t);
- }
- void run_test2() {
- test2<A, A>(A());
- test2<B, A>(A());
- }
-}
+// RUN: %clang_cc1 -fsyntax-only -Wredundant-move -std=c++11 -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wredundant-move -std=c++11 -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
+// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -ast-dump | FileCheck %s --check-prefix=CHECK-AST
+
+// definitions for std::move
+namespace std {
+inline namespace foo {
+template <class T> struct remove_reference { typedef T type; };
+template <class T> struct remove_reference<T&> { typedef T type; };
+template <class T> struct remove_reference<T&&> { typedef T type; };
+
+template <class T> typename remove_reference<T>::type &&move(T &&t);
+}
+}
+
+// test1 and test2 should not warn until after implementation of DR1579.
+struct A {};
+struct B : public A {};
+
+A test1(B b1) {
+ B b2;
+ return b1;
+ return b2;
+ return std::move(b1);
+ return std::move(b2);
+}
+
+struct C {
+ C() {}
+ C(A) {}
+};
+
+C test2(A a1, B b1) {
+ A a2;
+ B b2;
+
+ return a1;
+ return a2;
+ return b1;
+ return b2;
+
+ return std::move(a1);
+ return std::move(a2);
+ return std::move(b1);
+ return std::move(b2);
+}
+
+// Copy of tests above with types changed to reference types.
+A test3(B& b1) {
+ B& b2 = b1;
+ return b1;
+ return b2;
+ return std::move(b1);
+ return std::move(b2);
+}
+
+C test4(A& a1, B& b1) {
+ A& a2 = a1;
+ B& b2 = b1;
+
+ return a1;
+ return a2;
+ return b1;
+ return b2;
+
+ return std::move(a1);
+ return std::move(a2);
+ return std::move(b1);
+ return std::move(b2);
+}
+
+// PR23819, case 2
+struct D {};
+D test5(D d) {
+ return d;
+ // Verify the implicit move from the AST dump
+ // CHECK-AST: ReturnStmt{{.*}}line:[[@LINE-2]]
+ // CHECK-AST-NEXT: CXXConstructExpr{{.*}}D{{.*}}void (D &&)
+ // CHECK-AST-NEXT: ImplicitCastExpr
+ // CHECK-AST-NEXT: DeclRefExpr{{.*}}ParmVar{{.*}}'d'
+
+ return std::move(d);
+ // expected-warning at -1{{redundant move in return statement}}
+ // expected-note at -2{{remove std::move call here}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:10-[[@LINE-3]]:20}:""
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-4]]:21-[[@LINE-4]]:22}:""
+}
+
+namespace templates {
+ struct A {};
+ struct B { B(A); };
+
+ // Warn once here since the type is not dependent.
+ template <typename T>
+ A test1(A a) {
+ return std::move(a);
+ // expected-warning at -1{{redundant move in return statement}}
+ // expected-note at -2{{remove std::move call here}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:12-[[@LINE-3]]:22}:""
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-4]]:23-[[@LINE-4]]:24}:""
+ }
+ void run_test1() {
+ test1<A>(A());
+ test1<B>(A());
+ }
+
+ // T1 and T2 may not be the same, the warning may not always apply.
+ template <typename T1, typename T2>
+ T1 test2(T2 t) {
+ return std::move(t);
+ }
+ void run_test2() {
+ test2<A, A>(A());
+ test2<B, A>(A());
+ }
+}
diff --git a/clang/test/SemaCXX/warn-shadow.cpp b/clang/test/SemaCXX/warn-shadow.cpp
index ca7f9624c08e60..a5e54436c457e7 100644
--- a/clang/test/SemaCXX/warn-shadow.cpp
+++ b/clang/test/SemaCXX/warn-shadow.cpp
@@ -61,13 +61,13 @@ class A {
// expected-warning-re at +1 4 {{constructor parameter 'f{{[0-4]}}' shadows the field 'f{{[0-9]}}' of 'A'}}
A(int f1, int f2, int f3, int f4, double overload_dummy) {}
- void test() {
- char *field; // expected-warning {{declaration shadows a field of 'A'}}
- char *data; // expected-warning {{declaration shadows a static data member of 'A'}}
+ void test() {
+ char *field; // expected-warning {{declaration shadows a field of 'A'}}
+ char *data; // expected-warning {{declaration shadows a static data member of 'A'}}
char *a1; // no warning
- char *a2; // no warning
- char *jj; // no warning
- char *jjj; // no warning
+ char *a2; // no warning
+ char *jj; // no warning
+ char *jjj; // no warning
static char *f1; // expected-warning {{declaration shadows a field of 'A'}}
}
@@ -197,14 +197,14 @@ void avoidWarningWhenRedefining(int b) { // expected-note {{previous definition
int k; // expected-note {{previous definition is here}}
typedef int k; // expected-error {{redefinition of 'k'}}
- using l=char; // no warning or error.
- using l=char; // no warning or error.
- typedef char l; // no warning or error.
+ using l=char; // no warning or error.
+ using l=char; // no warning or error.
+ typedef char l; // no warning or error.
typedef char n; // no warning or error.
typedef char n; // no warning or error.
- using n=char; // no warning or error.
-}
+ using n=char; // no warning or error.
+}
}
@@ -220,42 +220,42 @@ void f(int a) {
struct A {
void g(int a) {}
A() { int a; }
- };
-}
-}
-
-namespace PR34120 {
-struct A {
- int B; // expected-note 2 {{declared here}}
-};
-
-class C : public A {
- void D(int B) {} // expected-warning {{parameter 'B' shadows member inherited from type 'A'}}
- void E() {
- extern void f(int B); // Ok
- }
- void F(int B); // Ok, declaration; not definition.
- void G(int B);
-};
-
-void C::G(int B) { // expected-warning {{parameter 'B' shadows member inherited from type 'A'}}
-}
-
-class Private {
- int B;
-};
-class Derived : Private {
- void D(int B) {} // Ok
-};
-
-struct Static {
- static int B;
-};
-
-struct Derived2 : Static {
- void D(int B) {}
-};
-}
+ };
+}
+}
+
+namespace PR34120 {
+struct A {
+ int B; // expected-note 2 {{declared here}}
+};
+
+class C : public A {
+ void D(int B) {} // expected-warning {{parameter 'B' shadows member inherited from type 'A'}}
+ void E() {
+ extern void f(int B); // Ok
+ }
+ void F(int B); // Ok, declaration; not definition.
+ void G(int B);
+};
+
+void C::G(int B) { // expected-warning {{parameter 'B' shadows member inherited from type 'A'}}
+}
+
+class Private {
+ int B;
+};
+class Derived : Private {
+ void D(int B) {} // Ok
+};
+
+struct Static {
+ static int B;
+};
+
+struct Derived2 : Static {
+ void D(int B) {}
+};
+}
int PR24718;
enum class X { PR24718 }; // Ok, not shadowing
diff --git a/clang/test/SemaHLSL/BuiltIns/clamp-errors.hlsl b/clang/test/SemaHLSL/BuiltIns/clamp-errors.hlsl
index f669098ef515d8..8e0709eb030290 100644
--- a/clang/test/SemaHLSL/BuiltIns/clamp-errors.hlsl
+++ b/clang/test/SemaHLSL/BuiltIns/clamp-errors.hlsl
@@ -1,91 +1,91 @@
-// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected
-
-float2 test_no_second_arg(float2 p0) {
- return __builtin_hlsl_elementwise_clamp(p0);
- // expected-error at -1 {{too few arguments to function call, expected 3, have 1}}
-}
-
-float2 test_no_third_arg(float2 p0) {
- return __builtin_hlsl_elementwise_clamp(p0, p0);
- // expected-error at -1 {{too few arguments to function call, expected 3, have 2}}
-}
-
-float2 test_too_many_arg(float2 p0) {
- return __builtin_hlsl_elementwise_clamp(p0, p0, p0, p0);
- // expected-error at -1 {{too many arguments to function call, expected 3, have 4}}
-}
-
-float2 test_clamp_no_second_arg(float2 p0) {
- return clamp(p0);
- // expected-error at -1 {{no matching function for call to 'clamp'}}
-}
-
-float2 test_clamp_vector_size_mismatch(float3 p0, float2 p1) {
- return clamp(p0, p0, p1);
- // expected-warning at -1 {{implicit conversion truncates vector: 'float3' (aka 'vector<float, 3>') to 'float __attribute__((ext_vector_type(2)))' (vector of 2 'float' values)}}
-}
-
-float2 test_clamp_builtin_vector_size_mismatch(float3 p0, float2 p1) {
- return __builtin_hlsl_elementwise_clamp(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_elementwise_clamp' must have the same type}}
-}
-
-float test_clamp_scalar_mismatch(float p0, half p1) {
- return clamp(p1, p0, p1);
- // expected-error at -1 {{call to 'clamp' is ambiguous}}
-}
-
-float2 test_clamp_element_type_mismatch(half2 p0, float2 p1) {
- return clamp(p1, p0, p1);
- // expected-error at -1 {{call to 'clamp' is ambiguous}}
-}
-
-float2 test_builtin_clamp_float2_splat(float p0, float2 p1) {
- return __builtin_hlsl_elementwise_clamp(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_elementwise_clamp' must be vectors}}
-}
-
-float3 test_builtin_clamp_float3_splat(float p0, float3 p1) {
- return __builtin_hlsl_elementwise_clamp(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_elementwise_clamp' must be vectors}}
-}
-
-float4 test_builtin_clamp_float4_splat(float p0, float4 p1) {
- return __builtin_hlsl_elementwise_clamp(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_elementwise_clamp' must be vectors}}
-}
-
-float2 test_clamp_float2_int_splat(float2 p0, int p1) {
- return __builtin_hlsl_elementwise_clamp(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_elementwise_clamp' must be vectors}}
-}
-
-float3 test_clamp_float3_int_splat(float3 p0, int p1) {
- return __builtin_hlsl_elementwise_clamp(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_elementwise_clamp' must be vectors}}
-}
-
-float2 test_builtin_clamp_int_vect_to_float_vec_promotion(int2 p0, float p1) {
- return __builtin_hlsl_elementwise_clamp(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_elementwise_clamp' must be vectors}}
-}
-
-float test_builtin_clamp_bool_type_promotion(bool p0) {
- return __builtin_hlsl_elementwise_clamp(p0, p0, p0);
- // expected-error at -1 {{1st argument must be a vector, integer or floating point type (was 'bool')}}
-}
-
-float builtin_bool_to_float_type_promotion(float p0, bool p1) {
- return __builtin_hlsl_elementwise_clamp(p0, p0, p1);
- // expected-error at -1 {{3rd argument must be a floating point type (was 'bool')}}
-}
-
-float builtin_bool_to_float_type_promotion2(bool p0, float p1) {
- return __builtin_hlsl_elementwise_clamp(p1, p0, p1);
- // expected-error at -1 {{2nd argument must be a floating point type (was 'bool')}}
-}
-
-float builtin_clamp_int_to_float_promotion(float p0, int p1) {
- return __builtin_hlsl_elementwise_clamp(p0, p0, p1);
- // expected-error at -1 {{3rd argument must be a floating point type (was 'int')}}
-}
+// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected
+
+float2 test_no_second_arg(float2 p0) {
+ return __builtin_hlsl_elementwise_clamp(p0);
+ // expected-error at -1 {{too few arguments to function call, expected 3, have 1}}
+}
+
+float2 test_no_third_arg(float2 p0) {
+ return __builtin_hlsl_elementwise_clamp(p0, p0);
+ // expected-error at -1 {{too few arguments to function call, expected 3, have 2}}
+}
+
+float2 test_too_many_arg(float2 p0) {
+ return __builtin_hlsl_elementwise_clamp(p0, p0, p0, p0);
+ // expected-error at -1 {{too many arguments to function call, expected 3, have 4}}
+}
+
+float2 test_clamp_no_second_arg(float2 p0) {
+ return clamp(p0);
+ // expected-error at -1 {{no matching function for call to 'clamp'}}
+}
+
+float2 test_clamp_vector_size_mismatch(float3 p0, float2 p1) {
+ return clamp(p0, p0, p1);
+ // expected-warning at -1 {{implicit conversion truncates vector: 'float3' (aka 'vector<float, 3>') to 'float __attribute__((ext_vector_type(2)))' (vector of 2 'float' values)}}
+}
+
+float2 test_clamp_builtin_vector_size_mismatch(float3 p0, float2 p1) {
+ return __builtin_hlsl_elementwise_clamp(p0, p1, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_elementwise_clamp' must have the same type}}
+}
+
+float test_clamp_scalar_mismatch(float p0, half p1) {
+ return clamp(p1, p0, p1);
+ // expected-error at -1 {{call to 'clamp' is ambiguous}}
+}
+
+float2 test_clamp_element_type_mismatch(half2 p0, float2 p1) {
+ return clamp(p1, p0, p1);
+ // expected-error at -1 {{call to 'clamp' is ambiguous}}
+}
+
+float2 test_builtin_clamp_float2_splat(float p0, float2 p1) {
+ return __builtin_hlsl_elementwise_clamp(p0, p1, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_elementwise_clamp' must be vectors}}
+}
+
+float3 test_builtin_clamp_float3_splat(float p0, float3 p1) {
+ return __builtin_hlsl_elementwise_clamp(p0, p1, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_elementwise_clamp' must be vectors}}
+}
+
+float4 test_builtin_clamp_float4_splat(float p0, float4 p1) {
+ return __builtin_hlsl_elementwise_clamp(p0, p1, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_elementwise_clamp' must be vectors}}
+}
+
+float2 test_clamp_float2_int_splat(float2 p0, int p1) {
+ return __builtin_hlsl_elementwise_clamp(p0, p1, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_elementwise_clamp' must be vectors}}
+}
+
+float3 test_clamp_float3_int_splat(float3 p0, int p1) {
+ return __builtin_hlsl_elementwise_clamp(p0, p1, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_elementwise_clamp' must be vectors}}
+}
+
+float2 test_builtin_clamp_int_vect_to_float_vec_promotion(int2 p0, float p1) {
+ return __builtin_hlsl_elementwise_clamp(p0, p1, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_elementwise_clamp' must be vectors}}
+}
+
+float test_builtin_clamp_bool_type_promotion(bool p0) {
+ return __builtin_hlsl_elementwise_clamp(p0, p0, p0);
+ // expected-error at -1 {{1st argument must be a vector, integer or floating point type (was 'bool')}}
+}
+
+float builtin_bool_to_float_type_promotion(float p0, bool p1) {
+ return __builtin_hlsl_elementwise_clamp(p0, p0, p1);
+ // expected-error at -1 {{3rd argument must be a floating point type (was 'bool')}}
+}
+
+float builtin_bool_to_float_type_promotion2(bool p0, float p1) {
+ return __builtin_hlsl_elementwise_clamp(p1, p0, p1);
+ // expected-error at -1 {{2nd argument must be a floating point type (was 'bool')}}
+}
+
+float builtin_clamp_int_to_float_promotion(float p0, int p1) {
+ return __builtin_hlsl_elementwise_clamp(p0, p0, p1);
+ // expected-error at -1 {{3rd argument must be a floating point type (was 'int')}}
+}
diff --git a/clang/test/SemaHLSL/BuiltIns/dot-errors.hlsl b/clang/test/SemaHLSL/BuiltIns/dot-errors.hlsl
index 095f3c12ba8731..58722aaeb9246e 100644
--- a/clang/test/SemaHLSL/BuiltIns/dot-errors.hlsl
+++ b/clang/test/SemaHLSL/BuiltIns/dot-errors.hlsl
@@ -1,119 +1,119 @@
-// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected
-
-float test_no_second_arg(float2 p0) {
- return __builtin_hlsl_dot(p0);
- // expected-error at -1 {{too few arguments to function call, expected 2, have 1}}
-}
-
-float test_too_many_arg(float2 p0) {
- return __builtin_hlsl_dot(p0, p0, p0);
- // expected-error at -1 {{too many arguments to function call, expected 2, have 3}}
-}
-
-float test_dot_no_second_arg(float2 p0) {
- return dot(p0);
- // expected-error at -1 {{no matching function for call to 'dot'}}
-}
-
-float test_dot_vector_size_mismatch(float3 p0, float2 p1) {
- return dot(p0, p1);
- // expected-warning at -1 {{implicit conversion truncates vector: 'float3' (aka 'vector<float, 3>') to 'float __attribute__((ext_vector_type(2)))' (vector of 2 'float' values)}}
-}
-
-float test_dot_builtin_vector_size_mismatch(float3 p0, float2 p1) {
- return __builtin_hlsl_dot(p0, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must have the same type}}
-}
-
-float test_dot_scalar_mismatch(float p0, int p1) {
- return dot(p0, p1);
- // expected-error at -1 {{call to 'dot' is ambiguous}}
-}
-
-float test_dot_element_type_mismatch(int2 p0, float2 p1) {
- return dot(p0, p1);
- // expected-error at -1 {{call to 'dot' is ambiguous}}
-}
-
-//NOTE: for all the *_promotion we are intentionally not handling type promotion in builtins
-float test_builtin_dot_vec_int_to_float_promotion(int2 p0, float2 p1) {
- return __builtin_hlsl_dot(p0, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must have the same type}}
-}
-
-int64_t test_builtin_dot_vec_int_to_int64_promotion(int64_t2 p0, int2 p1) {
- return __builtin_hlsl_dot(p0, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must have the same type}}
-}
-
-float test_builtin_dot_vec_half_to_float_promotion(float2 p0, half2 p1) {
- return __builtin_hlsl_dot(p0, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must have the same type}}
-}
-
-#ifdef __HLSL_ENABLE_16_BIT
-float test_builtin_dot_vec_int16_to_float_promotion(float2 p0, int16_t2 p1) {
- return __builtin_hlsl_dot(p0, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must have the same type}}
-}
-
-half test_builtin_dot_vec_int16_to_half_promotion(half2 p0, int16_t2 p1) {
- return __builtin_hlsl_dot(p0, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must have the same type}}
-}
-
-int test_builtin_dot_vec_int16_to_int_promotion(int2 p0, int16_t2 p1) {
- return __builtin_hlsl_dot(p0, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must have the same type}}
-}
-
-int64_t test_builtin_dot_vec_int16_to_int64_promotion(int64_t2 p0,
- int16_t2 p1) {
- return __builtin_hlsl_dot(p0, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must have the same type}}
-}
-#endif
-
-float test_builtin_dot_float2_splat(float p0, float2 p1) {
- return __builtin_hlsl_dot(p0, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must be vectors}}
-}
-
-float test_builtin_dot_float3_splat(float p0, float3 p1) {
- return __builtin_hlsl_dot(p0, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must be vectors}}
-}
-
-float test_builtin_dot_float4_splat(float p0, float4 p1) {
- return __builtin_hlsl_dot(p0, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must be vectors}}
-}
-
-float test_dot_float2_int_splat(float2 p0, int p1) {
- return __builtin_hlsl_dot(p0, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must be vectors}}
-}
-
-float test_dot_float3_int_splat(float3 p0, int p1) {
- return __builtin_hlsl_dot(p0, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must be vectors}}
-}
-
-float test_builtin_dot_int_vect_to_float_vec_promotion(int2 p0, float p1) {
- return __builtin_hlsl_dot(p0, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must be vectors}}
-}
-
-int test_builtin_dot_bool_type_promotion(bool p0, bool p1) {
- return __builtin_hlsl_dot(p0, p1);
- // expected-error at -1 {{1st argument must be a vector, integer or floating point type (was 'bool')}}
-}
-
-double test_dot_double(double2 p0, double2 p1) {
- return dot(p0, p1);
- // expected-error at -1 {{call to 'dot' is ambiguous}}
-}
-double test_dot_double_builtin(double2 p0, double2 p1) {
- return __builtin_hlsl_dot(p0, p1);
- // expected-error at -1 {{passing 'double2' (aka 'vector<double, 2>') to parameter of incompatible type '__attribute__((__vector_size__(2 * sizeof(float)))) float' (vector of 2 'float' values)}}
-}
+// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected
+
+float test_no_second_arg(float2 p0) {
+ return __builtin_hlsl_dot(p0);
+ // expected-error at -1 {{too few arguments to function call, expected 2, have 1}}
+}
+
+float test_too_many_arg(float2 p0) {
+ return __builtin_hlsl_dot(p0, p0, p0);
+ // expected-error at -1 {{too many arguments to function call, expected 2, have 3}}
+}
+
+float test_dot_no_second_arg(float2 p0) {
+ return dot(p0);
+ // expected-error at -1 {{no matching function for call to 'dot'}}
+}
+
+float test_dot_vector_size_mismatch(float3 p0, float2 p1) {
+ return dot(p0, p1);
+ // expected-warning at -1 {{implicit conversion truncates vector: 'float3' (aka 'vector<float, 3>') to 'float __attribute__((ext_vector_type(2)))' (vector of 2 'float' values)}}
+}
+
+float test_dot_builtin_vector_size_mismatch(float3 p0, float2 p1) {
+ return __builtin_hlsl_dot(p0, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must have the same type}}
+}
+
+float test_dot_scalar_mismatch(float p0, int p1) {
+ return dot(p0, p1);
+ // expected-error at -1 {{call to 'dot' is ambiguous}}
+}
+
+float test_dot_element_type_mismatch(int2 p0, float2 p1) {
+ return dot(p0, p1);
+ // expected-error at -1 {{call to 'dot' is ambiguous}}
+}
+
+//NOTE: for all the *_promotion we are intentionally not handling type promotion in builtins
+float test_builtin_dot_vec_int_to_float_promotion(int2 p0, float2 p1) {
+ return __builtin_hlsl_dot(p0, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must have the same type}}
+}
+
+int64_t test_builtin_dot_vec_int_to_int64_promotion(int64_t2 p0, int2 p1) {
+ return __builtin_hlsl_dot(p0, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must have the same type}}
+}
+
+float test_builtin_dot_vec_half_to_float_promotion(float2 p0, half2 p1) {
+ return __builtin_hlsl_dot(p0, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must have the same type}}
+}
+
+#ifdef __HLSL_ENABLE_16_BIT
+float test_builtin_dot_vec_int16_to_float_promotion(float2 p0, int16_t2 p1) {
+ return __builtin_hlsl_dot(p0, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must have the same type}}
+}
+
+half test_builtin_dot_vec_int16_to_half_promotion(half2 p0, int16_t2 p1) {
+ return __builtin_hlsl_dot(p0, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must have the same type}}
+}
+
+int test_builtin_dot_vec_int16_to_int_promotion(int2 p0, int16_t2 p1) {
+ return __builtin_hlsl_dot(p0, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must have the same type}}
+}
+
+int64_t test_builtin_dot_vec_int16_to_int64_promotion(int64_t2 p0,
+ int16_t2 p1) {
+ return __builtin_hlsl_dot(p0, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must have the same type}}
+}
+#endif
+
+float test_builtin_dot_float2_splat(float p0, float2 p1) {
+ return __builtin_hlsl_dot(p0, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must be vectors}}
+}
+
+float test_builtin_dot_float3_splat(float p0, float3 p1) {
+ return __builtin_hlsl_dot(p0, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must be vectors}}
+}
+
+float test_builtin_dot_float4_splat(float p0, float4 p1) {
+ return __builtin_hlsl_dot(p0, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must be vectors}}
+}
+
+float test_dot_float2_int_splat(float2 p0, int p1) {
+ return __builtin_hlsl_dot(p0, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must be vectors}}
+}
+
+float test_dot_float3_int_splat(float3 p0, int p1) {
+ return __builtin_hlsl_dot(p0, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must be vectors}}
+}
+
+float test_builtin_dot_int_vect_to_float_vec_promotion(int2 p0, float p1) {
+ return __builtin_hlsl_dot(p0, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_dot' must be vectors}}
+}
+
+int test_builtin_dot_bool_type_promotion(bool p0, bool p1) {
+ return __builtin_hlsl_dot(p0, p1);
+ // expected-error at -1 {{1st argument must be a vector, integer or floating point type (was 'bool')}}
+}
+
+double test_dot_double(double2 p0, double2 p1) {
+ return dot(p0, p1);
+ // expected-error at -1 {{call to 'dot' is ambiguous}}
+}
+double test_dot_double_builtin(double2 p0, double2 p1) {
+ return __builtin_hlsl_dot(p0, p1);
+ // expected-error at -1 {{passing 'double2' (aka 'vector<double, 2>') to parameter of incompatible type '__attribute__((__vector_size__(2 * sizeof(float)))) float' (vector of 2 'float' values)}}
+}
diff --git a/clang/test/SemaHLSL/BuiltIns/lerp-errors.hlsl b/clang/test/SemaHLSL/BuiltIns/lerp-errors.hlsl
index d23357239b7e8a..868ba8a1a4713d 100644
--- a/clang/test/SemaHLSL/BuiltIns/lerp-errors.hlsl
+++ b/clang/test/SemaHLSL/BuiltIns/lerp-errors.hlsl
@@ -1,109 +1,109 @@
-// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected
-
-float2 test_no_second_arg(float2 p0) {
- return __builtin_hlsl_lerp(p0);
- // expected-error at -1 {{too few arguments to function call, expected 3, have 1}}
-}
-
-float2 test_no_third_arg(float2 p0) {
- return __builtin_hlsl_lerp(p0, p0);
- // expected-error at -1 {{too few arguments to function call, expected 3, have 2}}
-}
-
-float2 test_too_many_arg(float2 p0) {
- return __builtin_hlsl_lerp(p0, p0, p0, p0);
- // expected-error at -1 {{too many arguments to function call, expected 3, have 4}}
-}
-
-float2 test_lerp_no_second_arg(float2 p0) {
- return lerp(p0);
- // expected-error at -1 {{no matching function for call to 'lerp'}}
-}
-
-float2 test_lerp_vector_size_mismatch(float3 p0, float2 p1) {
- return lerp(p0, p0, p1);
- // expected-warning at -1 {{implicit conversion truncates vector: 'float3' (aka 'vector<float, 3>') to 'float __attribute__((ext_vector_type(2)))' (vector of 2 'float' values)}}
-}
-
-float2 test_lerp_builtin_vector_size_mismatch(float3 p0, float2 p1) {
- return __builtin_hlsl_lerp(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_lerp' must have the same type}}
-}
-
-float test_lerp_scalar_mismatch(float p0, half p1) {
- return lerp(p1, p0, p1);
- // expected-error at -1 {{call to 'lerp' is ambiguous}}
-}
-
-float2 test_lerp_element_type_mismatch(half2 p0, float2 p1) {
- return lerp(p1, p0, p1);
- // expected-error at -1 {{call to 'lerp' is ambiguous}}
-}
-
-float2 test_builtin_lerp_float2_splat(float p0, float2 p1) {
- return __builtin_hlsl_lerp(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_lerp' must be vectors}}
-}
-
-float3 test_builtin_lerp_float3_splat(float p0, float3 p1) {
- return __builtin_hlsl_lerp(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_lerp' must be vectors}}
-}
-
-float4 test_builtin_lerp_float4_splat(float p0, float4 p1) {
- return __builtin_hlsl_lerp(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_lerp' must be vectors}}
-}
-
-float2 test_lerp_float2_int_splat(float2 p0, int p1) {
- return __builtin_hlsl_lerp(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_lerp' must be vectors}}
-}
-
-float3 test_lerp_float3_int_splat(float3 p0, int p1) {
- return __builtin_hlsl_lerp(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_lerp' must be vectors}}
-}
-
-float2 test_builtin_lerp_int_vect_to_float_vec_promotion(int2 p0, float p1) {
- return __builtin_hlsl_lerp(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_lerp' must be vectors}}
-}
-
-float test_builtin_lerp_bool_type_promotion(bool p0) {
- return __builtin_hlsl_lerp(p0, p0, p0);
- // expected-error at -1 {{1st argument must be a floating point type (was 'bool')}}
-}
-
-float builtin_bool_to_float_type_promotion(float p0, bool p1) {
- return __builtin_hlsl_lerp(p0, p0, p1);
- // expected-error at -1 {{3rd argument must be a floating point type (was 'bool')}}
-}
-
-float builtin_bool_to_float_type_promotion2(bool p0, float p1) {
- return __builtin_hlsl_lerp(p1, p0, p1);
- // expected-error at -1 {{2nd argument must be a floating point type (was 'bool')}}
-}
-
-float builtin_lerp_int_to_float_promotion(float p0, int p1) {
- return __builtin_hlsl_lerp(p0, p0, p1);
- // expected-error at -1 {{3rd argument must be a floating point type (was 'int')}}
-}
-
-float4 test_lerp_int4(int4 p0, int4 p1, int4 p2) {
- return __builtin_hlsl_lerp(p0, p1, p2);
- // expected-error at -1 {{1st argument must be a floating point type (was 'int4' (aka 'vector<int, 4>'))}}
-}
-
-// note: DefaultVariadicArgumentPromotion --> DefaultArgumentPromotion has already promoted to double
-// we don't know anymore that the input was half when __builtin_hlsl_lerp is called so we default to float
-// for expected type
-half builtin_lerp_half_scalar (half p0) {
- return __builtin_hlsl_lerp ( p0, p0, p0 );
- // expected-error at -1 {{passing 'double' to parameter of incompatible type 'float'}}
-}
-
-float builtin_lerp_float_scalar ( float p0) {
- return __builtin_hlsl_lerp ( p0, p0, p0 );
- // expected-error at -1 {{passing 'double' to parameter of incompatible type 'float'}}
-}
+// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected
+
+float2 test_no_second_arg(float2 p0) {
+ return __builtin_hlsl_lerp(p0);
+ // expected-error at -1 {{too few arguments to function call, expected 3, have 1}}
+}
+
+float2 test_no_third_arg(float2 p0) {
+ return __builtin_hlsl_lerp(p0, p0);
+ // expected-error at -1 {{too few arguments to function call, expected 3, have 2}}
+}
+
+float2 test_too_many_arg(float2 p0) {
+ return __builtin_hlsl_lerp(p0, p0, p0, p0);
+ // expected-error at -1 {{too many arguments to function call, expected 3, have 4}}
+}
+
+float2 test_lerp_no_second_arg(float2 p0) {
+ return lerp(p0);
+ // expected-error at -1 {{no matching function for call to 'lerp'}}
+}
+
+float2 test_lerp_vector_size_mismatch(float3 p0, float2 p1) {
+ return lerp(p0, p0, p1);
+ // expected-warning at -1 {{implicit conversion truncates vector: 'float3' (aka 'vector<float, 3>') to 'float __attribute__((ext_vector_type(2)))' (vector of 2 'float' values)}}
+}
+
+float2 test_lerp_builtin_vector_size_mismatch(float3 p0, float2 p1) {
+ return __builtin_hlsl_lerp(p0, p1, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_lerp' must have the same type}}
+}
+
+float test_lerp_scalar_mismatch(float p0, half p1) {
+ return lerp(p1, p0, p1);
+ // expected-error at -1 {{call to 'lerp' is ambiguous}}
+}
+
+float2 test_lerp_element_type_mismatch(half2 p0, float2 p1) {
+ return lerp(p1, p0, p1);
+ // expected-error at -1 {{call to 'lerp' is ambiguous}}
+}
+
+float2 test_builtin_lerp_float2_splat(float p0, float2 p1) {
+ return __builtin_hlsl_lerp(p0, p1, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_lerp' must be vectors}}
+}
+
+float3 test_builtin_lerp_float3_splat(float p0, float3 p1) {
+ return __builtin_hlsl_lerp(p0, p1, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_lerp' must be vectors}}
+}
+
+float4 test_builtin_lerp_float4_splat(float p0, float4 p1) {
+ return __builtin_hlsl_lerp(p0, p1, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_lerp' must be vectors}}
+}
+
+float2 test_lerp_float2_int_splat(float2 p0, int p1) {
+ return __builtin_hlsl_lerp(p0, p1, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_lerp' must be vectors}}
+}
+
+float3 test_lerp_float3_int_splat(float3 p0, int p1) {
+ return __builtin_hlsl_lerp(p0, p1, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_lerp' must be vectors}}
+}
+
+float2 test_builtin_lerp_int_vect_to_float_vec_promotion(int2 p0, float p1) {
+ return __builtin_hlsl_lerp(p0, p1, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_lerp' must be vectors}}
+}
+
+float test_builtin_lerp_bool_type_promotion(bool p0) {
+ return __builtin_hlsl_lerp(p0, p0, p0);
+ // expected-error at -1 {{1st argument must be a floating point type (was 'bool')}}
+}
+
+float builtin_bool_to_float_type_promotion(float p0, bool p1) {
+ return __builtin_hlsl_lerp(p0, p0, p1);
+ // expected-error at -1 {{3rd argument must be a floating point type (was 'bool')}}
+}
+
+float builtin_bool_to_float_type_promotion2(bool p0, float p1) {
+ return __builtin_hlsl_lerp(p1, p0, p1);
+ // expected-error at -1 {{2nd argument must be a floating point type (was 'bool')}}
+}
+
+float builtin_lerp_int_to_float_promotion(float p0, int p1) {
+ return __builtin_hlsl_lerp(p0, p0, p1);
+ // expected-error at -1 {{3rd argument must be a floating point type (was 'int')}}
+}
+
+float4 test_lerp_int4(int4 p0, int4 p1, int4 p2) {
+ return __builtin_hlsl_lerp(p0, p1, p2);
+ // expected-error at -1 {{1st argument must be a floating point type (was 'int4' (aka 'vector<int, 4>'))}}
+}
+
+// note: DefaultVariadicArgumentPromotion --> DefaultArgumentPromotion has already promoted to double
+// we don't know anymore that the input was half when __builtin_hlsl_lerp is called so we default to float
+// for expected type
+half builtin_lerp_half_scalar (half p0) {
+ return __builtin_hlsl_lerp ( p0, p0, p0 );
+ // expected-error at -1 {{passing 'double' to parameter of incompatible type 'float'}}
+}
+
+float builtin_lerp_float_scalar ( float p0) {
+ return __builtin_hlsl_lerp ( p0, p0, p0 );
+ // expected-error at -1 {{passing 'double' to parameter of incompatible type 'float'}}
+}
diff --git a/clang/test/SemaHLSL/BuiltIns/mad-errors.hlsl b/clang/test/SemaHLSL/BuiltIns/mad-errors.hlsl
index 636910b7ac8abc..5dfbc23f8defa7 100644
--- a/clang/test/SemaHLSL/BuiltIns/mad-errors.hlsl
+++ b/clang/test/SemaHLSL/BuiltIns/mad-errors.hlsl
@@ -1,86 +1,86 @@
-// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected
-
-float2 test_no_second_arg(float2 p0) {
- return __builtin_hlsl_mad(p0);
- // expected-error at -1 {{too few arguments to function call, expected 3, have 1}}
-}
-
-float2 test_no_third_arg(float2 p0) {
- return __builtin_hlsl_mad(p0, p0);
- // expected-error at -1 {{too few arguments to function call, expected 3, have 2}}
-}
-
-float2 test_too_many_arg(float2 p0) {
- return __builtin_hlsl_mad(p0, p0, p0, p0);
- // expected-error at -1 {{too many arguments to function call, expected 3, have 4}}
-}
-
-float2 test_mad_no_second_arg(float2 p0) {
- return mad(p0);
- // expected-error at -1 {{no matching function for call to 'mad'}}
-}
-
-float2 test_mad_vector_size_mismatch(float3 p0, float2 p1) {
- return mad(p0, p0, p1);
- // expected-warning at -1 {{implicit conversion truncates vector: 'float3' (aka 'vector<float, 3>') to 'float __attribute__((ext_vector_type(2)))' (vector of 2 'float' values)}}
-}
-
-float2 test_mad_builtin_vector_size_mismatch(float3 p0, float2 p1) {
- return __builtin_hlsl_mad(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_mad' must have the same type}}
-}
-
-float test_mad_scalar_mismatch(float p0, half p1) {
- return mad(p1, p0, p1);
- // expected-error at -1 {{call to 'mad' is ambiguous}}
-}
-
-float2 test_mad_element_type_mismatch(half2 p0, float2 p1) {
- return mad(p1, p0, p1);
- // expected-error at -1 {{call to 'mad' is ambiguous}}
-}
-
-float2 test_builtin_mad_float2_splat(float p0, float2 p1) {
- return __builtin_hlsl_mad(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_mad' must be vectors}}
-}
-
-float3 test_builtin_mad_float3_splat(float p0, float3 p1) {
- return __builtin_hlsl_mad(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_mad' must be vectors}}
-}
-
-float4 test_builtin_mad_float4_splat(float p0, float4 p1) {
- return __builtin_hlsl_mad(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_mad' must be vectors}}
-}
-
-float2 test_mad_float2_int_splat(float2 p0, int p1) {
- return __builtin_hlsl_mad(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_mad' must be vectors}}
-}
-
-float3 test_mad_float3_int_splat(float3 p0, int p1) {
- return __builtin_hlsl_mad(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_mad' must be vectors}}
-}
-
-float2 test_builtin_mad_int_vect_to_float_vec_promotion(int2 p0, float p1) {
- return __builtin_hlsl_mad(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_mad' must be vectors}}
-}
-
-float builtin_bool_to_float_type_promotion(float p0, bool p1) {
- return __builtin_hlsl_mad(p0, p0, p1);
- // expected-error at -1 {{3rd argument must be a floating point type (was 'bool')}}
-}
-
-float builtin_bool_to_float_type_promotion2(bool p0, float p1) {
- return __builtin_hlsl_mad(p1, p0, p1);
- // expected-error at -1 {{2nd argument must be a floating point type (was 'bool')}}
-}
-
-float builtin_mad_int_to_float_promotion(float p0, int p1) {
- return __builtin_hlsl_mad(p0, p0, p1);
- // expected-error at -1 {{3rd argument must be a floating point type (was 'int')}}
-}
+// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected
+
+float2 test_no_second_arg(float2 p0) {
+ return __builtin_hlsl_mad(p0);
+ // expected-error at -1 {{too few arguments to function call, expected 3, have 1}}
+}
+
+float2 test_no_third_arg(float2 p0) {
+ return __builtin_hlsl_mad(p0, p0);
+ // expected-error at -1 {{too few arguments to function call, expected 3, have 2}}
+}
+
+float2 test_too_many_arg(float2 p0) {
+ return __builtin_hlsl_mad(p0, p0, p0, p0);
+ // expected-error at -1 {{too many arguments to function call, expected 3, have 4}}
+}
+
+float2 test_mad_no_second_arg(float2 p0) {
+ return mad(p0);
+ // expected-error at -1 {{no matching function for call to 'mad'}}
+}
+
+float2 test_mad_vector_size_mismatch(float3 p0, float2 p1) {
+ return mad(p0, p0, p1);
+ // expected-warning at -1 {{implicit conversion truncates vector: 'float3' (aka 'vector<float, 3>') to 'float __attribute__((ext_vector_type(2)))' (vector of 2 'float' values)}}
+}
+
+float2 test_mad_builtin_vector_size_mismatch(float3 p0, float2 p1) {
+ return __builtin_hlsl_mad(p0, p1, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_mad' must have the same type}}
+}
+
+float test_mad_scalar_mismatch(float p0, half p1) {
+ return mad(p1, p0, p1);
+ // expected-error at -1 {{call to 'mad' is ambiguous}}
+}
+
+float2 test_mad_element_type_mismatch(half2 p0, float2 p1) {
+ return mad(p1, p0, p1);
+ // expected-error at -1 {{call to 'mad' is ambiguous}}
+}
+
+float2 test_builtin_mad_float2_splat(float p0, float2 p1) {
+ return __builtin_hlsl_mad(p0, p1, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_mad' must be vectors}}
+}
+
+float3 test_builtin_mad_float3_splat(float p0, float3 p1) {
+ return __builtin_hlsl_mad(p0, p1, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_mad' must be vectors}}
+}
+
+float4 test_builtin_mad_float4_splat(float p0, float4 p1) {
+ return __builtin_hlsl_mad(p0, p1, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_mad' must be vectors}}
+}
+
+float2 test_mad_float2_int_splat(float2 p0, int p1) {
+ return __builtin_hlsl_mad(p0, p1, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_mad' must be vectors}}
+}
+
+float3 test_mad_float3_int_splat(float3 p0, int p1) {
+ return __builtin_hlsl_mad(p0, p1, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_mad' must be vectors}}
+}
+
+float2 test_builtin_mad_int_vect_to_float_vec_promotion(int2 p0, float p1) {
+ return __builtin_hlsl_mad(p0, p1, p1);
+ // expected-error at -1 {{all arguments to '__builtin_hlsl_mad' must be vectors}}
+}
+
+float builtin_bool_to_float_type_promotion(float p0, bool p1) {
+ return __builtin_hlsl_mad(p0, p0, p1);
+ // expected-error at -1 {{3rd argument must be a floating point type (was 'bool')}}
+}
+
+float builtin_bool_to_float_type_promotion2(bool p0, float p1) {
+ return __builtin_hlsl_mad(p1, p0, p1);
+ // expected-error at -1 {{2nd argument must be a floating point type (was 'bool')}}
+}
+
+float builtin_mad_int_to_float_promotion(float p0, int p1) {
+ return __builtin_hlsl_mad(p0, p0, p1);
+ // expected-error at -1 {{3rd argument must be a floating point type (was 'int')}}
+}
diff --git a/clang/test/SemaObjCXX/block-cleanup.mm b/clang/test/SemaObjCXX/block-cleanup.mm
index 53b2c224ab5e01..56bbf952d967f7 100644
--- a/clang/test/SemaObjCXX/block-cleanup.mm
+++ b/clang/test/SemaObjCXX/block-cleanup.mm
@@ -1,16 +1,16 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macosx10.11.0 -std=gnu++11 -o /dev/null -x objective-c++ -fblocks -ast-dump %s 2>&1 | FileCheck %s
-
-// CHECK: -FunctionDecl {{.*}} test 'id ()'
-// CHECK-NEXT: -CompoundStmt
-// CHECK-NEXT: -ReturnStmt
-// CHECK-NEXT: -ExprWithCleanups
-// CHECK-NEXT: -cleanup Block
-// CHECK-NEXT: -cleanup Block
-
- at interface NSDictionary
-+ (id)dictionaryWithObjects:(const id [])objects forKeys:(const id [])keys count:(unsigned long)cnt;
- at end
-
-id test() {
- return @{@"a": [](){}, @"b": [](){}};
-}
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.11.0 -std=gnu++11 -o /dev/null -x objective-c++ -fblocks -ast-dump %s 2>&1 | FileCheck %s
+
+// CHECK: -FunctionDecl {{.*}} test 'id ()'
+// CHECK-NEXT: -CompoundStmt
+// CHECK-NEXT: -ReturnStmt
+// CHECK-NEXT: -ExprWithCleanups
+// CHECK-NEXT: -cleanup Block
+// CHECK-NEXT: -cleanup Block
+
+ at interface NSDictionary
++ (id)dictionaryWithObjects:(const id [])objects forKeys:(const id [])keys count:(unsigned long)cnt;
+ at end
+
+id test() {
+ return @{@"a": [](){}, @"b": [](){}};
+}
diff --git a/clang/test/SemaTemplate/default-expr-arguments-3.cpp b/clang/test/SemaTemplate/default-expr-arguments-3.cpp
index 4d04209e110b34..09fb7b290a1a15 100644
--- a/clang/test/SemaTemplate/default-expr-arguments-3.cpp
+++ b/clang/test/SemaTemplate/default-expr-arguments-3.cpp
@@ -1,55 +1,55 @@
-// RUN: %clang_cc1 -std=c++14 -verify -ast-dump %s | FileCheck %s
-// expected-no-diagnostics
-
-// CHECK: FunctionDecl {{.*}} used func 'void ()'
-// CHECK-NEXT: TemplateArgument type 'int'
-// CHECK: LambdaExpr {{.*}} '(lambda at
-// CHECK: ParmVarDecl {{.*}} used f 'foo' cinit
-// CHECK-NEXT: DeclRefExpr {{.*}} 'foo' EnumConstant {{.*}} 'a' 'foo'
-
-namespace PR28795 {
- template<typename T>
- void func() {
- enum class foo { a, b };
- auto bar = [](foo f = foo::a) { return f; };
- bar();
- }
-
- void foo() {
- func<int>();
- }
-}
-
-// CHECK: ClassTemplateSpecializationDecl {{.*}} struct class2 definition
-// CHECK: TemplateArgument type 'int'
-// CHECK: LambdaExpr {{.*}} '(lambda at
-// CHECK: ParmVarDecl {{.*}} used f 'foo' cinit
-// CHECK-NEXT: DeclRefExpr {{.*}} 'foo' EnumConstant {{.*}} 'a' 'foo'
-
-// Template struct case:
-template <class T> struct class2 {
- void bar() {
- enum class foo { a, b };
- [](foo f = foo::a) { return f; }();
- }
-};
-
-template struct class2<int>;
-
-// CHECK: FunctionTemplateDecl {{.*}} f1
-// CHECK-NEXT: TemplateTypeParmDecl {{.*}} typename depth 0 index 0 T
-// CHECK-NEXT: FunctionDecl {{.*}} f1 'void ()'
-// CHECK: FunctionDecl {{.*}} f1 'void ()'
-// CHECK-NEXT: TemplateArgument type 'int'
-// CHECK: ParmVarDecl {{.*}} n 'foo' cinit
-// CHECK-NEXT: DeclRefExpr {{.*}} 'foo' EnumConstant {{.*}} 'a' 'foo'
-
-template<typename T>
-void f1() {
- enum class foo { a, b };
- struct S {
- int g1(foo n = foo::a);
- };
-}
-
-template void f1<int>();
+// RUN: %clang_cc1 -std=c++14 -verify -ast-dump %s | FileCheck %s
+// expected-no-diagnostics
+
+// CHECK: FunctionDecl {{.*}} used func 'void ()'
+// CHECK-NEXT: TemplateArgument type 'int'
+// CHECK: LambdaExpr {{.*}} '(lambda at
+// CHECK: ParmVarDecl {{.*}} used f 'foo' cinit
+// CHECK-NEXT: DeclRefExpr {{.*}} 'foo' EnumConstant {{.*}} 'a' 'foo'
+
+namespace PR28795 {
+ template<typename T>
+ void func() {
+ enum class foo { a, b };
+ auto bar = [](foo f = foo::a) { return f; };
+ bar();
+ }
+
+ void foo() {
+ func<int>();
+ }
+}
+
+// CHECK: ClassTemplateSpecializationDecl {{.*}} struct class2 definition
+// CHECK: TemplateArgument type 'int'
+// CHECK: LambdaExpr {{.*}} '(lambda at
+// CHECK: ParmVarDecl {{.*}} used f 'foo' cinit
+// CHECK-NEXT: DeclRefExpr {{.*}} 'foo' EnumConstant {{.*}} 'a' 'foo'
+
+// Template struct case:
+template <class T> struct class2 {
+ void bar() {
+ enum class foo { a, b };
+ [](foo f = foo::a) { return f; }();
+ }
+};
+
+template struct class2<int>;
+
+// CHECK: FunctionTemplateDecl {{.*}} f1
+// CHECK-NEXT: TemplateTypeParmDecl {{.*}} typename depth 0 index 0 T
+// CHECK-NEXT: FunctionDecl {{.*}} f1 'void ()'
+// CHECK: FunctionDecl {{.*}} f1 'void ()'
+// CHECK-NEXT: TemplateArgument type 'int'
+// CHECK: ParmVarDecl {{.*}} n 'foo' cinit
+// CHECK-NEXT: DeclRefExpr {{.*}} 'foo' EnumConstant {{.*}} 'a' 'foo'
+
+template<typename T>
+void f1() {
+ enum class foo { a, b };
+ struct S {
+ int g1(foo n = foo::a);
+ };
+}
+
+template void f1<int>();
diff --git a/clang/tools/clang-format-vs/ClangFormat.sln b/clang/tools/clang-format-vs/ClangFormat.sln
index 46d742bce3f0b6..15085c8f4f1fe5 100644
--- a/clang/tools/clang-format-vs/ClangFormat.sln
+++ b/clang/tools/clang-format-vs/ClangFormat.sln
@@ -1,22 +1,22 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26228.12
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClangFormat", "ClangFormat\ClangFormat.csproj", "{7FD1783E-2D31-4D05-BF23-6EBE1B42B608}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7FD1783E-2D31-4D05-BF23-6EBE1B42B608}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7FD1783E-2D31-4D05-BF23-6EBE1B42B608}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7FD1783E-2D31-4D05-BF23-6EBE1B42B608}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7FD1783E-2D31-4D05-BF23-6EBE1B42B608}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26228.12
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClangFormat", "ClangFormat\ClangFormat.csproj", "{7FD1783E-2D31-4D05-BF23-6EBE1B42B608}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {7FD1783E-2D31-4D05-BF23-6EBE1B42B608}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7FD1783E-2D31-4D05-BF23-6EBE1B42B608}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7FD1783E-2D31-4D05-BF23-6EBE1B42B608}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7FD1783E-2D31-4D05-BF23-6EBE1B42B608}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/clang/tools/clang-format-vs/ClangFormat/ClangFormat.csproj b/clang/tools/clang-format-vs/ClangFormat/ClangFormat.csproj
index e5b7ec008a1ac0..333c7b1b1c78ec 100644
--- a/clang/tools/clang-format-vs/ClangFormat/ClangFormat.csproj
+++ b/clang/tools/clang-format-vs/ClangFormat/ClangFormat.csproj
@@ -1,261 +1,261 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{7FD1783E-2D31-4D05-BF23-6EBE1B42B608}</ProjectGuid>
- <ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>LLVM.ClangFormat</RootNamespace>
- <AssemblyName>ClangFormat</AssemblyName>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>Key.snk</AssemblyOriginatorKeyFile>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <OldToolsVersion>4.0</OldToolsVersion>
- <PublishUrl>publish\</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Disk</InstallFrom>
- <UpdateEnabled>false</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>false</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- <TargetFrameworkProfile />
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <Prefer32Bit>false</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <RunCodeAnalysis>true</RunCodeAnalysis>
- <Prefer32Bit>false</Prefer32Bit>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="envdte, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <EmbedInteropTypes>True</EmbedInteropTypes>
- </Reference>
- <Reference Include="envdte80, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <EmbedInteropTypes>True</EmbedInteropTypes>
- </Reference>
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="Microsoft.VisualStudio.CoreUtility, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>..\packages\VSSDK.CoreUtility.10.0.4\lib\net40\Microsoft.VisualStudio.CoreUtility.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.Editor, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>..\packages\VSSDK.Editor.10.0.4\lib\net40\Microsoft.VisualStudio.Editor.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.OLE.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <HintPath>..\packages\VSSDK.OLE.Interop.7.0.4\lib\net20\Microsoft.VisualStudio.OLE.Interop.dll</HintPath>
- <Private>True</Private>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.Shell.10.0, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>..\packages\VSSDK.Shell.10.10.0.3\lib\net40\Microsoft.VisualStudio.Shell.10.0.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.Shell.Immutable.10.0, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>..\packages\VSSDK.Shell.Immutable.10.10.0.3\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll</HintPath>
- <Private>True</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.Shell.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <HintPath>..\packages\VSSDK.Shell.Interop.7.0.4\lib\net20\Microsoft.VisualStudio.Shell.Interop.dll</HintPath>
- <Private>True</Private>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.Shell.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <HintPath>..\packages\VSSDK.Shell.Interop.8.8.0.3\lib\net20\Microsoft.VisualStudio.Shell.Interop.8.0.dll</HintPath>
- <Private>True</Private>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.Shell.Interop.10.0" />
- <Reference Include="Microsoft.VisualStudio.Shell.Interop.9.0, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <HintPath>..\packages\VSSDK.Shell.Interop.9.9.0.3\lib\net20\Microsoft.VisualStudio.Shell.Interop.9.0.dll</HintPath>
- <Private>True</Private>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.Text.Data, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>..\packages\VSSDK.Text.10.0.4\lib\net40\Microsoft.VisualStudio.Text.Data.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.Text.Logic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>..\packages\VSSDK.Text.10.0.4\lib\net40\Microsoft.VisualStudio.Text.Logic.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.Text.UI, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>..\packages\VSSDK.Text.10.0.4\lib\net40\Microsoft.VisualStudio.Text.UI.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.Text.UI.Wpf, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>..\packages\VSSDK.Text.10.0.4\lib\net40\Microsoft.VisualStudio.Text.UI.Wpf.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.TextManager.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <Private>False</Private>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.TextManager.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <HintPath>..\packages\VSSDK.TextManager.Interop.8.8.0.4\lib\net20\Microsoft.VisualStudio.TextManager.Interop.8.0.dll</HintPath>
- <Private>True</Private>
- <Private>False</Private>
- </Reference>
- <Reference Include="PresentationCore" />
- <Reference Include="PresentationFramework" />
- <Reference Include="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <HintPath>..\packages\VSSDK.DTE.7.0.3\lib\net20\stdole.dll</HintPath>
- <EmbedInteropTypes>False</EmbedInteropTypes>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.ComponentModel.Composition" />
- <Reference Include="System.Core" />
- <Reference Include="System.Data" />
- <Reference Include="System.Design" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="WindowsBase" />
- </ItemGroup>
- <ItemGroup>
- <COMReference Include="Microsoft.VisualStudio.CommandBars">
- <Guid>{1CBA492E-7263-47BB-87FE-639000619B15}</Guid>
- <VersionMajor>8</VersionMajor>
- <VersionMinor>0</VersionMinor>
- <Lcid>0</Lcid>
- <WrapperTool>primary</WrapperTool>
- <Isolated>False</Isolated>
- <EmbedInteropTypes>False</EmbedInteropTypes>
- </COMReference>
- <COMReference Include="stdole">
- <Guid>{00020430-0000-0000-C000-000000000046}</Guid>
- <VersionMajor>2</VersionMajor>
- <VersionMinor>0</VersionMinor>
- <Lcid>0</Lcid>
- <WrapperTool>primary</WrapperTool>
- <Isolated>False</Isolated>
- <EmbedInteropTypes>False</EmbedInteropTypes>
- </COMReference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Guids.cs" />
- <Compile Include="Resources.Designer.cs">
- <AutoGen>True</AutoGen>
- <DesignTime>True</DesignTime>
- <DependentUpon>Resources.resx</DependentUpon>
- </Compile>
- <Compile Include="GlobalSuppressions.cs" />
- <Compile Include="ClangFormatPackage.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="PkgCmdID.cs" />
- <Compile Include="RunningDocTableEventsDispatcher.cs" />
- <Compile Include="Vsix.cs" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Resources.Designer.cs</LastGenOutput>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="VSPackage.resx">
- <MergeWithCTO>true</MergeWithCTO>
- <ManifestResourceName>VSPackage</ManifestResourceName>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
- <None Include="Key.snk" />
- <None Include="packages.config">
- <SubType>Designer</SubType>
- </None>
- <None Include="source.extension.vsixmanifest">
- <SubType>Designer</SubType>
- </None>
- </ItemGroup>
- <ItemGroup>
- <VSCTCompile Include="ClangFormat.vsct">
- <ResourceName>Menus.ctmenu</ResourceName>
- </VSCTCompile>
- </ItemGroup>
- <ItemGroup>
- <None Include="Resources\Images_32bit.bmp" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="clang-format.exe">
- <IncludeInVSIX>true</IncludeInVSIX>
- </Content>
- <Content Include="license.txt">
- <IncludeInVSIX>true</IncludeInVSIX>
- </Content>
- <Content Include="Resources\Package.ico" />
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include=".NETFramework,Version=v4.0">
- <Visible>False</Visible>
- <ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
- <Visible>False</Visible>
- <ProductName>Windows Installer 4.5</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <PropertyGroup>
- <UseCodebase>true</UseCodebase>
- </PropertyGroup>
- <PropertyGroup>
- <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
- <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
- </PropertyGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\VSSDK\Microsoft.VsSDK.targets" Condition="false" />
- <PropertyGroup>
- <PreBuildEvent>if not exist $(ProjectDir)Key.snk ("$(FrameworkSDKDir)Bin\NETFX 4.6 Tools\sn.exe" -k $(ProjectDir)Key.snk)</PreBuildEvent>
- </PropertyGroup>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{7FD1783E-2D31-4D05-BF23-6EBE1B42B608}</ProjectGuid>
+ <ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>LLVM.ClangFormat</RootNamespace>
+ <AssemblyName>ClangFormat</AssemblyName>
+ <SignAssembly>true</SignAssembly>
+ <AssemblyOriginatorKeyFile>Key.snk</AssemblyOriginatorKeyFile>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>4.0</OldToolsVersion>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <RunCodeAnalysis>true</RunCodeAnalysis>
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="envdte, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <EmbedInteropTypes>True</EmbedInteropTypes>
+ </Reference>
+ <Reference Include="envdte80, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <EmbedInteropTypes>True</EmbedInteropTypes>
+ </Reference>
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="Microsoft.VisualStudio.CoreUtility, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>..\packages\VSSDK.CoreUtility.10.0.4\lib\net40\Microsoft.VisualStudio.CoreUtility.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Microsoft.VisualStudio.Editor, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>..\packages\VSSDK.Editor.10.0.4\lib\net40\Microsoft.VisualStudio.Editor.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Microsoft.VisualStudio.OLE.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <HintPath>..\packages\VSSDK.OLE.Interop.7.0.4\lib\net20\Microsoft.VisualStudio.OLE.Interop.dll</HintPath>
+ <Private>True</Private>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Microsoft.VisualStudio.Shell.10.0, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>..\packages\VSSDK.Shell.10.10.0.3\lib\net40\Microsoft.VisualStudio.Shell.10.0.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Microsoft.VisualStudio.Shell.Immutable.10.0, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>..\packages\VSSDK.Shell.Immutable.10.10.0.3\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll</HintPath>
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="Microsoft.VisualStudio.Shell.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <HintPath>..\packages\VSSDK.Shell.Interop.7.0.4\lib\net20\Microsoft.VisualStudio.Shell.Interop.dll</HintPath>
+ <Private>True</Private>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Microsoft.VisualStudio.Shell.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <HintPath>..\packages\VSSDK.Shell.Interop.8.8.0.3\lib\net20\Microsoft.VisualStudio.Shell.Interop.8.0.dll</HintPath>
+ <Private>True</Private>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Microsoft.VisualStudio.Shell.Interop.10.0" />
+ <Reference Include="Microsoft.VisualStudio.Shell.Interop.9.0, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <HintPath>..\packages\VSSDK.Shell.Interop.9.9.0.3\lib\net20\Microsoft.VisualStudio.Shell.Interop.9.0.dll</HintPath>
+ <Private>True</Private>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Microsoft.VisualStudio.Text.Data, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>..\packages\VSSDK.Text.10.0.4\lib\net40\Microsoft.VisualStudio.Text.Data.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Microsoft.VisualStudio.Text.Logic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>..\packages\VSSDK.Text.10.0.4\lib\net40\Microsoft.VisualStudio.Text.Logic.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Microsoft.VisualStudio.Text.UI, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>..\packages\VSSDK.Text.10.0.4\lib\net40\Microsoft.VisualStudio.Text.UI.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Microsoft.VisualStudio.Text.UI.Wpf, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>..\packages\VSSDK.Text.10.0.4\lib\net40\Microsoft.VisualStudio.Text.UI.Wpf.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Microsoft.VisualStudio.TextManager.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Microsoft.VisualStudio.TextManager.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <HintPath>..\packages\VSSDK.TextManager.Interop.8.8.0.4\lib\net20\Microsoft.VisualStudio.TextManager.Interop.8.0.dll</HintPath>
+ <Private>True</Private>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ <Reference Include="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <HintPath>..\packages\VSSDK.DTE.7.0.3\lib\net20\stdole.dll</HintPath>
+ <EmbedInteropTypes>False</EmbedInteropTypes>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Design" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="WindowsBase" />
+ </ItemGroup>
+ <ItemGroup>
+ <COMReference Include="Microsoft.VisualStudio.CommandBars">
+ <Guid>{1CBA492E-7263-47BB-87FE-639000619B15}</Guid>
+ <VersionMajor>8</VersionMajor>
+ <VersionMinor>0</VersionMinor>
+ <Lcid>0</Lcid>
+ <WrapperTool>primary</WrapperTool>
+ <Isolated>False</Isolated>
+ <EmbedInteropTypes>False</EmbedInteropTypes>
+ </COMReference>
+ <COMReference Include="stdole">
+ <Guid>{00020430-0000-0000-C000-000000000046}</Guid>
+ <VersionMajor>2</VersionMajor>
+ <VersionMinor>0</VersionMinor>
+ <Lcid>0</Lcid>
+ <WrapperTool>primary</WrapperTool>
+ <Isolated>False</Isolated>
+ <EmbedInteropTypes>False</EmbedInteropTypes>
+ </COMReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Guids.cs" />
+ <Compile Include="Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <Compile Include="GlobalSuppressions.cs" />
+ <Compile Include="ClangFormatPackage.cs">
+ <SubType>Component</SubType>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="PkgCmdID.cs" />
+ <Compile Include="RunningDocTableEventsDispatcher.cs" />
+ <Compile Include="Vsix.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="VSPackage.resx">
+ <MergeWithCTO>true</MergeWithCTO>
+ <ManifestResourceName>VSPackage</ManifestResourceName>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Key.snk" />
+ <None Include="packages.config">
+ <SubType>Designer</SubType>
+ </None>
+ <None Include="source.extension.vsixmanifest">
+ <SubType>Designer</SubType>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <VSCTCompile Include="ClangFormat.vsct">
+ <ResourceName>Menus.ctmenu</ResourceName>
+ </VSCTCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Resources\Images_32bit.bmp" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="clang-format.exe">
+ <IncludeInVSIX>true</IncludeInVSIX>
+ </Content>
+ <Content Include="license.txt">
+ <IncludeInVSIX>true</IncludeInVSIX>
+ </Content>
+ <Content Include="Resources\Package.ico" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include=".NETFramework,Version=v4.0">
+ <Visible>False</Visible>
+ <ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 4.5</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <PropertyGroup>
+ <UseCodebase>true</UseCodebase>
+ </PropertyGroup>
+ <PropertyGroup>
+ <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
+ <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+ </PropertyGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\VSSDK\Microsoft.VsSDK.targets" Condition="false" />
+ <PropertyGroup>
+ <PreBuildEvent>if not exist $(ProjectDir)Key.snk ("$(FrameworkSDKDir)Bin\NETFX 4.6 Tools\sn.exe" -k $(ProjectDir)Key.snk)</PreBuildEvent>
+ </PropertyGroup>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
diff --git a/clang/tools/clang-format-vs/ClangFormat/ClangFormat.vsct b/clang/tools/clang-format-vs/ClangFormat/ClangFormat.vsct
index 798957740d548c..535dd6e026c87a 100644
--- a/clang/tools/clang-format-vs/ClangFormat/ClangFormat.vsct
+++ b/clang/tools/clang-format-vs/ClangFormat/ClangFormat.vsct
@@ -1,127 +1,127 @@
-<?xml version="1.0" encoding="utf-8"?>
-<CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">
-
- <!-- This is the file that defines the actual layout and type of the commands.
- It is divided in different sections (e.g. command definition, command
- placement, ...), with each defining a specific set of properties.
- See the comment before each section for more details about how to
- use it. -->
-
- <!-- The VSCT compiler (the tool that translates this file into the binary
- format that VisualStudio will consume) has the ability to run a preprocessor
- on the vsct file; this preprocessor is (usually) the C++ preprocessor, so
- it is possible to define includes and macros with the same syntax used
- in C++ files. Using this ability of the compiler here, we include some files
- defining some of the constants that we will use inside the file. -->
-
- <!--This is the file that defines the IDs for all the commands exposed by VisualStudio. -->
- <Extern href="stdidcmd.h"/>
-
- <!--This header contains the command ids for the menus provided by the shell. -->
- <Extern href="vsshlids.h"/>
-
-
-
-
- <!--The Commands section is where we the commands, menus and menu groups are defined.
- This section uses a Guid to identify the package that provides the command defined inside it. -->
- <Commands package="guidClangFormatPkg">
- <!-- Inside this section we have different sub-sections: one for the menus, another
- for the menu groups, one for the buttons (the actual commands), one for the combos
- and the last one for the bitmaps used. Each element is identified by a command id that
- is a unique pair of guid and numeric identifier; the guid part of the identifier is usually
- called "command set" and is used to group different command inside a logically related
- group; your package should define its own command set in order to avoid collisions
- with command ids defined by other packages. -->
-
-
- <!-- In this section you can define new menu groups. A menu group is a container for
- other menus or buttons (commands); from a visual point of view you can see the
- group as the part of a menu contained between two lines. The parent of a group
- must be a menu. -->
- <Groups>
-
- <Group guid="guidClangFormatCmdSet" id="MyMenuGroup" priority="0x0600">
- <Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_TOOLS"/>
- </Group>
-
-
-
- </Groups>
-
- <!--Buttons section. -->
- <!--This section defines the elements the user can interact with, like a menu command or a button
- or combo box in a toolbar. -->
- <Buttons>
- <!--To define a menu group you have to specify its ID, the parent menu and its display priority.
- The command is visible and enabled by default. If you need to change the visibility, status, etc, you can use
- the CommandFlag node.
- You can add more than one CommandFlag node e.g.:
- <CommandFlag>DefaultInvisible</CommandFlag>
- <CommandFlag>DynamicVisibility</CommandFlag>
- If you do not want an image next to your command, remove the Icon node /> -->
-
- <Button guid="guidClangFormatCmdSet" id="cmdidClangFormatSelection" priority="0x0100" type="Button">
- <Parent guid="guidClangFormatCmdSet" id="MyMenuGroup" />
- <Icon guid="guidImages" id="bmpPic1" />
- <Strings>
- <ButtonText>Clang Format Selection</ButtonText>
- </Strings>
- </Button>
-
- <Button guid="guidClangFormatCmdSet" id="cmdidClangFormatDocument" priority="0x0101" type="Button">
- <Parent guid="guidClangFormatCmdSet" id="MyMenuGroup" />
- <Icon guid="guidImages" id="bmpPic2" />
- <Strings>
- <ButtonText>Clang Format Document</ButtonText>
- </Strings>
- </Button>
-
- </Buttons>
-
- <!--The bitmaps section is used to define the bitmaps that are used for the commands.-->
- <Bitmaps>
- <!-- The bitmap id is defined in a way that is a little bit different from the others:
- the declaration starts with a guid for the bitmap strip, then there is the resource id of the
- bitmap strip containing the bitmaps and then there are the numeric ids of the elements used
- inside a button definition. An important aspect of this declaration is that the element id
- must be the actual index (1-based) of the bitmap inside the bitmap strip. -->
- <Bitmap guid="guidImages" href="Resources\Images_32bit.bmp" usedList="bmpPic1, bmpPic2, bmpPicSearch, bmpPicX, bmpPicArrows"/>
-
- </Bitmaps>
-
- </Commands>
-
-
- <KeyBindings>
- <KeyBinding guid="guidClangFormatCmdSet" id="cmdidClangFormatSelection" editor="guidTextEditor" key1="R" mod1="Control" key2="F" mod2="Control"/>
- <KeyBinding guid="guidClangFormatCmdSet" id="cmdidClangFormatDocument" editor="guidTextEditor" key1="R" mod1="Control" key2="D" mod2="Control"/>
- </KeyBindings>
-
-
-
- <Symbols>
- <!-- This is the package guid. -->
- <GuidSymbol name="guidClangFormatPkg" value="{c5286038-25d3-4f65-83a8-51fa2df4a146}" />
-
- <!-- This is the guid used to group the menu commands together -->
- <GuidSymbol name="guidClangFormatCmdSet" value="{e39cbab1-0f96-4022-a2bc-da5a9db7eb78}">
-
- <IDSymbol name="MyMenuGroup" value="0x1020" />
- <IDSymbol name="cmdidClangFormatSelection" value="0x0100" />
- <IDSymbol name="cmdidClangFormatDocument" value="0x0101" />
- </GuidSymbol>
-
- <GuidSymbol name="guidTextEditor" value="{8B382828-6202-11d1-8870-0000F87579D2}" />
-
-
- <GuidSymbol name="guidImages" value="{6d53937b-9ae1-42e1-8849-d876dcdbad7b}" >
- <IDSymbol name="bmpPic1" value="1" />
- <IDSymbol name="bmpPic2" value="2" />
- <IDSymbol name="bmpPicSearch" value="3" />
- <IDSymbol name="bmpPicX" value="4" />
- <IDSymbol name="bmpPicArrows" value="5" />
- </GuidSymbol>
- </Symbols>
-
-</CommandTable>
+<?xml version="1.0" encoding="utf-8"?>
+<CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <!-- This is the file that defines the actual layout and type of the commands.
+ It is divided in different sections (e.g. command definition, command
+ placement, ...), with each defining a specific set of properties.
+ See the comment before each section for more details about how to
+ use it. -->
+
+ <!-- The VSCT compiler (the tool that translates this file into the binary
+ format that VisualStudio will consume) has the ability to run a preprocessor
+ on the vsct file; this preprocessor is (usually) the C++ preprocessor, so
+ it is possible to define includes and macros with the same syntax used
+ in C++ files. Using this ability of the compiler here, we include some files
+ defining some of the constants that we will use inside the file. -->
+
+ <!--This is the file that defines the IDs for all the commands exposed by VisualStudio. -->
+ <Extern href="stdidcmd.h"/>
+
+ <!--This header contains the command ids for the menus provided by the shell. -->
+ <Extern href="vsshlids.h"/>
+
+
+
+
+ <!--The Commands section is where we the commands, menus and menu groups are defined.
+ This section uses a Guid to identify the package that provides the command defined inside it. -->
+ <Commands package="guidClangFormatPkg">
+ <!-- Inside this section we have different sub-sections: one for the menus, another
+ for the menu groups, one for the buttons (the actual commands), one for the combos
+ and the last one for the bitmaps used. Each element is identified by a command id that
+ is a unique pair of guid and numeric identifier; the guid part of the identifier is usually
+ called "command set" and is used to group different command inside a logically related
+ group; your package should define its own command set in order to avoid collisions
+ with command ids defined by other packages. -->
+
+
+ <!-- In this section you can define new menu groups. A menu group is a container for
+ other menus or buttons (commands); from a visual point of view you can see the
+ group as the part of a menu contained between two lines. The parent of a group
+ must be a menu. -->
+ <Groups>
+
+ <Group guid="guidClangFormatCmdSet" id="MyMenuGroup" priority="0x0600">
+ <Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_TOOLS"/>
+ </Group>
+
+
+
+ </Groups>
+
+ <!--Buttons section. -->
+ <!--This section defines the elements the user can interact with, like a menu command or a button
+ or combo box in a toolbar. -->
+ <Buttons>
+ <!--To define a menu group you have to specify its ID, the parent menu and its display priority.
+ The command is visible and enabled by default. If you need to change the visibility, status, etc, you can use
+ the CommandFlag node.
+ You can add more than one CommandFlag node e.g.:
+ <CommandFlag>DefaultInvisible</CommandFlag>
+ <CommandFlag>DynamicVisibility</CommandFlag>
+ If you do not want an image next to your command, remove the Icon node /> -->
+
+ <Button guid="guidClangFormatCmdSet" id="cmdidClangFormatSelection" priority="0x0100" type="Button">
+ <Parent guid="guidClangFormatCmdSet" id="MyMenuGroup" />
+ <Icon guid="guidImages" id="bmpPic1" />
+ <Strings>
+ <ButtonText>Clang Format Selection</ButtonText>
+ </Strings>
+ </Button>
+
+ <Button guid="guidClangFormatCmdSet" id="cmdidClangFormatDocument" priority="0x0101" type="Button">
+ <Parent guid="guidClangFormatCmdSet" id="MyMenuGroup" />
+ <Icon guid="guidImages" id="bmpPic2" />
+ <Strings>
+ <ButtonText>Clang Format Document</ButtonText>
+ </Strings>
+ </Button>
+
+ </Buttons>
+
+ <!--The bitmaps section is used to define the bitmaps that are used for the commands.-->
+ <Bitmaps>
+ <!-- The bitmap id is defined in a way that is a little bit different from the others:
+ the declaration starts with a guid for the bitmap strip, then there is the resource id of the
+ bitmap strip containing the bitmaps and then there are the numeric ids of the elements used
+ inside a button definition. An important aspect of this declaration is that the element id
+ must be the actual index (1-based) of the bitmap inside the bitmap strip. -->
+ <Bitmap guid="guidImages" href="Resources\Images_32bit.bmp" usedList="bmpPic1, bmpPic2, bmpPicSearch, bmpPicX, bmpPicArrows"/>
+
+ </Bitmaps>
+
+ </Commands>
+
+
+ <KeyBindings>
+ <KeyBinding guid="guidClangFormatCmdSet" id="cmdidClangFormatSelection" editor="guidTextEditor" key1="R" mod1="Control" key2="F" mod2="Control"/>
+ <KeyBinding guid="guidClangFormatCmdSet" id="cmdidClangFormatDocument" editor="guidTextEditor" key1="R" mod1="Control" key2="D" mod2="Control"/>
+ </KeyBindings>
+
+
+
+ <Symbols>
+ <!-- This is the package guid. -->
+ <GuidSymbol name="guidClangFormatPkg" value="{c5286038-25d3-4f65-83a8-51fa2df4a146}" />
+
+ <!-- This is the guid used to group the menu commands together -->
+ <GuidSymbol name="guidClangFormatCmdSet" value="{e39cbab1-0f96-4022-a2bc-da5a9db7eb78}">
+
+ <IDSymbol name="MyMenuGroup" value="0x1020" />
+ <IDSymbol name="cmdidClangFormatSelection" value="0x0100" />
+ <IDSymbol name="cmdidClangFormatDocument" value="0x0101" />
+ </GuidSymbol>
+
+ <GuidSymbol name="guidTextEditor" value="{8B382828-6202-11d1-8870-0000F87579D2}" />
+
+
+ <GuidSymbol name="guidImages" value="{6d53937b-9ae1-42e1-8849-d876dcdbad7b}" >
+ <IDSymbol name="bmpPic1" value="1" />
+ <IDSymbol name="bmpPic2" value="2" />
+ <IDSymbol name="bmpPicSearch" value="3" />
+ <IDSymbol name="bmpPicX" value="4" />
+ <IDSymbol name="bmpPicArrows" value="5" />
+ </GuidSymbol>
+ </Symbols>
+
+</CommandTable>
diff --git a/clang/tools/clang-format-vs/ClangFormat/GlobalSuppressions.cs b/clang/tools/clang-format-vs/ClangFormat/GlobalSuppressions.cs
index 175a74e291df24..a893f9d2500213 100644
--- a/clang/tools/clang-format-vs/ClangFormat/GlobalSuppressions.cs
+++ b/clang/tools/clang-format-vs/ClangFormat/GlobalSuppressions.cs
@@ -1,11 +1,11 @@
-// This file is used by Code Analysis to maintain SuppressMessage
-// attributes that are applied to this project. Project-level
-// suppressions either have no target or are given a specific target
-// and scoped to a namespace, type, member, etc.
-//
-// To add a suppression to this file, right-click the message in the
-// Error List, point to "Suppress Message(s)", and click "In Project
-// Suppression File". You do not need to add suppressions to this
-// file manually.
-
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1017:MarkAssembliesWithComVisible")]
+// This file is used by Code Analysis to maintain SuppressMessage
+// attributes that are applied to this project. Project-level
+// suppressions either have no target or are given a specific target
+// and scoped to a namespace, type, member, etc.
+//
+// To add a suppression to this file, right-click the message in the
+// Error List, point to "Suppress Message(s)", and click "In Project
+// Suppression File". You do not need to add suppressions to this
+// file manually.
+
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1017:MarkAssembliesWithComVisible")]
diff --git a/clang/tools/clang-format-vs/ClangFormat/Guids.cs b/clang/tools/clang-format-vs/ClangFormat/Guids.cs
index ed1c12d61e4ea2..fb2978a1dea963 100644
--- a/clang/tools/clang-format-vs/ClangFormat/Guids.cs
+++ b/clang/tools/clang-format-vs/ClangFormat/Guids.cs
@@ -1,12 +1,12 @@
-using System;
-
-namespace LLVM.ClangFormat
-{
- static class GuidList
- {
- public const string guidClangFormatPkgString = "c5286038-25d3-4f65-83a8-51fa2df4a146";
- public const string guidClangFormatCmdSetString = "e39cbab1-0f96-4022-a2bc-da5a9db7eb78";
-
- public static readonly Guid guidClangFormatCmdSet = new Guid(guidClangFormatCmdSetString);
- };
-}
+using System;
+
+namespace LLVM.ClangFormat
+{
+ static class GuidList
+ {
+ public const string guidClangFormatPkgString = "c5286038-25d3-4f65-83a8-51fa2df4a146";
+ public const string guidClangFormatCmdSetString = "e39cbab1-0f96-4022-a2bc-da5a9db7eb78";
+
+ public static readonly Guid guidClangFormatCmdSet = new Guid(guidClangFormatCmdSetString);
+ };
+}
diff --git a/clang/tools/clang-format-vs/ClangFormat/PkgCmdID.cs b/clang/tools/clang-format-vs/ClangFormat/PkgCmdID.cs
index c274d1ca1b4b2e..a3b0df20c760da 100644
--- a/clang/tools/clang-format-vs/ClangFormat/PkgCmdID.cs
+++ b/clang/tools/clang-format-vs/ClangFormat/PkgCmdID.cs
@@ -1,8 +1,8 @@
-namespace LLVM.ClangFormat
-{
- static class PkgCmdIDList
- {
- public const uint cmdidClangFormatSelection = 0x100;
- public const uint cmdidClangFormatDocument = 0x101;
- };
-}
+namespace LLVM.ClangFormat
+{
+ static class PkgCmdIDList
+ {
+ public const uint cmdidClangFormatSelection = 0x100;
+ public const uint cmdidClangFormatDocument = 0x101;
+ };
+}
diff --git a/clang/tools/clang-format-vs/ClangFormat/Properties/AssemblyInfo.cs b/clang/tools/clang-format-vs/ClangFormat/Properties/AssemblyInfo.cs
index b1cef49414b5eb..58dad21791bbb0 100644
--- a/clang/tools/clang-format-vs/ClangFormat/Properties/AssemblyInfo.cs
+++ b/clang/tools/clang-format-vs/ClangFormat/Properties/AssemblyInfo.cs
@@ -1,33 +1,33 @@
-using System;
-using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("ClangFormat")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("LLVM")]
-[assembly: AssemblyProduct("ClangFormat")]
-[assembly: AssemblyCopyright("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-[assembly: ComVisible(false)]
-[assembly: CLSCompliant(false)]
-[assembly: NeutralResourcesLanguage("en-US")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-
-[assembly: AssemblyVersion("1.1.0.0")]
-[assembly: AssemblyFileVersion("1.1.0.0")]
+using System;
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("ClangFormat")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("LLVM")]
+[assembly: AssemblyProduct("ClangFormat")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: ComVisible(false)]
+[assembly: CLSCompliant(false)]
+[assembly: NeutralResourcesLanguage("en-US")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.1.0.0")]
+[assembly: AssemblyFileVersion("1.1.0.0")]
diff --git a/clang/tools/clang-format-vs/ClangFormat/Resources.Designer.cs b/clang/tools/clang-format-vs/ClangFormat/Resources.Designer.cs
index e3129b3db83ae1..e9c051988f68d2 100644
--- a/clang/tools/clang-format-vs/ClangFormat/Resources.Designer.cs
+++ b/clang/tools/clang-format-vs/ClangFormat/Resources.Designer.cs
@@ -1,63 +1,63 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace LLVM.ClangFormat {
- using System;
-
-
- /// <summary>
- /// A strongly-typed resource class, for looking up localized strings, etc.
- /// </summary>
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
- }
-
- /// <summary>
- /// Returns the cached ResourceManager instance used by this class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LLVM.ClangFormat.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- /// <summary>
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
- }
-}
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace LLVM.ClangFormat {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LLVM.ClangFormat.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/clang/tools/clang-format-vs/ClangFormat/Resources.resx b/clang/tools/clang-format-vs/ClangFormat/Resources.resx
index 352987aa07bc69..891c592b4f31f3 100644
--- a/clang/tools/clang-format-vs/ClangFormat/Resources.resx
+++ b/clang/tools/clang-format-vs/ClangFormat/Resources.resx
@@ -1,129 +1,129 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- VS SDK Notes: This resx file contains the resources that will be consumed directly by your package.
- For example, if you chose to create a tool window, there is a resource with ID 'CanNotCreateWindow'. This
- is used in VsPkg.cs to determine the string to show the user if there is an error when attempting to create
- the tool window.
-
- Resources that are accessed directly from your package *by Visual Studio* are stored in the VSPackage.resx
- file.
--->
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ VS SDK Notes: This resx file contains the resources that will be consumed directly by your package.
+ For example, if you chose to create a tool window, there is a resource with ID 'CanNotCreateWindow'. This
+ is used in VsPkg.cs to determine the string to show the user if there is an error when attempting to create
+ the tool window.
+
+ Resources that are accessed directly from your package *by Visual Studio* are stored in the VSPackage.resx
+ file.
+-->
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
</root>
\ No newline at end of file
diff --git a/clang/tools/clang-format-vs/ClangFormat/VSPackage.resx b/clang/tools/clang-format-vs/ClangFormat/VSPackage.resx
index 81102d38a07a58..6d64e89ab8d68d 100644
--- a/clang/tools/clang-format-vs/ClangFormat/VSPackage.resx
+++ b/clang/tools/clang-format-vs/ClangFormat/VSPackage.resx
@@ -1,140 +1,140 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- VS SDK Notes: This resx file contains the resources that will be consumed from your package by Visual Studio.
- For example, Visual Studio will attempt to load resource '400' from this resource stream when it needs to
- load your package's icon. Because Visual Studio will always look in the VSPackage.resources stream first for
- resources it needs, you should put additional resources that Visual Studio will load directly into this resx
- file.
-
- Resources that you would like to access directly from your package in a strong-typed fashion should be stored
- in Resources.resx or another resx file.
--->
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
- <data name="110" xml:space="preserve">
- <value>ClangFormat</value>
- </data>
- <data name="112" xml:space="preserve">
- <value>Formats code by calling the clang-format executable.</value>
- </data>
- <data name="400" type="System.Resources.ResXFileRef, System.Windows.Forms">
- <value>Resources\Package.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
- </data>
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ VS SDK Notes: This resx file contains the resources that will be consumed from your package by Visual Studio.
+ For example, Visual Studio will attempt to load resource '400' from this resource stream when it needs to
+ load your package's icon. Because Visual Studio will always look in the VSPackage.resources stream first for
+ resources it needs, you should put additional resources that Visual Studio will load directly into this resx
+ file.
+
+ Resources that you would like to access directly from your package in a strong-typed fashion should be stored
+ in Resources.resx or another resx file.
+-->
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="110" xml:space="preserve">
+ <value>ClangFormat</value>
+ </data>
+ <data name="112" xml:space="preserve">
+ <value>Formats code by calling the clang-format executable.</value>
+ </data>
+ <data name="400" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>Resources\Package.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
</root>
\ No newline at end of file
diff --git a/clang/tools/clang-format-vs/README.txt b/clang/tools/clang-format-vs/README.txt
index 2cac5b9af9e3cc..6593480080eaa5 100644
--- a/clang/tools/clang-format-vs/README.txt
+++ b/clang/tools/clang-format-vs/README.txt
@@ -1,51 +1,51 @@
-This directory contains a VSPackage project to generate a Visual Studio extension
-for clang-format.
-
-Build prerequisites are:
-- Visual Studio 2015
-- Extensions SDK (you'll be prompted to install it if you open ClangFormat.sln)
-
-The extension is built using CMake to generate the usual LLVM.sln by setting
-the following CMake vars:
-
-- BUILD_CLANG_FORMAT_VS_PLUGIN=ON
-
-- NUGET_EXE_DIR=path/to/nuget_dir (unless nuget.exe is already available in PATH)
-
-example:
- cd /d C:\code\llvm
- mkdir build & cd build
- cmake -DBUILD_CLANG_FORMAT_VS_PLUGIN=ON -DNUGET_EXE_DIR=C:\nuget ..
-
-Once LLVM.sln is generated, build the clang_format_vsix target, which will build
-ClangFormat.sln, the C# extension application.
-
-The CMake build will copy clang-format.exe and LICENSE.TXT into the ClangFormat/
-directory so they can be bundled with the plug-in, as well as creating
-ClangFormat/source.extension.vsixmanifest. Once the plug-in has been built with
-CMake once, it can be built manually from the ClangFormat.sln solution in Visual
-Studio.
-
-===========
- Debugging
-===========
-
-Once you've built the clang_format_vsix project from LLVM.sln at least once,
-open ClangFormat.sln in Visual Studio, then:
-
-- Make sure the "Debug" target is selected
-- Open the ClangFormat project properties
-- Select the Debug tab
-- Set "Start external program:" to where your devenv.exe is installed. Typically
- it's "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe"
-- Set "Command line arguments" to: /rootsuffix Exp
-- You can now set breakpoints if you like
-- Press F5 to build and run with debugger
-
-If all goes well, a new instance of Visual Studio will be launched in a special
-mode where it uses the experimental hive instead of the normal configuration hive.
-By default, when you build a VSIX project in Visual Studio, it auto-registers the
-extension in the experimental hive, allowing you to test it. In the new Visual Studio
-instance, open or create a C++ solution, and you should now see the Clang Format
-entries in the Tool menu. You can test it out, and any breakpoints you set will be
-hit where you can debug as usual.
+This directory contains a VSPackage project to generate a Visual Studio extension
+for clang-format.
+
+Build prerequisites are:
+- Visual Studio 2015
+- Extensions SDK (you'll be prompted to install it if you open ClangFormat.sln)
+
+The extension is built using CMake to generate the usual LLVM.sln by setting
+the following CMake vars:
+
+- BUILD_CLANG_FORMAT_VS_PLUGIN=ON
+
+- NUGET_EXE_DIR=path/to/nuget_dir (unless nuget.exe is already available in PATH)
+
+example:
+ cd /d C:\code\llvm
+ mkdir build & cd build
+ cmake -DBUILD_CLANG_FORMAT_VS_PLUGIN=ON -DNUGET_EXE_DIR=C:\nuget ..
+
+Once LLVM.sln is generated, build the clang_format_vsix target, which will build
+ClangFormat.sln, the C# extension application.
+
+The CMake build will copy clang-format.exe and LICENSE.TXT into the ClangFormat/
+directory so they can be bundled with the plug-in, as well as creating
+ClangFormat/source.extension.vsixmanifest. Once the plug-in has been built with
+CMake once, it can be built manually from the ClangFormat.sln solution in Visual
+Studio.
+
+===========
+ Debugging
+===========
+
+Once you've built the clang_format_vsix project from LLVM.sln at least once,
+open ClangFormat.sln in Visual Studio, then:
+
+- Make sure the "Debug" target is selected
+- Open the ClangFormat project properties
+- Select the Debug tab
+- Set "Start external program:" to where your devenv.exe is installed. Typically
+ it's "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe"
+- Set "Command line arguments" to: /rootsuffix Exp
+- You can now set breakpoints if you like
+- Press F5 to build and run with debugger
+
+If all goes well, a new instance of Visual Studio will be launched in a special
+mode where it uses the experimental hive instead of the normal configuration hive.
+By default, when you build a VSIX project in Visual Studio, it auto-registers the
+extension in the experimental hive, allowing you to test it. In the new Visual Studio
+instance, open or create a C++ solution, and you should now see the Clang Format
+entries in the Tool menu. You can test it out, and any breakpoints you set will be
+hit where you can debug as usual.
diff --git a/clang/tools/clang-format-vs/source.extension.vsixmanifest.in b/clang/tools/clang-format-vs/source.extension.vsixmanifest.in
index d4820c051ad72b..beb2f611cc1f6a 100644
--- a/clang/tools/clang-format-vs/source.extension.vsixmanifest.in
+++ b/clang/tools/clang-format-vs/source.extension.vsixmanifest.in
@@ -1,19 +1,19 @@
-<?xml version="1.0" encoding="utf-8"?>
-<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
- <Metadata>
- <Identity Id="3cb18a5e-97e9-11e7-abc4-cec278b6b50a" Version="@CLANG_FORMAT_VS_VERSION@" Language="en-US" Publisher="LLVM"/>
- <DisplayName>ClangFormat</DisplayName>
- <Description xml:space="preserve">A tool to format C/C++/Obj-C code.</Description>
- <MoreInfo>http://clang.llvm.org/docs/ClangFormat.html</MoreInfo>
- <License>license.txt</License>
- </Metadata>
- <Installation InstalledByMsi="false">
- <InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[11.0, 17.0)" />
- </Installation>
- <Dependencies>
- <Dependency Id="Microsoft.VisualStudio.MPF" MinVersion="11.0" DisplayName="Visual Studio MPF" />
- </Dependencies>
- <Prerequisites>
- <Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[11.0,)" DisplayName="Visual Studio core editor" />
- </Prerequisites>
-</PackageManifest>
+<?xml version="1.0" encoding="utf-8"?>
+<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
+ <Metadata>
+ <Identity Id="3cb18a5e-97e9-11e7-abc4-cec278b6b50a" Version="@CLANG_FORMAT_VS_VERSION@" Language="en-US" Publisher="LLVM"/>
+ <DisplayName>ClangFormat</DisplayName>
+ <Description xml:space="preserve">A tool to format C/C++/Obj-C code.</Description>
+ <MoreInfo>http://clang.llvm.org/docs/ClangFormat.html</MoreInfo>
+ <License>license.txt</License>
+ </Metadata>
+ <Installation InstalledByMsi="false">
+ <InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[11.0, 17.0)" />
+ </Installation>
+ <Dependencies>
+ <Dependency Id="Microsoft.VisualStudio.MPF" MinVersion="11.0" DisplayName="Visual Studio MPF" />
+ </Dependencies>
+ <Prerequisites>
+ <Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[11.0,)" DisplayName="Visual Studio core editor" />
+ </Prerequisites>
+</PackageManifest>
diff --git a/clang/tools/scan-build/bin/scan-build.bat b/clang/tools/scan-build/bin/scan-build.bat
index 77be6746318f11..f765f205b8ec50 100644
--- a/clang/tools/scan-build/bin/scan-build.bat
+++ b/clang/tools/scan-build/bin/scan-build.bat
@@ -1 +1 @@
-perl -S scan-build %*
+perl -S scan-build %*
diff --git a/clang/tools/scan-build/libexec/c++-analyzer.bat b/clang/tools/scan-build/libexec/c++-analyzer.bat
index 69f048a91671f0..83c7172456a51a 100644
--- a/clang/tools/scan-build/libexec/c++-analyzer.bat
+++ b/clang/tools/scan-build/libexec/c++-analyzer.bat
@@ -1 +1 @@
-perl -S c++-analyzer %*
+perl -S c++-analyzer %*
diff --git a/clang/tools/scan-build/libexec/ccc-analyzer.bat b/clang/tools/scan-build/libexec/ccc-analyzer.bat
index 2a85376eb82b16..fdd36f3bdd0437 100644
--- a/clang/tools/scan-build/libexec/ccc-analyzer.bat
+++ b/clang/tools/scan-build/libexec/ccc-analyzer.bat
@@ -1 +1 @@
-perl -S ccc-analyzer %*
+perl -S ccc-analyzer %*
diff --git a/clang/utils/ClangVisualizers/clang.natvis b/clang/utils/ClangVisualizers/clang.natvis
index a7c70186bc46de..611c20dacce176 100644
--- a/clang/utils/ClangVisualizers/clang.natvis
+++ b/clang/utils/ClangVisualizers/clang.natvis
@@ -1,1089 +1,1089 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-Visual Studio Native Debugging Visualizers for LLVM
-
-For Visual Studio 2013 only, put this file into
-"%USERPROFILE%\Documents\Visual Studio 2013\Visualizers" or create a symbolic link so it updates automatically.
-
-For later versions of Visual Studio, no setup is required-->
-<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
-
- <Type Name="clang::Type">
- <!-- To visualize clang::Types, we need to look at TypeBits.TC to determine the actual
- type subclass and manually dispatch accordingly (Visual Studio can't identify the real type
- because clang::Type has no virtual members hence no RTTI).
-
- Views:
- "cmn": Visualization that is common to all clang::Type subclasses
- "poly": Visualization that is specific to the actual clang::Type subclass. The subtype-specific
- <DisplayString> is typically as C++-like as possible (like in dump()) with <Expand>
- containing all the gory details.
- "cpp": Only occasionally used when we need to distinguish between an ordinary view and a C++-like view.
- -->
- <DisplayString IncludeView="cmn" Condition="TypeBits.TC==clang::LocInfoType::LocInfo">LocInfoType</DisplayString>
- <DisplayString IncludeView="cmn">{(clang::Type::TypeClass)TypeBits.TC, en}Type</DisplayString>
- <!-- Dispatch to visualizers for the actual Type subclass -->
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Builtin" IncludeView="poly">{*(clang::BuiltinType *)this}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Pointer" IncludeView="poly">{*(clang::PointerType *)this}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Paren" IncludeView="poly">{*(clang::ParenType *)this}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::BitInt" IncludeView="poly">{(clang::BitIntType *)this}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::LValueReference" IncludeView="poly">{*(clang::LValueReferenceType *)this}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::RValueReference" IncludeView="poly">{*(clang::RValueReferenceType *)this}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::ConstantArray" IncludeView="poly">{(clang::ConstantArrayType *)this,na}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::ConstantArray" IncludeView="left">{(clang::ConstantArrayType *)this,view(left)na}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::ConstantArray" IncludeView="right">{(clang::ConstantArrayType *)this,view(right)na}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::VariableArray" IncludeView="poly">{(clang::VariableArrayType *)this,na}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::VariableArray" IncludeView="left">{(clang::VariableArrayType *)this,view(left)na}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::VariableArray" IncludeView="right">{(clang::VariableArrayType *)this,view(right)na}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::IncompleteArray" IncludeView="poly">{(clang::IncompleteArrayType *)this,na}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::IncompleteArray" IncludeView="left">{(clang::IncompleteArrayType *)this,view(left)na}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::IncompleteArray" IncludeView="right">{(clang::IncompleteArrayType *)this,view(right)na}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Typedef" IncludeView="poly">{(clang::TypedefType *)this,na}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Typedef" IncludeView="cpp">{(clang::TypedefType *)this,view(cpp)na}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Attributed" IncludeView="poly">{*(clang::AttributedType *)this}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Decayed" IncludeView="poly">{(clang::DecayedType *)this,na}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Decayed" IncludeView="left">{(clang::DecayedType *)this,view(left)na}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Decayed" IncludeView="right">{(clang::DecayedType *)this,view(right)na}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Elaborated" IncludeView="poly">{(clang::ElaboratedType *)this,na}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Elaborated" IncludeView="left">{(clang::ElaboratedType *)this,view(left)na}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Elaborated" IncludeView="right">{(clang::ElaboratedType *)this,view(right)na}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::TemplateTypeParm" IncludeView="poly">{*(clang::TemplateTypeParmType *)this}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::TemplateTypeParm" IncludeView="cpp">{*(clang::TemplateTypeParmType *)this,view(cpp)}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::SubstTemplateTypeParm" IncludeView="poly">{*(clang::SubstTemplateTypeParmType *)this}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Record" IncludeView="poly">{*(clang::RecordType *)this}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Record" IncludeView="cpp">{*(clang::RecordType *)this,view(cpp)}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::FunctionProto" IncludeView="poly">{(clang::FunctionProtoType *)this,na}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::FunctionProto" IncludeView="left">{(clang::FunctionProtoType *)this,view(left)na}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::FunctionProto" IncludeView="right">{(clang::FunctionProtoType *)this,view(right)na}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::TemplateSpecialization" IncludeView="poly">{*(clang::TemplateSpecializationType *)this}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::DeducedTemplateSpecialization" IncludeView="poly">{*(clang::DeducedTemplateSpecializationType *)this}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::DeducedTemplateSpecialization" IncludeView="cpp">{*(clang::DeducedTemplateSpecializationType *)this,view(cpp)}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::InjectedClassName" IncludeView="poly">{*(clang::InjectedClassNameType *)this}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::DependentName" IncludeView="poly">{*(clang::DependentNameType *)this}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::PackExpansion" IncludeView="poly">{*(clang::PackExpansionType *)this}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::LocInfoType::LocInfo" IncludeView="poly">{(clang::LocInfoType *)this,na}</DisplayString>
- <DisplayString Condition="TypeBits.TC==clang::LocInfoType::LocInfo" IncludeView="cpp">{(clang::LocInfoType *)this,view(cpp)na}</DisplayString>
- <DisplayString IncludeView="cpp">{this,view(poly)na}</DisplayString>
- <DisplayString IncludeView="left">{*this,view(cpp)}</DisplayString>
- <DisplayString IncludeView="right"></DisplayString>
- <DisplayString IncludeView="poly">No visualizer yet for {(clang::Type::TypeClass)TypeBits.TC,en}Type</DisplayString> <!-- Not yet implemented Type subclass -->
- <DisplayString IncludeView="Dependence" Condition="TypeBits.Dependence">Dependence{" ",en}</DisplayString>
- <DisplayString IncludeView="Dependence"></DisplayString>
- <DisplayString IncludeView="Cache" Condition="TypeBits.CacheValid && TypeBits.CachedLocalOrUnnamed">CachedLinkage: {(clang::Linkage)TypeBits.CachedLinkage,en} CachedLocalOrUnnamed</DisplayString>
- <DisplayString IncludeView="Cache" Condition="TypeBits.CacheValid && !TypeBits.CachedLocalOrUnnamed">CachedLinkage: {(clang::Linkage)TypeBits.CachedLinkage,en}{" ",sb}</DisplayString>
- <DisplayString IncludeView="Cache"></DisplayString>
- <DisplayString IncludeView="FromAST" Condition="TypeBits.FromAST">FromAST</DisplayString>
- <DisplayString IncludeView="FromAST"></DisplayString>
- <DisplayString IncludeView="flags" Condition="!TypeBits.Dependence && !TypeBits.CacheValid && !TypeBits.FromAST">
- No TypeBits set beyond TypeClass
- </DisplayString>
- <DisplayString IncludeView="flags">{*this, view(Dependence)}{*this, view(Cache)}{*this, view(FromAST)}</DisplayString>
- <DisplayString>{*this,view(cmn)} {{{*this,view(poly)}}}</DisplayString>
- <Expand>
- <Item Name="TypeClass" IncludeView="cmn">(clang::Type::TypeClass)TypeBits.TC</Item>
- <Item Name="Flags" IncludeView="cmn">this,view(flags)na</Item>
- <Item Name="Canonical" IncludeView="cmn">CanonicalType</Item>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Builtin">*(clang::BuiltinType *)this</ExpandedItem>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Pointer">*(clang::PointerType *)this</ExpandedItem>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Paren">*(clang::ParenType*)this</ExpandedItem>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::BitInt">*(clang::BitIntType*)this</ExpandedItem>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::LValueReference">*(clang::LValueReferenceType *)this</ExpandedItem>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::RValueReference">*(clang::RValueReferenceType *)this</ExpandedItem>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::ConstantArray">(clang::ConstantArrayType *)this</ExpandedItem>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::VariableArray">(clang::VariableArrayType *)this</ExpandedItem>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::IncompleteArray">(clang::IncompleteArrayType *)this</ExpandedItem>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Attributed">*(clang::AttributedType *)this</ExpandedItem>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Decayed">(clang::DecayedType *)this</ExpandedItem>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Elaborated">(clang::ElaboratedType *)this</ExpandedItem>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::TemplateTypeParm">(clang::TemplateTypeParmType *)this</ExpandedItem>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::SubstTemplateTypeParm">(clang::SubstTemplateTypeParmType *)this</ExpandedItem>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Record">(clang::RecordType *)this</ExpandedItem>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::FunctionProto">(clang::FunctionProtoType *)this</ExpandedItem>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::TemplateSpecialization">(clang::TemplateSpecializationType *)this</ExpandedItem>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::DeducedTemplateSpecialization">(clang::DeducedTemplateSpecializationType *)this</ExpandedItem>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::InjectedClassName">(clang::InjectedClassNameType *)this</ExpandedItem>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::DependentName">(clang::DependentNameType *)this</ExpandedItem>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::PackExpansion">(clang::PackExpansionType *)this</ExpandedItem>
- <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::LocInfoType::LocInfo">(clang::LocInfoType *)this</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::ArrayType">
- <Expand>
- <Item Name="ElementType">ElementType</Item>
- </Expand>
- </Type>
- <Type Name="clang::ConstantArrayType">
- <DisplayString IncludeView="left">{ElementType,view(cpp)}</DisplayString>
- <DisplayString IncludeView="right">[{Size}]</DisplayString>
- <DisplayString>{ElementType,view(cpp)}[{Size}]</DisplayString>
- <Expand>
- <Item Name="Size">Size</Item>
- <ExpandedItem>(clang::ArrayType *)this</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::IncompleteArrayType">
- <DisplayString IncludeView="left">{ElementType,view(cpp)}</DisplayString>
- <DisplayString IncludeView="right">[]</DisplayString>
- <DisplayString>{ElementType,view(cpp)}[]</DisplayString>
- <Expand>
- <ExpandedItem>(clang::ArrayType *)this</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::VariableArrayType">
- <DisplayString IncludeView="left">{ElementType,view(cpp)}</DisplayString>
- <DisplayString IncludeView="right">[*]</DisplayString>
- <DisplayString>{ElementType,view(cpp)}[*]</DisplayString>
- <Expand>
- <Item Name="[Size Expression]">(clang::Expr *)SizeExpr</Item>
- <ExpandedItem>(clang::ArrayType *)this</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::TypedefType">
- <DisplayString IncludeView="cpp">{Decl,view(name)nd}</DisplayString>
- <DisplayString>{Decl}</DisplayString>
- <Expand>
- <Item Name="Decl">Decl</Item>
- <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::PointerType">
- <DisplayString>{PointeeType, view(cpp)} *</DisplayString>
- <Expand>
- <Item Name="PointeeType">PointeeType</Item>
- <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::ParenType">
- <DisplayString>{Inner, view(cpp)}</DisplayString>
- <Expand>
- <Item Name="Inner">Inner</Item>
- <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::BitIntType">
- <DisplayString Condition="!IsUnsigned">signed _BitInt({NumBits})</DisplayString>
- <DisplayString Condition="!IsUnsigned">unsigned _BitInt({NumBits})(</DisplayString>
- <Expand>
- <Item Name="NumBits">NumBits</Item>
- <ExpandedItem>(clang::Type *)this, view(cmn)</ExpandedItem>
- </Expand>
- </Type>
- <!-- We visualize all inner types for clang reference types. So a rvalue reference to an lvalue reference
- to an int would visual as int & && This is a little different than GetPointeeType(),
- but more clearly displays the data structure and seems natural -->
- <Type Name="clang::LValueReferenceType">
- <DisplayString>{((clang::ReferenceType *)this)->PointeeType,view(cpp)} &</DisplayString>
- <Expand>
- <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
- <Item Name="PointeeType">PointeeType</Item>
- </Expand>
- </Type>
- <Type Name="clang::RValueReferenceType">
- <DisplayString>{((clang::ReferenceType *)this)->PointeeType,view(cpp)} &&</DisplayString>
- <Expand>
- <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
- <Item Name="PointeeType">PointeeType</Item>
- </Expand>
- </Type>
- <Type Name="clang::AttributedType">
- <DisplayString>{ModifiedType} Attribute={(clang::AttributedType::Kind)AttributedTypeBits.AttrKind}</DisplayString>
- </Type>
-
- <!-- Unfortunately, Visual Studio has trouble seeing the PointerBitMask member PointerIntUnion, so I hardwire it to 2 bits-->
- <Type Name="clang::DeclContext">
- <DisplayString>{(clang::Decl::Kind)DeclContextBits.DeclKind,en}Decl</DisplayString>
- <Expand>
- <Item Name="DeclKind">(clang::Decl::Kind)DeclContextBits.DeclKind,en</Item>
- <Synthetic Name="Members">
- <DisplayString></DisplayString>
- <Expand>
- <LinkedListItems>
- <HeadPointer>FirstDecl</HeadPointer>
- <NextPointer>(clang::Decl *)(*(intptr_t *)NextInContextAndBits.Value.Data & ~3)</NextPointer>
- <ValueNode>*this</ValueNode>
- </LinkedListItems>
- </Expand>
- </Synthetic>
- </Expand>
- </Type>
- <Type Name="clang::FieldDecl">
- <DisplayString>Field {{{*(clang::DeclaratorDecl *)this,view(cpp)nd}}}</DisplayString>
- </Type>
- <Type Name="clang::CXXMethodDecl">
- <DisplayString IncludeView="cpp">{*(clang::FunctionDecl *)this,nd}</DisplayString>
- <DisplayString>Method {{{*this,view(cpp)}}}</DisplayString>
- </Type>
- <Type Name="clang::CXXConstructorDecl">
- <DisplayString>Constructor {{{Name,view(cpp)}({*(clang::FunctionDecl *)this,view(parm0)nd})}}</DisplayString>
- </Type>
- <Type Name="clang::CXXDestructorDecl">
- <DisplayString>Destructor {{~{Name,view(cpp)}()}}</DisplayString>
- </Type>
- <Type Name="clang::TemplateTypeParmDecl">
- <DisplayString IncludeView="TorC" Condition="Typename">typename</DisplayString>
- <DisplayString IncludeView="TorC" Condition="!Typename">class</DisplayString>
- <DisplayString IncludeView="MaybeEllipses" Condition="TypeForDecl == nullptr">(not yet known if parameter pack) </DisplayString>
- <DisplayString IncludeView="MaybeEllipses" Condition="((clang::TemplateTypeParmType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)TypeForDecl->CanonicalType.Value.Value.Data) & ~(uintptr_t)((1U << clang::TypeAlignmentInBits) - 1U)))->BaseType)->CanTTPTInfo.ParameterPack">...</DisplayString>
- <DisplayString IncludeView="MaybeEllipses" Condition="!((clang::TemplateTypeParmType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)TypeForDecl->CanonicalType.Value.Value.Data) & ~(uintptr_t)((1U << clang::TypeAlignmentInBits) - 1U)))->BaseType)->CanTTPTInfo.ParameterPack"></DisplayString>
- <DisplayString IncludeView="DefaultArg" Condition="(*(uintptr_t *)DefaultArgument.ValueOrInherited.Val.Value.Data & 3LL) == 0">{(TypeSourceInfo *)(*(uintptr_t *)DefaultArgument.ValueOrInherited.Val.Value.Data&~3LL),view(cpp)}</DisplayString>
- <DisplayString IncludeView="DefaultArg">{{InheritedInitializer}}</DisplayString>
- <DisplayString IncludeView="Initializer" Condition="*(uintptr_t *)DefaultArgument.ValueOrInherited.Val.Value.Data & 3LL">= {this,view(DefaultArg)na}</DisplayString>
- <DisplayString IncludeView="Initializer"></DisplayString>
- <DisplayString>{*this,view(TorC)} {*this,view(MaybeEllipses)}{Name,view(cpp)} {this,view(Initializer)na}</DisplayString>
- </Type>
- <Type Name="clang::TemplateDecl">
- <DisplayString IncludeView="cpp">{*TemplatedDecl,view(cpp)}</DisplayString>
- <DisplayString>template{TemplateParams,na} {*TemplatedDecl};</DisplayString>
- <Expand>
- <Item Name="TemplateParams">TemplateParams,na</Item>
- <Item Name="TemplatedDecl">TemplatedDecl,na</Item>
- </Expand>
- </Type>
- <!-- Unfortunately, visualization of PointerIntPair<PointerUnion> doesn't work due to limitations in natvis, so we will barehad it-->
- <Type Name="clang::TypedefNameDecl">
- <DisplayString Condition="(*(uintptr_t *)MaybeModedTInfo.Value.Data & 4)==0" IncludeView="type">{(clang::TypeSourceInfo *)(*(uintptr_t *)MaybeModedTInfo.Value.Data & ~7LL),view(cpp)na}</DisplayString>
- <DisplayString Condition="(*(uintptr_t *)MaybeModedTInfo.Value.Data & 4)!=0" IncludeView="type">{(clang::TypedefNameDecl::ModedTInfo *)(*(uintptr_t *)MaybeModedTInfo.Value.Data & ~7LL),view(cpp)na}</DisplayString>
- <DisplayString IncludeView="name">{(TypeDecl *)this,view(cpp)nand}</DisplayString>
- <DisplayString>typedef {this,view(type)na} {this,view(name)na};</DisplayString>
- <Expand>
- <Item Name="IsTransparent" Condition="(*(uintptr_t *)MaybeModedTInfo.Value.Data & 1)==0">"Not yet calculated",sb</Item>
- <Item Name="IsTransparent" Condition="(*(uintptr_t *)MaybeModedTInfo.Value.Data & 1)!=0">(bool)(*(uintptr_t *)MaybeModedTInfo.Value.Data & 2)</Item>
- <Item Name="TypeSourceInfo" Condition="(*(uintptr_t *)MaybeModedTInfo.Value.Data & 4)==0">(clang::TypeSourceInfo *)(*(uintptr_t *)MaybeModedTInfo.Value.Data & ~7LL)</Item>
- <Item Name="ModedTInfo" Condition="(*(uintptr_t *)MaybeModedTInfo.Value.Data & 4)!=0">(clang::TypedefNameDecl::ModedTInfo *)(*(uintptr_t *)MaybeModedTInfo.Value.Data & ~7LL)</Item>
- <ExpandedItem>(TypeDecl *)this,nd</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::TypeAliasDecl">
- <DisplayString IncludeView="cpp">{(TypedefNameDecl *)this,view(name)nand}</DisplayString>
- <DisplayString>using {(TypedefNameDecl *)this,view(name)nand} = {(TypedefNameDecl *)this,view(type)nand}</DisplayString>
- </Type>
- <Type Name="clang::AssumedTemplateStorage">
- <DisplayString>{Name}</DisplayString>
- </Type>
- <Type Name="clang::UncommonTemplateNameStorage::BitsTag">
- <DisplayString>Kind={(UncommonTemplateNameStorage::Kind)Kind,en}, Size={Size}</DisplayString>
- <Expand>
- <Item Name="Kind">(UncommonTemplateNameStorage::Kind)Kind</Item>
- <Item Name="Size">Size</Item>
- </Expand>
- </Type>
- <Type Name="clang::UncommonTemplateNameStorage">
- <DisplayString IncludeView="cmn">{Bits},</DisplayString>
- <DisplayString Condition="Bits.Kind==UncommonTemplateNameStorage::Overloaded">{this,view(cmn)na},{(OverloadedTemplateStorage*)this,na}</DisplayString>
- <DisplayString Condition="Bits.Kind==UncommonTemplateNameStorage::Assumed">{this,view(cmn)na},{(AssumedTemplateStorage*)this,na}</DisplayString>
- <DisplayString Condition="Bits.Kind==UncommonTemplateNameStorage::SubstTemplateTemplateParm">{this,view(cmn)na},{(SubstTemplateTemplateParmStorage*)this,na}</DisplayString>
- <DisplayString Condition="Bits.Kind==UncommonTemplateNameStorage::SubstTemplateTemplateParmPack">{this,view(cmn)na},{(SubstTemplateTemplateParmPackStorage*)this,na}</DisplayString>
- <DisplayString>{this,view(cmn)na}</DisplayString>
- <Expand>
- <Item Name="Bits">Bits</Item>
- <ExpandedItem Condition="Bits.Kind==UncommonTemplateNameStorage::Overloaded">(OverloadedTemplateStorage*)this</ExpandedItem>
- <ExpandedItem Condition="Bits.Kind==UncommonTemplateNameStorage::Assumed">(AssumedTemplateStorage*)this</ExpandedItem>
- <ExpandedItem Condition="Bits.Kind==UncommonTemplateNameStorage::SubstTemplateTemplateParm">(SubstTemplateTemplateParmStorage*)this</ExpandedItem>
- <ExpandedItem Condition="Bits.Kind==UncommonTemplateNameStorage::SubstTemplateTemplateParmPack">(SubstTemplateTemplateParmPackStorage*)this</ExpandedItem>
- </Expand>
- </Type>
- <!-- clang::TemplateName::StorageType -->
- <Type Name="llvm::PointerUnion<clang::TemplateDecl *, clang::UncommonTemplateNameStorage *,
- clang::QualifiedTemplateName *, clang::DependentTemplateName *>">
- <!-- Expand this out by hand to get cpp view -->
- <DisplayString Condition="(Val.Value &3) == 0" IncludeView="cpp">
- {(clang::TemplateDecl *)(Val.Value & ~3LL),view(cpp)na}
- </DisplayString>
- <DisplayString Condition="(Val.Value &3) == 0">
- {(clang::TemplateDecl *)(Val.Value & ~3LL),na}
- </DisplayString>
- <DisplayString Condition="(Val.Value &3) == 1" IncludeView="cpp">
- {(clang::UncommonTemplateNameStorage *)(Val.Value & ~3LL),view(cpp)na}
- </DisplayString>
- <DisplayString Condition="(Val.Value &3) == 1">
- {(clang::UncommonTemplateNameStorage *)(Val.Value & ~3LL),na}
- </DisplayString>
- <DisplayString Condition="(Val.Value &3) == 2" IncludeView="cpp">
- {(clang::QualifiedTemplateName *)(Val.Value & ~3LL),view(cpp)na}
- </DisplayString>
- <DisplayString Condition="(Val.Value &3) == 2">
- {(clang::QualifiedTemplateName *)(Val.Value & ~3LL),na}
- </DisplayString>
- <DisplayString Condition="(Val.Value &3) == 3" IncludeView="cpp">
- {(clang::DependentTemplateName *)(Val.Value & ~3LL),view(cpp)na}
- </DisplayString>
- <DisplayString Condition="(Val.Value &3) == 3">
- {(clang::DependentTemplateName *)(Val.Value & ~3LL),na}
- </DisplayString>
- <Expand>
- <Item Name="[Holds]" Condition="(Val.Value &3) == 0">"TemplateDecl",s8b</Item>
- <Item Name="[Ptr]" Optional="true" Condition="(Val.Value &3) == 0">
- (clang::TemplateDecl *)(Val.Value & ~3LL)
- </Item>
- <Item Name="[Holds]" Condition="(Val.Value &3) == 1">"UncommonTemplateNameStorage",s8b</Item>
- <Item Name="[Ptr]" Optional="true" Condition="(Val.Value &3) == 1">
- (clang::UncommonTemplateNameStorage *)(Val.Value & ~3LL)
- </Item>
- <Item Name="[Holds]" Condition="(Val.Value &3) == 2">"QualifiedTemplateName",s8b</Item>
- <Item Name="[Ptr]" Optional="true" Condition="(Val.Value &3) == 2">
- (clang::QualifiedTemplateName *)(Val.Value & ~3LL)
- </Item>
- <Item Name="[Holds]" Condition="(Val.Value &3) == 3">"DependentTemplateName",s8b</Item>
- <Item Name="[Ptr]" Optional="true" Condition="(Val.Value &3) == 3">
- (clang::DependentTemplateName *)(Val.Value & ~3LL)
- </Item>
- <Item Name="[Val]">Val</Item>
-
- </Expand>
- </Type>
- <Type Name="clang::TemplateName">
- <DisplayString IncludeView="cpp">{Storage,view(cpp)na}</DisplayString>
- <DisplayString>{Storage,na}</DisplayString>
- <Expand>
- <ExpandedItem>Storage</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::NamedDecl" >
- <DisplayString IncludeView="cpp">{Name,view(cpp)}</DisplayString>
- <DisplayString>{Name}</DisplayString>
- </Type>
- <Type Name="clang::TagDecl">
- <DisplayString IncludeView="implicit" Condition="Implicit">implicit{" ",sb}</DisplayString>
- <DisplayString IncludeView="implicit"></DisplayString>
- <DisplayString IncludeView="modifiers">{*this,view(implicit)nd}</DisplayString>
- <DisplayString IncludeView="cpp">{*this,view(modifiers)}{Name,view(cpp)}</DisplayString>
- <DisplayString Condition="TagDeclBits.TagDeclKind==clang::TagTypeKind::Struct">{*this,view(modifiers)nd}struct {Name,view(cpp)}</DisplayString>
- <DisplayString Condition="TagDeclBits.TagDeclKind==clang::TagTypeKind::Interface">{*this,view(modifiers)nd}interface {Name,view(cpp)}</DisplayString>
- <DisplayString Condition="TagDeclBits.TagDeclKind==clang::TagTypeKind::Union">{*this,view(modifiers)nd}union {Name,view(cpp)}</DisplayString>
- <DisplayString Condition="TagDeclBits.TagDeclKind==clang::TagTypeKind::Class">{*this,view(modifiers)nd}class {Name,view(cpp)}</DisplayString>
- <DisplayString Condition="TagDeclBits.TagDeclKind==clang::TagTypeKind::Enum">{*this,view(modifiers)nd}enum {Name,view(cpp)}</DisplayString>
- <Expand>
- <ExpandedItem>(clang::DeclContext *)this</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::TagType">
- <DisplayString IncludeView="cpp">{decl,view(cpp)na}</DisplayString>
- <DisplayString>{*decl}</DisplayString>
- <Expand>
- <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
- <Item Name="decl">decl</Item>
- </Expand>
- </Type>
- <Type Name="clang::RecordType">
- <DisplayString IncludeView="cpp">{(clang::TagType *)this,view(cpp)na}</DisplayString>
- <DisplayString>{(clang::TagType *)this,na}</DisplayString>
- <Expand>
- <Item Name="TagType">*(clang::TagType *)this</Item>
- </Expand>
- </Type>
- <Type Name="clang::SubstTemplateTypeParmType">
- <DisplayString>{{{*Replaced,view(cpp)} <= {CanonicalType,view(cpp)}}}</DisplayString>
- <Expand>
- <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
- <Item Name="Replaced">*Replaced</Item>
- </Expand>
- </Type>
- <!-- We only show the first 5 parameter types in the display string (can't figure out how to loop in DisplayString)
- but the expansion has all parameters -->
- <Type Name="clang::FunctionProtoType">
- <DisplayString IncludeView="left" Condition="FunctionTypeBits.HasTrailingReturn"></DisplayString>
- <DisplayString IncludeView="left">{ResultType,view(cpp)}</DisplayString>
- <DisplayString IncludeView="parm0" Condition="FunctionTypeBits.NumParams==0"></DisplayString>
- <DisplayString IncludeView="parm0">{*(clang::QualType *)(this+1),view(cpp)}{*this,view(parm1)}</DisplayString>
- <DisplayString IncludeView="parm1" Condition="FunctionTypeBits.NumParams==1"></DisplayString>
- <DisplayString IncludeView="parm1">, {*((clang::QualType *)(this+1)+1),view(cpp)}{*this,view(parm2)}</DisplayString>
- <DisplayString IncludeView="parm2" Condition="FunctionTypeBits.NumParams==2"></DisplayString>
- <DisplayString IncludeView="parm2">, {*((clang::QualType *)(this+1)+2),view(cpp)}{*this,view(parm3)}</DisplayString>
- <DisplayString IncludeView="parm3" Condition="FunctionTypeBits.NumParams==3"></DisplayString>
- <DisplayString IncludeView="parm3">, {*((clang::QualType *)(this+1)+3),view(cpp)}{*this,view(parm4)}</DisplayString>
- <DisplayString IncludeView="parm4" Condition="FunctionTypeBits.NumParams==4"></DisplayString>
- <DisplayString IncludeView="parm4">, {*((clang::QualType *)(this+1)+4),view(cpp)}{*this,view(parm5)}</DisplayString>
- <DisplayString IncludeView="parm5" Condition="FunctionTypeBits.NumParams==5"></DisplayString>
- <DisplayString IncludeView="parm5">, /* expand for more params */</DisplayString>
- <DisplayString IncludeView="right" Condition="FunctionTypeBits.HasTrailingReturn">({*this,view(parm0)}) -> {ResultType,view(cpp)}</DisplayString>
- <DisplayString IncludeView="right">({*this,view(parm0)})</DisplayString>
- <DisplayString>{this,view(left)na}{this,view(right)na}</DisplayString>
- <Expand>
- <Item Name="ResultType">ResultType</Item>
- <Synthetic Name="Parameter Types">
- <DisplayString>{*this,view(parm0)}</DisplayString>
- <Expand>
- <ArrayItems>
- <Size>FunctionTypeBits.NumParams</Size>
- <ValuePointer>(clang::QualType *)(this+1)</ValuePointer>
- </ArrayItems>
- </Expand>
- </Synthetic>
- <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
- </Expand>
- </Type>
-
- <Type Name="clang::AdjustedType">
- <DisplayString>{OriginalTy} adjusted to {AdjustedTy}</DisplayString>
- <Expand>
- <Item Name="OriginalTy">OriginalTy</Item>
- <Item Name="AdjustedTy">AdjustedTy</Item>
- </Expand>
- </Type>
- <Type Name="clang::DecayedType">
- <DisplayString IncludeView="left">{OriginalTy,view(left)}</DisplayString>
- <DisplayString IncludeView="right">{OriginalTy,view(right)}</DisplayString>
- <DisplayString>{OriginalTy}</DisplayString>
- <Expand>
- <ExpandedItem>(clang::AdjustedType *)this</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::ElaboratedType">
- <DisplayString IncludeView="left">{NamedType,view(left)}</DisplayString>
- <DisplayString IncludeView="right">{NamedType,view(right)}</DisplayString>
- <DisplayString>{NamedType}</DisplayString>
- <Expand>
- <Item Name="[Keyword]">(clang::ElaboratedTypeKeyword)TypeWithKeywordBits.Keyword</Item>
- <Item Name="[Nested Name Specifier]">NNS</Item>
- <Item Name="[Underlying Type]">NamedType,view(cmn)</Item>
- </Expand>
- </Type>
- <Type Name="clang::TemplateTypeParmType">
- <DisplayString IncludeView="cpp" Condition="((clang::TemplateTypeParmType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)CanonicalType.Value.Value.Data) & ~(uintptr_t)((1U << clang::TypeAlignmentInBits) - 1U)))->BaseType) != this">{TTPDecl->Name,view(cpp)}</DisplayString>
- <DisplayString Condition="((clang::TemplateTypeParmType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)CanonicalType.Value.Value.Data) & ~(uintptr_t)((1U << clang::TypeAlignmentInBits) - 1U)))->BaseType) != this">Non-canonical: {*TTPDecl}</DisplayString>
- <DisplayString>Canonical: {CanTTPTInfo}</DisplayString>
- <Expand>
- <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::InjectedClassNameType">
- <DisplayString>{Decl,view(cpp)}</DisplayString>
- <Expand>
- <Item Name="Decl">Decl</Item>
- <Item Name="InjectedType">InjectedType</Item>
- <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::DependentNameType">
- <DisplayString>{NNS}{Name,view(cpp)na}</DisplayString>
- <Expand>
- <Item Name="NNS">NNS</Item>
- <Item Name="Name">Name</Item>
- <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::NestedNameSpecifier">
- <DisplayString Condition="!Specifier"></DisplayString>
- <DisplayString Condition="((*(uintptr_t *)Prefix.Value.Data>>1)&3) == 0">{(IdentifierInfo*)Specifier,view(cpp)na}::</DisplayString>
- <DisplayString Condition="((*(uintptr_t *)Prefix.Value.Data>>1)&3) == 1">{(NamedDecl*)Specifier,view(cpp)na}::</DisplayString>
- <DisplayString Condition="((*(uintptr_t *)Prefix.Value.Data>>1)&3) == 2">{(Type*)Specifier,view(cpp)na}::</DisplayString>
- <Expand>
- <Item Name="Kind">(NestedNameSpecifier::StoredSpecifierKind)((*(uintptr_t *)Prefix.Value.Data>>1)&3)</Item>
- </Expand>
- </Type>
- <Type Name="clang::PackExpansionType">
- <DisplayString>{Pattern}</DisplayString>
- <Expand>
- <Item Name="Pattern">Pattern</Item>
- <Item Name="NumExpansions">NumExpansions</Item>
- <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::QualType">
- <DisplayString IncludeView="poly">{((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)Value.Value.Data) & ~(uintptr_t)((1U << clang::TypeAlignmentInBits) - 1U)))->BaseType,view(poly)}{*this,view(fastQuals)}</DisplayString>
- <DisplayString IncludeView="cpp">{((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)Value.Value.Data) & ~(uintptr_t)((1U << clang::TypeAlignmentInBits) - 1U)))->BaseType,view(cpp)}{*this,view(fastQuals)}</DisplayString>
- <DisplayString IncludeView="left">{((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)Value.Value.Data) & ~(uintptr_t)((1U << clang::TypeAlignmentInBits) - 1U)))->BaseType,view(left)}{*this,view(fastQuals)}</DisplayString>
- <DisplayString IncludeView="right">{((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)Value.Value.Data) & ~(uintptr_t)((1U << clang::TypeAlignmentInBits) - 1U)))->BaseType,view(right)}{*this,view(fastQuals)}</DisplayString>
- <!-- For the Fast Qualifiers, it is simpler (and probably more efficient) just to list all 8 cases than create
- views for each qualifier. TODO: Non-fast qualifiers -->
- <DisplayString IncludeView="fastQuals" Condition="(((*(uintptr_t *)Value.Value.Data) >> 1) & 7)==0"></DisplayString>
- <DisplayString IncludeView="fastQuals" Condition="(((*(uintptr_t *)Value.Value.Data) >> 1) & 7)==1">{" ",sb}const</DisplayString>
- <DisplayString IncludeView="fastQuals" Condition="(((*(uintptr_t *)Value.Value.Data) >> 1) & 7)==2">{" ",sb}restrict</DisplayString>
- <DisplayString IncludeView="fastQuals" Condition="(((*(uintptr_t *)Value.Value.Data) >> 1) & 7)==3">{" ",sb}const restrict</DisplayString>
- <DisplayString IncludeView="fastQuals" Condition="(((*(uintptr_t *)Value.Value.Data) >> 1) & 7)==4">{" ",sb}volatile</DisplayString>
- <DisplayString IncludeView="fastQuals" Condition="(((*(uintptr_t *)Value.Value.Data) >> 1) & 7)==5">{" ",sb}const volatile</DisplayString>
- <DisplayString IncludeView="fastQuals" Condition="(((*(uintptr_t *)Value.Value.Data) >> 1) & 7)==6">{" ",sb}volatile restrict</DisplayString>
- <DisplayString IncludeView="fastQuals" Condition="(((*(uintptr_t *)Value.Value.Data) >> 1) & 7)==7">{" ",sb}const volatile restrict</DisplayString>
- <DisplayString IncludeView="fastQuals">Cannot visualize non-fast qualifiers</DisplayString>
- <DisplayString Condition="(*(uintptr_t *)Value.Value.Data) == 0">Null</DisplayString>
- <DisplayString>{((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)Value.Value.Data) & ~(uintptr_t)((1U << clang::TypeAlignmentInBits) - 1U)))->BaseType,na}{*this,view(fastQuals)}</DisplayString>
- <Expand>
- <Item Name="Fast Quals">*this,view(fastQuals)</Item>
- <ExpandedItem>((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)Value.Value.Data) & ~(uintptr_t)((1U << clang::TypeAlignmentInBits) - 1U)))->BaseType</ExpandedItem>
- </Expand>
-
- </Type>
- <Type Name="clang::LocInfoType">
- <DisplayString IncludeView="cpp">{DeclInfo,view(cpp)na}</DisplayString>
- <DisplayString>{DeclInfo,na}</DisplayString>
- <Expand>
- <Item Name="DeclInfo">DeclInfo</Item>
- <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::TypeSourceInfo">
- <DisplayString IncludeView="cpp">{Ty,view(cpp)}</DisplayString>
- <DisplayString>{Ty}</DisplayString>
- <Expand>
- <ExpandedItem>Ty</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::TypeLoc">
- <DisplayString>{(QualType *)&Ty,na}</DisplayString>
- <Expand>
- <Item Name="Ty">(QualType *)&Ty</Item>
- <Item Name="Data">Data</Item>
- </Expand>
- </Type>
- <Type Name="clang::TypeLocBuilder">
- <DisplayString Optional="true" Condition="LastTy.Value.Value==0">Not building anything</DisplayString>
- <DisplayString Optional="true">Building a {LastTy}</DisplayString>
- </Type>
- <Type Name="clang::TemplateArgumentLoc">
- <DisplayString IncludeView="cpp">{Argument,view(cpp)}</DisplayString>
- <DisplayString>{Argument}</DisplayString>
- </Type>
- <Type Name="clang::TemplateArgument">
- <DisplayString IncludeView="cpp" Condition="Integer.Kind == clang::TemplateArgument::ArgKind::Type">{*(clang::QualType *)&TypeOrValue.V,view(cpp)}</DisplayString>
- <DisplayString Condition="Integer.Kind == clang::TemplateArgument::ArgKind::Type">{(clang::TemplateArgument::ArgKind)TypeOrValue.Kind,en} template argument: {*(clang::QualType *)&TypeOrValue.V}</DisplayString>
- <DisplayString IncludeView="arg0" Condition="Args.NumArgs==0"></DisplayString>
- <DisplayString IncludeView="arg0">{Args.Args[0]}{*this,view(arg1)}</DisplayString>
- <DisplayString IncludeView="arg1" Condition="Args.NumArgs==1"></DisplayString>
- <DisplayString IncludeView="arg1">, {Args.Args[1]}{*this,view(arg2)}</DisplayString>
- <DisplayString IncludeView="arg2" Condition="Args.NumArgs==2"></DisplayString>
- <DisplayString IncludeView="arg2">, {Args.Args[2]}, ...</DisplayString>
- <DisplayString IncludeView="arg0cpp" Condition="Args.NumArgs==0"></DisplayString>
- <DisplayString IncludeView="arg0cpp">{Args.Args[0],view(cpp)}{*this,view(arg1cpp)}</DisplayString>
- <DisplayString IncludeView="arg1cpp" Condition="Args.NumArgs==1"></DisplayString>
- <DisplayString IncludeView="arg1cpp">, {Args.Args[1],view(cpp)}{*this,view(arg2cpp)}</DisplayString>
- <DisplayString IncludeView="arg2cpp" Condition="Args.NumArgs==2"></DisplayString>
- <DisplayString IncludeView="arg2cpp">, {Args.Args[2],view(cpp)}, ...</DisplayString>
- <DisplayString IncludeView="cpp" Condition="Integer.Kind == clang::TemplateArgument::ArgKind::Pack">{*this,view(arg0cpp)}</DisplayString>
- <DisplayString Condition="Integer.Kind == clang::TemplateArgument::ArgKind::Pack">{*this,view(arg0)}</DisplayString>
- <DisplayString Condition="Integer.Kind == clang::TemplateArgument::ArgKind::Expression">{(clang::Expr *)TypeOrValue.V,view(cpp)na}</DisplayString>
- <DisplayString>{(clang::TemplateArgument::ArgKind)TypeOrValue.Kind,en}</DisplayString>
- <Expand>
- <Item Name="QualType" Condition="Integer.Kind == clang::TemplateArgument::ArgKind::Type">*(clang::QualType *)&TypeOrValue.V</Item>
- <Item Name="Expression" Condition="Integer.Kind == clang::TemplateArgument::ArgKind::Expression">(clang::Expr *)TypeOrValue.V</Item>
- <ArrayItems Condition="Integer.Kind == clang::TemplateArgument::ArgKind::Pack">
- <Size>Args.NumArgs</Size>
- <ValuePointer>Args.Args</ValuePointer>
- </ArrayItems>
- <!-- TODO: Other kinds-->
- </Expand>
- </Type>
- <Type Name="clang::TemplateArgumentListInfo">
- <DisplayString IncludeView ="elt0" Condition="Arguments.Size == 0"></DisplayString>
- <DisplayString IncludeView ="elt0">{((TemplateArgumentLoc*)Arguments.BeginX)[0],view(cpp)}{*this,view(elt1)}</DisplayString>
- <DisplayString IncludeView ="elt1" Condition="Arguments.Size == 1"></DisplayString>
- <DisplayString IncludeView ="elt1">, {((TemplateArgumentLoc*)Arguments.BeginX)[1],view(cpp)}{*this,view(elt2)}</DisplayString>
- <DisplayString IncludeView ="elt2" Condition="Arguments.Size == 2"></DisplayString>
- <DisplayString IncludeView ="elt2">, {((TemplateArgumentLoc*)Arguments.BeginX)[2],view(cpp)}{*this,view(elt3)}</DisplayString>
- <DisplayString IncludeView ="elt3" Condition="Arguments.Size == 3"></DisplayString>
- <DisplayString IncludeView ="elt3">, {((TemplateArgumentLoc*)Arguments.BeginX)[3],view(cpp)}{*this,view(elt4)}</DisplayString>
- <DisplayString IncludeView ="elt4" Condition="Arguments.Size == 4"></DisplayString>
- <DisplayString IncludeView ="elt4">, ...</DisplayString>
- <DisplayString Condition="Arguments.Size == 0">empty</DisplayString>
- <DisplayString Condition="Arguments.Size != 0"><{*this,view(elt0)}></DisplayString>
- <DisplayString>Uninitialized</DisplayString>
- </Type>
- <Type Name="clang::TemplateArgumentList">
- <DisplayString IncludeView="arg0" Condition="NumArguments==0"></DisplayString>
- <DisplayString IncludeView="arg0">{Arguments[0],view(cpp)}{*this,view(arg1)}</DisplayString>
- <DisplayString IncludeView="arg1" Condition="NumArguments==1"></DisplayString>
- <DisplayString IncludeView="arg1">, {Arguments[1],view(cpp)}{*this,view(arg2)}</DisplayString>
- <DisplayString IncludeView="arg2" Condition="NumArguments==2"></DisplayString>
- <DisplayString IncludeView="arg2">, {Arguments[1],view(cpp)}, ...</DisplayString>
- <DisplayString><{*this,view(arg0)}></DisplayString>
- <Expand>
- <Item Name="NumArguments">NumArguments</Item>
- <ArrayItems>
- <Size>NumArguments</Size>
- <ValuePointer>Arguments</ValuePointer>
- </ArrayItems>
- </Expand>
- </Type>
- <Type Name="llvm::ArrayRef<clang::TemplateArgument>">
- <DisplayString IncludeView="arg0" Condition="Length==0"></DisplayString>
- <DisplayString IncludeView="arg0">{Data[0],view(cpp)}{*this,view(arg1)}</DisplayString>
- <DisplayString IncludeView="arg1" Condition="Length==1"></DisplayString>
- <DisplayString IncludeView="arg1">, {Data[1],view(cpp)}{*this,view(arg2)}</DisplayString>
- <DisplayString IncludeView="arg2" Condition="Length==2"></DisplayString>
- <DisplayString IncludeView="arg2">, {Data[2],view(cpp)}, ...</DisplayString>
- <DisplayString><{*this,view(arg0)}></DisplayString>
- <Expand>
- <Item Name="Length">Length</Item>
- <Synthetic Name="Data">
- <Expand>
- <ArrayItems>
- <Size>Length</Size>
- <ValuePointer>Data</ValuePointer>
- </ArrayItems>
- </Expand>
- </Synthetic>
- </Expand>
- </Type>
- <Type Name="clang::MultiLevelTemplateArgumentList">
- <DisplayString IncludeView="level0" Condition="(llvm::ArrayRef<clang::TemplateArgument> *)TemplateArgumentLists.EndX - (llvm::ArrayRef<clang::TemplateArgument> *)TemplateArgumentLists.BeginX==0"></DisplayString>
- <DisplayString IncludeView="level0">{((llvm::ArrayRef<clang::TemplateArgument> *)TemplateArgumentLists.BeginX)[0],view(cpp)}{*this,view(level1)}</DisplayString>
- <DisplayString IncludeView="level1" Condition="(llvm::ArrayRef<clang::TemplateArgument> *)TemplateArgumentLists.EndX - (llvm::ArrayRef<clang::TemplateArgument> *)TemplateArgumentLists.BeginX==1"></DisplayString>
- <DisplayString IncludeView="level1">::{((llvm::ArrayRef<clang::TemplateArgument> *)TemplateArgumentLists.BeginX)[1],view(cpp)}{*this,view(level2)}</DisplayString>
- <DisplayString IncludeView="level2" Condition="(llvm::ArrayRef<clang::TemplateArgument> *)TemplateArgumentLists.EndX - (llvm::ArrayRef<clang::TemplateArgument> *)TemplateArgumentLists.BeginX==2"></DisplayString>
- <DisplayString IncludeView="level2">::{((llvm::ArrayRef<clang::TemplateArgument> *)TemplateArgumentLists.BeginX)[2],view(cpp)}, ...</DisplayString>
- <DisplayString>{*this,view(level0)}</DisplayString>
- <Expand>
- <Item Name="TemplateList">TemplateArgumentLists</Item>
- </Expand>
- </Type>
- <Type Name="clang::ParsedTemplateArgument">
- <DisplayString Condition="Kind==clang::ParsedTemplateArgument::Type" IncludeView="cpp">{(clang::QualType *)Arg,view(cpp)na}</DisplayString>
- <DisplayString Condition="Kind==clang::ParsedTemplateArgument::Type">Type template argument: {*(clang::QualType *)Arg}</DisplayString>
- <DisplayString Condition="Kind==clang::ParsedTemplateArgument::NonType">Non-type template argument: {*(clang::Expr *)Arg}</DisplayString>
- <DisplayString Condition="Kind==clang::ParsedTemplateArgument::Template">Template template argument: {*(clang::TemplateName *)Arg</DisplayString>
- <Expand>
- <Item Name="Kind">Kind,en</Item>
- <Item Name="Arg" Condition="Kind==clang::ParsedTemplateArgument::Type">(clang::QualType *)Arg</Item>
- <Item Name="Arg" Condition="Kind==clang::ParsedTemplateArgument::NonType">(clang::Expr *)Arg</Item>
- <Item Name="Arg" Condition="Kind==clang::ParsedTemplateArgument::Template">(clang::TemplateName *)Arg</Item>
- </Expand>
- </Type>
- <!-- Builtin types that have C++ keywords are manually displayed as that keyword. Otherwise, just use the enum name -->
- <Type Name="clang::BuiltinType">
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Void">void</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Bool">bool</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Char_U">char</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::UChar">unsigned char</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::WChar_U">wchar_t</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Char16">char16_t</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Char32">char32_t</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::UShort">unsigned short</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::UInt">unsigned int</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::ULong">unsigned long</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::ULongLong">unsigned long long</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::UInt128">__uint128_t</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Char_S">char</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::SChar">signed char</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::WChar_S">wchar_t</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Short">short</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Int">int</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Long">long</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::LongLong">long long</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Int128">__int128_t</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Half">__fp16</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Float">float</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Double">double</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::LongDouble">long double</DisplayString>
- <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::NullPtr">nullptr_t</DisplayString>
- <DisplayString>{(clang::BuiltinType::Kind)BuiltinTypeBits.Kind, en}</DisplayString>
- <Expand>
- <Item Name="Kind">(clang::BuiltinType::Kind)BuiltinTypeBits.Kind</Item>
- </Expand>
- </Type>
-
- <Type Name="clang::TemplateSpecializationType">
- <DisplayString IncludeView="arg0" Condition="TemplateSpecializationTypeBits.NumArgs==0"></DisplayString>
- <DisplayString IncludeView="arg0">{((clang::TemplateArgument *)(this+1))[0],view(cpp)}{*this,view(arg1)}</DisplayString>
- <DisplayString IncludeView="arg1" Condition="TemplateSpecializationTypeBits.NumArgs==1"></DisplayString>
- <DisplayString IncludeView="arg1">, {((clang::TemplateArgument *)(this+1))[1],view(cpp)}{*this,view(arg2)}</DisplayString>
- <DisplayString IncludeView="arg2" Condition="TemplateSpecializationTypeBits.NumArgs==2"></DisplayString>
- <DisplayString IncludeView="arg2">, {((clang::TemplateArgument *)(this+1))[2],view(cpp)}{*this,view(arg3)}</DisplayString>
- <DisplayString Condition="(Template.Storage.Val.Value & 3) == 0">
- {*((clang::TemplateDecl *)(Template.Storage.Val.Value))->TemplatedDecl,view(cpp)}<{*this,view(arg0)}>
- </DisplayString>
- <DisplayString>Can't visualize this TemplateSpecializationType</DisplayString>
- <Expand>
- <Item Name="Template">Template.Storage</Item>
- <ArrayItems>
- <Size>TemplateSpecializationTypeBits.NumArgs</Size>
- <ValuePointer>(clang::TemplateArgument *)(this+1)</ValuePointer>
- </ArrayItems>
- <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::DeducedType">
- <Expand>
- <Item Name="isDeduced">(CanonicalType.Value.Value != this) || TypeBits.Dependent</Item>
- <ExpandedItem>*(clang::Type *)this,view(cmn)</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::DeducedTemplateSpecializationType">
- <DisplayString Condition="(CanonicalType.Value.Value != this) || TypeBits.Dependent">{CanonicalType,view(cpp)}</DisplayString>
- <DisplayString IncludeView="cpp">{Template,view(cpp)}</DisplayString>
- <DisplayString>{Template}</DisplayString>
- <Expand>
- <Item Name="Template">Template</Item>
- <Item Name="Deduced As" Condition="(CanonicalType.Value.Value != this) || TypeBits.Dependent">CanonicalType,view(cpp)</Item>
- <ExpandedItem>(clang::DeducedType *)this</ExpandedItem>
- <Item Name="Template">Template</Item>
- </Expand>
- </Type>
- <Type Name="clang::ClassTemplateSpecializationDecl">
- <DisplayString>{*(CXXRecordDecl *)this,nd}{*TemplateArgs}</DisplayString>
- <Expand>
- <ExpandedItem>(CXXRecordDecl *)this,nd</ExpandedItem>
- <Item Name="TemplateArgs">TemplateArgs</Item>
- </Expand>
- </Type>
- <Type Name="clang::IdentifierInfo">
- <DisplayString Condition="Entry != 0">{((llvm::StringMapEntry<clang::IdentifierInfo *>*)Entry)+1,sb}</DisplayString>
- <Expand>
- <Item Condition="Entry != 0" Name="[Identifier]">((llvm::StringMapEntry<clang::IdentifierInfo *>*)Entry)+1,s</Item>
- <Item Name="Token Kind">(clang::tok::TokenKind)TokenID</Item>
- </Expand>
- </Type>
- <Type Name="clang::DeclarationName">
- <DisplayString Condition="Ptr == 0" IncludeView="cpp"></DisplayString>
- <DisplayString Condition="Ptr == 0">Empty</DisplayString>
- <DisplayString Condition="(Ptr & PtrMask) == StoredIdentifier" IncludeView="cpp">{*(clang::IdentifierInfo *)(Ptr & ~PtrMask)}</DisplayString>
- <DisplayString Condition="(Ptr & PtrMask) == StoredIdentifier">{{Identifier ({*(clang::IdentifierInfo *)(Ptr & ~PtrMask)})}}</DisplayString>
- <DisplayString Condition="(Ptr & PtrMask) == StoredObjCZeroArgSelector">{{ObjC Zero Arg Selector (*{(clang::IdentifierInfo *)(Ptr & ~PtrMask)})}}</DisplayString>
- <DisplayString Condition="(Ptr & PtrMask) == StoredObjCOneArgSelector">{{ObjC One Arg Selector (*{(clang::IdentifierInfo *)(Ptr & ~PtrMask)})}}</DisplayString>
- <DisplayString Condition="(Ptr & PtrMask) == StoredCXXConstructorName" IncludeView="cpp">{(clang::detail::CXXSpecialNameExtra *)(Ptr & ~PtrMask),view(cpp)na}</DisplayString>
- <DisplayString Condition="(Ptr & PtrMask) == StoredCXXConstructorName">C++ Constructor {{{(clang::detail::CXXSpecialNameExtra *)(Ptr & ~PtrMask),view(cpp)na}}}</DisplayString>
- <DisplayString Condition="(Ptr & PtrMask) == StoredCXXDestructorName">C++ Destructor {{*(clang::detail::CXXSpecialNameExtra *)(Ptr & ~PtrMask)}}</DisplayString>
- <DisplayString Condition="(Ptr & PtrMask) == StoredCXXConversionFunctionName">C++ Conversion function {{*(clang::detail::CXXSpecialNameExtra *)(Ptr & ~PtrMask)}}</DisplayString>
- <DisplayString Condition="(Ptr & PtrMask) == StoredCXXOperatorName">C++ Operator {{*(clang::detail::CXXOperatorIdName *)(Ptr & ~PtrMask)}}</DisplayString>
- <DisplayString Condition="(Ptr & PtrMask) == StoredDeclarationNameExtra"
- IncludeView="cpp">{*(clang::detail::DeclarationNameExtra *)(Ptr & ~PtrMask),view(cpp)}</DisplayString>
- <DisplayString Condition="(Ptr & PtrMask) == StoredDeclarationNameExtra">{{Extra ({*(clang::detail::DeclarationNameExtra *)(Ptr & ~PtrMask)})}}</DisplayString>
- <Expand>
- <Item Name="Kind">StoredNameKind(Ptr & PtrMask),en</Item>
- <Item Condition="(Ptr & PtrMask) == StoredIdentifier" Name="[Identifier]">*(clang::IdentifierInfo *)(Ptr & ~PtrMask),na</Item>
- <Item Condition="(Ptr & PtrMask) == StoredObjCZeroArgSelector" Name="[ObjC Zero Arg Selector]">*(clang::IdentifierInfo *)(Ptr & ~PtrMask),na</Item>
- <Item Condition="(Ptr & PtrMask) == StoredObjCOneArgSelector" Name="[ObjC One Arg Selector]">*(clang::IdentifierInfo *)(Ptr & ~PtrMask),na</Item>
- <Item Condition="(Ptr & PtrMask) == StoredCXXConstructorName" Name="[C++ Constructor]">*(clang::detail::CXXSpecialNameExtra *)(Ptr & ~PtrMask),na</Item>
- <Item Condition="(Ptr & PtrMask) == StoredCXXDestructorName" Name="[C++ Destructor]">*(clang::detail::CXXSpecialNameExtra *)(Ptr & ~PtrMask),na</Item>
- <Item Condition="(Ptr & PtrMask) == StoredCXXConversionFunctionName" Name="[C++ Conversion function]">*(clang::detail::CXXSpecialNameExtra *)(Ptr & ~PtrMask),na</Item>
- <Item Condition="(Ptr & PtrMask) == StoredCXXOperatorName" Name="[C++ Operator]">*(clang::detail::CXXOperatorIdName *)(Ptr & ~PtrMask),na</Item>
- <Item Condition="(Ptr & PtrMask) == StoredDeclarationNameExtra" Name="[Extra]">(clang::detail::DeclarationNameExtra *)(Ptr & ~PtrMask),na</Item>
- </Expand>
- </Type>
- <Type Name="clang::detail::DeclarationNameExtra">
- <DisplayString Condition="ExtraKindOrNumArgs == CXXDeductionGuideName" IncludeView="cpp">
- {(CXXDeductionGuideNameExtra *)this,view(cpp)nand}
- </DisplayString>
- <DisplayString Condition="ExtraKindOrNumArgs == CXXDeductionGuideName">
- {(CXXDeductionGuideNameExtra *)this,nand}
- </DisplayString>
- <DisplayString Condition="ExtraKindOrNumArgs == CXXLiteralOperatorName">C++ Literal operator</DisplayString>
- <DisplayString Condition="ExtraKindOrNumArgs == CXXUsingDirective">C++ Using directive</DisplayString>
- <DisplayString Condition="ExtraKindOrNumArgs == ObjCMultiArgSelector">Objective-C MultiArg selector</DisplayString>
- <DisplayString>{(clang::detail::DeclarationNameExtra::ExtraKind)ExtraKindOrNumArgs,en}{" ",sb}{*this,view(cpp)}</DisplayString>
- <Expand>
- <ExpandedItem Condition="ExtraKindOrNumArgs == CXXDeductionGuideName">(CXXDeductionGuideNameExtra *)this</ExpandedItem>
- <Item Name="ExtraKindOrNumArgs" Condition="ExtraKindOrNumArgs != CXXDeductionGuideName">ExtraKindOrNumArgs</Item>
- </Expand>
- </Type>
- <Type Name="clang::detail::CXXDeductionGuideNameExtra">
- <DisplayString IncludeView="cpp">{Template->TemplatedDecl,view(cpp)}</DisplayString>
- <DisplayString>C++ Deduction guide for {Template->TemplatedDecl,view(cpp)na}</DisplayString>
- </Type>
- <Type Name="clang::detail::CXXSpecialNameExtra">
- <DisplayString IncludeView="cpp">{Type,view(cpp)}</DisplayString>
- <DisplayString>{Type}</DisplayString>
- </Type>
- <Type Name="clang::DeclarationNameInfo">
- <DisplayString>{Name}</DisplayString>
- </Type>
- <Type Name="clang::TemplateIdAnnotation">
- <DisplayString IncludeView="arg0" Condition="NumArgs==0"></DisplayString>
- <DisplayString IncludeView="arg0">{(ParsedTemplateArgument *)(this+1),view(cpp)na}{this,view(arg1)na}</DisplayString>
- <DisplayString IncludeView="arg1" Condition="NumArgs==1"></DisplayString>
- <DisplayString IncludeView="arg1">, {((ParsedTemplateArgument *)(this+1))+1,view(cpp)na}{this,view(arg2)na}</DisplayString>
- <DisplayString IncludeView="arg2" Condition="NumArgs==2"></DisplayString>
- <DisplayString IncludeView="arg1">, ...</DisplayString>
- <DisplayString>{Name,na}<{this,view(arg0)na}></DisplayString>
- <Expand>
- <Item Name="Name">Name</Item>
- <Synthetic Name="Arguments">
- <DisplayString>{this,view(arg0)na}</DisplayString>
- <Expand>
- <ArrayItems>
- <Size>NumArgs</Size>
- <ValuePointer>(ParsedTemplateArgument *)(this+1)</ValuePointer>
- </ArrayItems>
- </Expand>
- </Synthetic>
- <Item Name="Operator">Operator</Item>
- </Expand>
- </Type>
- <Type Name="clang::Token">
- <DisplayString Condition="Kind == clang::tok::annot_template_id">{{annot_template_id ({(clang::TemplateIdAnnotation *)(PtrData),na})}}</DisplayString>
- <DisplayString Condition="Kind == clang::tok::identifier">{{Identifier ({(clang::IdentifierInfo *)(PtrData),na})}}</DisplayString>
- <DisplayString>{(clang::tok::TokenKind)Kind,en}</DisplayString>
- </Type>
- <Type Name="clang::Lexer">
- <DisplayString>{BufferPtr,nasb}</DisplayString>
- </Type>
- <Type Name="clang::Preprocessor::IncludeStackInfo">
- <DisplayString Condition="TheLexer._Mypair._Myval2 != 0">{TheLexer._Mypair._Myval2,na}</DisplayString>
- <DisplayString Condition="TheTokenLexer._Mypair._Myval2 != 0">Expanding Macro: {TheTokenLexer._Mypair._Myval2,na}</DisplayString>
- <DisplayString></DisplayString>
- </Type>
- <Type Name="clang::Preprocessor">
- <DisplayString IncludeView="cached" Condition="CachedLexPos < CachedTokens.Size">
- [{(Token *)(CachedTokens.BeginX) + CachedLexPos,na}] {IncludeMacroStack._Mypair._Myval2._Mylast - 1,na}
- </DisplayString>
- <DisplayString IncludeView="cached"> {IncludeMacroStack._Mypair._Myval2._Mylast - 1,na}</DisplayString>
- <DisplayString Condition="CurLexer._Mypair._Myval2 != 0">{CurLexer._Mypair._Myval2,na}</DisplayString>
- <DisplayString Condition="CurTokenLexer._Mypair._Myval2 != 0">Expanding Macro: {CurTokenLexer._Mypair._Myval2,na}</DisplayString>
- <!-- Can't use CurLexerCallback because natvis sees the type rather than the variable -->
- <DisplayString Condition="IncludeMacroStack._Mypair._Myval2._Mylast - IncludeMacroStack._Mypair._Myval2._Myfirst">
- {this,view(cached)}
- </DisplayString>
- <DisplayString>CLK_LexAfterModuleImport</DisplayString>
- </Type>
- <Type Name="clang::Parser">
- <DisplayString>[{Tok}] {PP,na}</DisplayString>
- </Type>
- <Type Name="clang::LambdaIntroducer::LambdaCapture">
- <DisplayString Condition="Kind == LCK_This">this</DisplayString>
- <DisplayString Condition="Kind == LCK_StarThis">*this</DisplayString>
- <DisplayString Condition="Kind == LCK_ByCopy">{Id}</DisplayString>
- <DisplayString Condition="Kind == LCK_ByRef">&{Id}</DisplayString>
- <DisplayString>No visualizer for {Kind}</DisplayString>
- </Type>
- <Type Name="clang::LambdaIntroducer">
- <DisplayString IncludeView="default" Condition="Default==LCD_None"></DisplayString>
- <DisplayString IncludeView="default" Condition="Default==LCD_ByCopy">=,</DisplayString>
- <DisplayString IncludeView="default" Condition="Default==LCD_ByRef">&,</DisplayString>
- <DisplayString IncludeView="capture0" Condition="Captures.Size==0"></DisplayString>
- <DisplayString IncludeView="capture0">{(LambdaCapture *)(Captures.BeginX),na}{this,view(capture1)na}</DisplayString>
- <DisplayString IncludeView="capture1" Condition="Captures.Size==1"></DisplayString>
- <DisplayString IncludeView="capture1">,{(LambdaCapture *)(Captures.BeginX)+1,na}{this,view(capture2)na}</DisplayString>
- <DisplayString IncludeView="capture2" Condition="Captures.Size==2"></DisplayString>
- <DisplayString IncludeView="capture2">,{(LambdaCapture *)(Captures.BeginX)+2,na}{this,view(capture3)na}</DisplayString>
- <DisplayString IncludeView="capture3" Condition="Captures.Size==3"></DisplayString>
- <DisplayString IncludeView="capture3">,...</DisplayString>
- <DisplayString>[{this,view(default)na}{this,view(capture0)na}]</DisplayString>
- </Type>
- <Type Name="clang::DeclSpec">
- <DisplayString IncludeView="extra" Condition="TypeSpecType == TST_typename || TypeSpecType == TST_typeofType || TypeSpecType == TST_underlying_type || TypeSpecType == TST_atomic">
- , [{TypeRep}]
- </DisplayString>
- <DisplayString IncludeView="extra" Condition="TypeSpecType == TST_typeofExpr || TypeSpecType == TST_decltype">
- , [{ExprRep}]
- </DisplayString>
- <DisplayString IncludeView="extra" Condition="TypeSpecType == TST_enum || TypeSpecType == TST_struct || TypeSpecType == TST_interface || TypeSpecType == TST_union || TypeSpecType == TST_class">
- , [{DeclRep}]
- </DisplayString>
- <DisplayString IncludeView="extra"></DisplayString>
- <DisplayString>[{(clang::DeclSpec::SCS)StorageClassSpec,en}], [{(clang::TypeSpecifierType)TypeSpecType,en}]{this,view(extra)na}</DisplayString>
- <Expand>
- <Item Name="StorageClassSpec">(clang::DeclSpec::SCS)StorageClassSpec</Item>
- <Item Name="TypeSpecType">(clang::TypeSpecifierType)TypeSpecType</Item>
- <Item Name="TypeRep" Condition="TypeSpecType == TST_typename || TypeSpecType == TST_typeofType || TypeSpecType == TST_underlying_type || TypeSpecType == TST_atomic">
- TypeRep
- </Item>
- <Item Name="ExprRep" Condition="TypeSpecType == TST_typeofExpr || TypeSpecType == TST_decltype">
- ExprRep
- </Item>
- <Item Name="DeclRep" Condition="TypeSpecType == TST_enum || TypeSpecType == TST_struct || TypeSpecType == TST_interface || TypeSpecType == TST_union || TypeSpecType == TST_class">
- DeclRep
- </Item>
-
- </Expand>
- </Type>
- <Type Name="clang::PragmaHandler">
- <DisplayString>{Name,s}</DisplayString>
- </Type>
- <Type Name="clang::FileEntry">
- <DisplayString>{RealPathName,s}</DisplayString>
- </Type>
- <Type Name="clang::DirectoryEntry">
- <DisplayString>{Name,s}</DisplayString>
- </Type>
- <Type Name="clang::VarDecl::VarDeclBitfields">
- <Expand>
- <Item Name="StorageClass">(clang::StorageClass)SClass</Item>
- <Item Name="ThreadStorageClass">(clang::ThreadStorageClassSpecifier)TSCSpec</Item>
- <Item Name="InitStyle">(clang::VarDecl::InitializationStyle)InitStyle</Item>
- </Expand>
- </Type>
- <Type Name="clang::DeclaratorDecl">
- <DisplayString>{DeclType,view(left)} {Name,view(cpp)}{DeclType,view(right)}</DisplayString>
- <Expand>
- <Item Name="Name">Name</Item>
- <Item Name="DeclType">DeclType</Item>
- </Expand>
- </Type>
- <Type Name="clang::VarDecl">
- <DisplayString>{(DeclaratorDecl*)this,nand}</DisplayString>
- <Expand>
- <ExpandedItem>(DeclaratorDecl*)this,nd</ExpandedItem>
- <Item Name="Init">Init</Item>
- <Item Name="VarDeclBits">VarDeclBits</Item>
- </Expand>
- </Type>
- <Type Name="clang::ParmVarDecl">
- <DisplayString>{*(VarDecl*)this,nd}</DisplayString>
- <Expand>
- <Item Name="ParmVarDeclBits">ParmVarDeclBits</Item>
- <ExpandedItem>*(VarDecl*)this,nd</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::ExplicitSpecifier">
- <DisplayString Condition="((*(uintptr_t *)ExplicitSpec.Value.Data>>1)&3) == ExplicitSpecKind::ResolvedTrue" IncludeView="cpp">{"explicit ",sb}</DisplayString>
- <DisplayString Condition="((*(uintptr_t *)ExplicitSpec.Value.Data>>1)&3) == ExplicitSpecKind::ResolvedFalse" IncludeView="cpp"></DisplayString>
- <DisplayString Condition="((*(uintptr_t *)ExplicitSpec.Value.Data>>1)&3) == ExplicitSpecKind::Unresolved" IncludeView="cpp">explicit({ExplicitSpec,view(ptr)na})</DisplayString>
- <DisplayString Condition="((*(uintptr_t *)ExplicitSpec.Value.Data)&~7) == 0">{ExplicitSpec,view(int)en}</DisplayString>
- <DisplayString>{ExplicitSpec,view(int)en} : {ExplicitSpec,view(ptr)na}</DisplayString>
- </Type>
- <Type Name="clang::CXXDeductionGuideDecl">
- <DisplayString>{ExplicitSpec,view(cpp)}{Name,view(cpp)nd}({(FunctionDecl*)this,view(parm0)nand}) -> {((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) & ~15))->BaseType)->ResultType,view(cpp)}</DisplayString>
- <Expand>
- <Item Name="ExplicitSpec">ExplicitSpec</Item>
- <Item Name="IsCopyDeductionCandidate">(bool)FunctionDeclBits.IsCopyDeductionCandidate</Item>
- <ExpandedItem>(FunctionDecl*)this,nd</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::FunctionDecl">
- <DisplayString IncludeView="retType">{((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->ResultType,view(cpp)}</DisplayString>
- <DisplayString IncludeView="parm0" Condition="0 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->FunctionTypeBits.NumParams"></DisplayString>
- <DisplayString IncludeView="parm0">{ParamInfo[0],na}{*this,view(parm1)nd}</DisplayString>
- <DisplayString IncludeView="parm1" Condition="1 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->FunctionTypeBits.NumParams"></DisplayString>
- <DisplayString IncludeView="parm1">, {ParamInfo[1],na}{*this,view(parm2)nd}</DisplayString>
- <DisplayString IncludeView="parm2" Condition="2 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->FunctionTypeBits.NumParams"></DisplayString>
- <DisplayString IncludeView="parm2">, {ParamInfo[2],na}{*this,view(parm3)nd}</DisplayString>
- <DisplayString IncludeView="parm3" Condition="3 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->FunctionTypeBits.NumParams"></DisplayString>
- <DisplayString IncludeView="parm3">, {ParamInfo[3],na}{*this,view(parm4)nd}</DisplayString>
- <DisplayString IncludeView="parm4" Condition="4 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->FunctionTypeBits.NumParams"></DisplayString>
- <DisplayString IncludeView="parm4">, {ParamInfo[4],na}{*this,view(parm5)nd}</DisplayString>
- <DisplayString IncludeView="parm5" Condition="5 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->FunctionTypeBits.NumParams"></DisplayString>
- <DisplayString IncludeView="parm5">, /* expand for more params */</DisplayString>
- <DisplayString Condition="((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->FunctionTypeBits.HasTrailingReturn">
- auto {Name,view(cpp)nd}({*this,view(parm0)nd}) -> {((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->ResultType,view(cpp)}
- </DisplayString>
- <DisplayString>{this,view(retType)nand} {Name,view(cpp)nd}({*this,view(parm0)nd})</DisplayString>
- <Expand>
- <ExpandedItem>(clang::DeclaratorDecl *)this,nd</ExpandedItem>
- <Item Name="ReturnType">((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->ResultType</Item>
- <Synthetic Name="Parameter Types">
- <DisplayString>{*this,view(parm0)nd}</DisplayString>
- <Expand>
- <ArrayItems>
- <Size>((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->FunctionTypeBits.NumParams</Size>
- <ValuePointer>ParamInfo</ValuePointer>
- </ArrayItems>
- </Expand>
- </Synthetic>
- <Item Name="TemplateOrSpecialization">TemplateOrSpecialization</Item>
- </Expand>
- </Type>
- <Type Name="clang::OpaquePtr<*>">
- <DisplayString>{*($T1*)&Ptr}</DisplayString>
- <Expand>
- <ExpandedItem>($T1*)&Ptr</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::UnionOpaquePtr<*>">
- <DisplayString>{($T1 *)Ptr}</DisplayString>
- <Expand>
- <ExpandedItem>($T1 *)Ptr</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::TemplateParameterList">
- <DisplayString IncludeView="parm0" Condition="NumParams==0"></DisplayString>
- <DisplayString IncludeView="parm0">{*((NamedDecl **)(this+1))[0],view(cpp)}{*this,view(parm1)}</DisplayString>
- <DisplayString IncludeView="parm1" Condition="NumParams==1"></DisplayString>
- <DisplayString IncludeView="parm1">, {*((NamedDecl **)(this+1))[1],view(cpp)}{*this,view(parm2)}</DisplayString>
- <DisplayString IncludeView="parm2" Condition="NumParams==2"></DisplayString>
- <DisplayString IncludeView="parm2">, {*((NamedDecl **)(this+1))[2],view(cpp)}{*this,view(parm3)}</DisplayString>
- <DisplayString IncludeView="parm3" Condition="NumParams==3"></DisplayString>
- <DisplayString IncludeView="parm3">, {*((NamedDecl **)(this+1))[3],view(cpp)}{*this,view(parm4)}</DisplayString>
- <DisplayString IncludeView="parm4" Condition="NumParams==4"></DisplayString>
- <DisplayString IncludeView="parm4">, {*((NamedDecl **)(this+1))[4],view(cpp)}{*this,view(parm5)}</DisplayString>
- <DisplayString IncludeView="parm5" Condition="NumParams==5"></DisplayString>
- <DisplayString IncludeView="parm5">, /* Expand for more params */</DisplayString>
- <DisplayString><{*this,view(parm0)}></DisplayString>
- <Expand>
- <ArrayItems>
- <Size>NumParams</Size>
- <ValuePointer>(NamedDecl **)(this+1)</ValuePointer>
- </ArrayItems>
- </Expand>
- </Type>
- <Type Name="clang::Stmt">
- <DisplayString>{(clang::Stmt::StmtClass)StmtBits.sClass,en}</DisplayString>
- <Expand>
- <Item Name="Class">(clang::Stmt::StmtClass)StmtBits.sClass,en</Item>
- </Expand>
- </Type>
- <Type Name="clang::Expr">
- <DisplayString Condition="StmtBits.sClass==clang::Stmt::StmtClass::StringLiteralClass" IncludeView="poly">{*(clang::StringLiteral *)this}</DisplayString>
- <DisplayString>Expression of class {(clang::Stmt::StmtClass)StmtBits.sClass,en} and type {TR,view(cpp)}</DisplayString>
- </Type>
- <Type Name="clang::StringLiteral">
- <Expand>
- <Item Name="Length">*(unsigned *)(((clang::StringLiteral *)this)+1)</Item>
- <Item Name="Data" Condition="StringLiteralBits.NumConcatenated==1">(const char *)(((clang::StringLiteral *)this)+1)+4+4,[*(unsigned *)(((clang::StringLiteral *)this)+1)]s8</Item>
- </Expand>
- </Type>
- <Type Name="clang::DeclAccessPair">
- <DisplayString IncludeView="access" Condition="(Ptr&Mask) == clang::AS_public">public</DisplayString>
- <DisplayString IncludeView="access" Condition="(Ptr&Mask) == clang::AS_protected">protected</DisplayString>
- <DisplayString IncludeView="access" Condition="(Ptr&Mask) == clang::AS_private">private</DisplayString>
- <DisplayString IncludeView="access" Condition="(Ptr&Mask) == clang::AS_none"></DisplayString>
- <DisplayString IncludeView="decl">{*(clang::NamedDecl *)(Ptr&~Mask)}</DisplayString>
- <DisplayString>{*this,view(access)} {*this,view(decl)}</DisplayString>
- <Expand>
- <Item Name="access">(clang::AccessSpecifier)(Ptr&Mask),en</Item>
- <Item Name="decl">*(clang::NamedDecl *)(Ptr&~Mask)</Item>
- </Expand>
- </Type>
- <Type Name="clang::UnqualifiedId">
- <DisplayString Condition="Kind==UnqualifiedIdKind::IK_Identifier">[IK_Identifier] {*Identifier}</DisplayString>
- <DisplayString Condition="Kind==UnqualifiedIdKind::IK_OperatorFunctionId">[IK_OperatorFunctionId] {OperatorFunctionId}</DisplayString>
- <DisplayString Condition="Kind==UnqualifiedIdKind::IK_ConversionFunctionId">[IK_ConversionFunctionId] {ConversionFunctionId}</DisplayString>
- <DisplayString Condition="Kind==UnqualifiedIdKind::IK_ConstructorName">[IK_ConstructorName] {ConstructorName}</DisplayString>
- <DisplayString Condition="Kind==UnqualifiedIdKind::IK_DestructorName">[IK_DestructorName] {DestructorName}</DisplayString>
- <DisplayString Condition="Kind==UnqualifiedIdKind::IK_DeductionGuideName">[IK_DeductionGuideName] {TemplateName}</DisplayString>
- <DisplayString Condition="Kind==UnqualifiedIdKind::IK_TemplateId">[IK_TemplateId] {TemplateId}</DisplayString>
- <DisplayString Condition="Kind==UnqualifiedIdKind::IK_ConstructorTemplateId">[IK_ConstructorTemplateId] {TemplateId}</DisplayString>
- <DisplayString>Kind</DisplayString>
- <Expand>
- <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_Identifier">Identifier</ExpandedItem>
- <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_OperatorFunctionId">OperatorFunctionId</ExpandedItem>
- <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_ConversionFunctionId">ConversionFunctionId</ExpandedItem>
- <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_ConstructorName">ConstructorName</ExpandedItem>
- <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_DestructorName">DestructorName</ExpandedItem>
- <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_DeductionGuideName">TemplateName</ExpandedItem>
- <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_TemplateId">TemplateId</ExpandedItem>
- <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_ConstructorTemplateId">TemplateId</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::DeclGroup">
- <DisplayString>NumDecls={NumDecls}</DisplayString>
- <Expand>
- <ArrayItems>
- <Size>NumDecls</Size>
- <ValuePointer>(Decl **)(this+1)</ValuePointer>
- </ArrayItems>
- </Expand>
- </Type>
- <Type Name="clang::DeclGroupRef">
- <DisplayString Condition="(Kind)((uintptr_t)D&1)==SingleDeclKind">{*D}</DisplayString>
- <DisplayString>{*(DeclGroup *)((uintptr_t)D&~1)}</DisplayString>
- <Expand>
- <ExpandedItem Condition="(Kind)((uintptr_t)D&1)==SingleDeclKind">D</ExpandedItem>
- <ExpandedItem Condition="(Kind)((uintptr_t)D&1)==DeclGroupKind">(DeclGroup *)((uintptr_t)D&~1)</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::Declarator">
- <DisplayString>{DS} {Name}</DisplayString>
- </Type>
- <Type Name="clang::UnresolvedSet<*>">
- <DisplayString>{Decls}</DisplayString>
- <Expand>
- <ExpandedItem>Decls</ExpandedItem>
- </Expand>
- </Type>
- <Type Name="clang::LookupResult">
- <DisplayString Condition="ResultKind == clang::LookupResult::Ambiguous">{Ambiguity,en}: {Decls}</DisplayString>
- <DisplayString>{ResultKind,en}: {Decls}</DisplayString>
- </Type>
- <Type Name="clang::ActionResult<*, 0>">
- <DisplayString Condition="Invalid">Invalid</DisplayString>
- <DisplayString Condition="!*(void **)&Val">Unset</DisplayString>
- <DisplayString>{Val}</DisplayString>
- </Type>
- <Type Name="clang::ActionResult<*, 1>">
- <DisplayString Condition="Value&1">Invalid</DisplayString>
- <DisplayString Condition="Value==0">Unset</DisplayString>
- <DisplayString>{($T1)(Value&~1)}</DisplayString>
- <Expand>
- <Item Name="Invalid">(bool)(Value&1)</Item>
- <Item Name="Val">($T1)(Value&~1)</Item>
- </Expand>
- </Type>
-</AutoVisualizer>
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Visual Studio Native Debugging Visualizers for LLVM
+
+For Visual Studio 2013 only, put this file into
+"%USERPROFILE%\Documents\Visual Studio 2013\Visualizers" or create a symbolic link so it updates automatically.
+
+For later versions of Visual Studio, no setup is required-->
+<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
+
+ <Type Name="clang::Type">
+ <!-- To visualize clang::Types, we need to look at TypeBits.TC to determine the actual
+ type subclass and manually dispatch accordingly (Visual Studio can't identify the real type
+ because clang::Type has no virtual members hence no RTTI).
+
+ Views:
+ "cmn": Visualization that is common to all clang::Type subclasses
+ "poly": Visualization that is specific to the actual clang::Type subclass. The subtype-specific
+ <DisplayString> is typically as C++-like as possible (like in dump()) with <Expand>
+ containing all the gory details.
+ "cpp": Only occasionally used when we need to distinguish between an ordinary view and a C++-like view.
+ -->
+ <DisplayString IncludeView="cmn" Condition="TypeBits.TC==clang::LocInfoType::LocInfo">LocInfoType</DisplayString>
+ <DisplayString IncludeView="cmn">{(clang::Type::TypeClass)TypeBits.TC, en}Type</DisplayString>
+ <!-- Dispatch to visualizers for the actual Type subclass -->
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Builtin" IncludeView="poly">{*(clang::BuiltinType *)this}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Pointer" IncludeView="poly">{*(clang::PointerType *)this}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Paren" IncludeView="poly">{*(clang::ParenType *)this}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::BitInt" IncludeView="poly">{(clang::BitIntType *)this}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::LValueReference" IncludeView="poly">{*(clang::LValueReferenceType *)this}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::RValueReference" IncludeView="poly">{*(clang::RValueReferenceType *)this}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::ConstantArray" IncludeView="poly">{(clang::ConstantArrayType *)this,na}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::ConstantArray" IncludeView="left">{(clang::ConstantArrayType *)this,view(left)na}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::ConstantArray" IncludeView="right">{(clang::ConstantArrayType *)this,view(right)na}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::VariableArray" IncludeView="poly">{(clang::VariableArrayType *)this,na}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::VariableArray" IncludeView="left">{(clang::VariableArrayType *)this,view(left)na}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::VariableArray" IncludeView="right">{(clang::VariableArrayType *)this,view(right)na}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::IncompleteArray" IncludeView="poly">{(clang::IncompleteArrayType *)this,na}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::IncompleteArray" IncludeView="left">{(clang::IncompleteArrayType *)this,view(left)na}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::IncompleteArray" IncludeView="right">{(clang::IncompleteArrayType *)this,view(right)na}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Typedef" IncludeView="poly">{(clang::TypedefType *)this,na}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Typedef" IncludeView="cpp">{(clang::TypedefType *)this,view(cpp)na}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Attributed" IncludeView="poly">{*(clang::AttributedType *)this}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Decayed" IncludeView="poly">{(clang::DecayedType *)this,na}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Decayed" IncludeView="left">{(clang::DecayedType *)this,view(left)na}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Decayed" IncludeView="right">{(clang::DecayedType *)this,view(right)na}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Elaborated" IncludeView="poly">{(clang::ElaboratedType *)this,na}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Elaborated" IncludeView="left">{(clang::ElaboratedType *)this,view(left)na}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Elaborated" IncludeView="right">{(clang::ElaboratedType *)this,view(right)na}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::TemplateTypeParm" IncludeView="poly">{*(clang::TemplateTypeParmType *)this}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::TemplateTypeParm" IncludeView="cpp">{*(clang::TemplateTypeParmType *)this,view(cpp)}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::SubstTemplateTypeParm" IncludeView="poly">{*(clang::SubstTemplateTypeParmType *)this}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Record" IncludeView="poly">{*(clang::RecordType *)this}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Record" IncludeView="cpp">{*(clang::RecordType *)this,view(cpp)}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::FunctionProto" IncludeView="poly">{(clang::FunctionProtoType *)this,na}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::FunctionProto" IncludeView="left">{(clang::FunctionProtoType *)this,view(left)na}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::FunctionProto" IncludeView="right">{(clang::FunctionProtoType *)this,view(right)na}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::TemplateSpecialization" IncludeView="poly">{*(clang::TemplateSpecializationType *)this}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::DeducedTemplateSpecialization" IncludeView="poly">{*(clang::DeducedTemplateSpecializationType *)this}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::DeducedTemplateSpecialization" IncludeView="cpp">{*(clang::DeducedTemplateSpecializationType *)this,view(cpp)}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::InjectedClassName" IncludeView="poly">{*(clang::InjectedClassNameType *)this}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::DependentName" IncludeView="poly">{*(clang::DependentNameType *)this}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::PackExpansion" IncludeView="poly">{*(clang::PackExpansionType *)this}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::LocInfoType::LocInfo" IncludeView="poly">{(clang::LocInfoType *)this,na}</DisplayString>
+ <DisplayString Condition="TypeBits.TC==clang::LocInfoType::LocInfo" IncludeView="cpp">{(clang::LocInfoType *)this,view(cpp)na}</DisplayString>
+ <DisplayString IncludeView="cpp">{this,view(poly)na}</DisplayString>
+ <DisplayString IncludeView="left">{*this,view(cpp)}</DisplayString>
+ <DisplayString IncludeView="right"></DisplayString>
+ <DisplayString IncludeView="poly">No visualizer yet for {(clang::Type::TypeClass)TypeBits.TC,en}Type</DisplayString> <!-- Not yet implemented Type subclass -->
+ <DisplayString IncludeView="Dependence" Condition="TypeBits.Dependence">Dependence{" ",en}</DisplayString>
+ <DisplayString IncludeView="Dependence"></DisplayString>
+ <DisplayString IncludeView="Cache" Condition="TypeBits.CacheValid && TypeBits.CachedLocalOrUnnamed">CachedLinkage: {(clang::Linkage)TypeBits.CachedLinkage,en} CachedLocalOrUnnamed</DisplayString>
+ <DisplayString IncludeView="Cache" Condition="TypeBits.CacheValid && !TypeBits.CachedLocalOrUnnamed">CachedLinkage: {(clang::Linkage)TypeBits.CachedLinkage,en}{" ",sb}</DisplayString>
+ <DisplayString IncludeView="Cache"></DisplayString>
+ <DisplayString IncludeView="FromAST" Condition="TypeBits.FromAST">FromAST</DisplayString>
+ <DisplayString IncludeView="FromAST"></DisplayString>
+ <DisplayString IncludeView="flags" Condition="!TypeBits.Dependence && !TypeBits.CacheValid && !TypeBits.FromAST">
+ No TypeBits set beyond TypeClass
+ </DisplayString>
+ <DisplayString IncludeView="flags">{*this, view(Dependence)}{*this, view(Cache)}{*this, view(FromAST)}</DisplayString>
+ <DisplayString>{*this,view(cmn)} {{{*this,view(poly)}}}</DisplayString>
+ <Expand>
+ <Item Name="TypeClass" IncludeView="cmn">(clang::Type::TypeClass)TypeBits.TC</Item>
+ <Item Name="Flags" IncludeView="cmn">this,view(flags)na</Item>
+ <Item Name="Canonical" IncludeView="cmn">CanonicalType</Item>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Builtin">*(clang::BuiltinType *)this</ExpandedItem>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Pointer">*(clang::PointerType *)this</ExpandedItem>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Paren">*(clang::ParenType*)this</ExpandedItem>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::BitInt">*(clang::BitIntType*)this</ExpandedItem>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::LValueReference">*(clang::LValueReferenceType *)this</ExpandedItem>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::RValueReference">*(clang::RValueReferenceType *)this</ExpandedItem>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::ConstantArray">(clang::ConstantArrayType *)this</ExpandedItem>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::VariableArray">(clang::VariableArrayType *)this</ExpandedItem>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::IncompleteArray">(clang::IncompleteArrayType *)this</ExpandedItem>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Attributed">*(clang::AttributedType *)this</ExpandedItem>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Decayed">(clang::DecayedType *)this</ExpandedItem>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Elaborated">(clang::ElaboratedType *)this</ExpandedItem>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::TemplateTypeParm">(clang::TemplateTypeParmType *)this</ExpandedItem>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::SubstTemplateTypeParm">(clang::SubstTemplateTypeParmType *)this</ExpandedItem>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::Record">(clang::RecordType *)this</ExpandedItem>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::FunctionProto">(clang::FunctionProtoType *)this</ExpandedItem>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::TemplateSpecialization">(clang::TemplateSpecializationType *)this</ExpandedItem>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::DeducedTemplateSpecialization">(clang::DeducedTemplateSpecializationType *)this</ExpandedItem>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::InjectedClassName">(clang::InjectedClassNameType *)this</ExpandedItem>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::DependentName">(clang::DependentNameType *)this</ExpandedItem>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::Type::TypeClass::PackExpansion">(clang::PackExpansionType *)this</ExpandedItem>
+ <ExpandedItem ExcludeView="cmn" Condition="TypeBits.TC==clang::LocInfoType::LocInfo">(clang::LocInfoType *)this</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::ArrayType">
+ <Expand>
+ <Item Name="ElementType">ElementType</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::ConstantArrayType">
+ <DisplayString IncludeView="left">{ElementType,view(cpp)}</DisplayString>
+ <DisplayString IncludeView="right">[{Size}]</DisplayString>
+ <DisplayString>{ElementType,view(cpp)}[{Size}]</DisplayString>
+ <Expand>
+ <Item Name="Size">Size</Item>
+ <ExpandedItem>(clang::ArrayType *)this</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::IncompleteArrayType">
+ <DisplayString IncludeView="left">{ElementType,view(cpp)}</DisplayString>
+ <DisplayString IncludeView="right">[]</DisplayString>
+ <DisplayString>{ElementType,view(cpp)}[]</DisplayString>
+ <Expand>
+ <ExpandedItem>(clang::ArrayType *)this</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::VariableArrayType">
+ <DisplayString IncludeView="left">{ElementType,view(cpp)}</DisplayString>
+ <DisplayString IncludeView="right">[*]</DisplayString>
+ <DisplayString>{ElementType,view(cpp)}[*]</DisplayString>
+ <Expand>
+ <Item Name="[Size Expression]">(clang::Expr *)SizeExpr</Item>
+ <ExpandedItem>(clang::ArrayType *)this</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::TypedefType">
+ <DisplayString IncludeView="cpp">{Decl,view(name)nd}</DisplayString>
+ <DisplayString>{Decl}</DisplayString>
+ <Expand>
+ <Item Name="Decl">Decl</Item>
+ <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::PointerType">
+ <DisplayString>{PointeeType, view(cpp)} *</DisplayString>
+ <Expand>
+ <Item Name="PointeeType">PointeeType</Item>
+ <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::ParenType">
+ <DisplayString>{Inner, view(cpp)}</DisplayString>
+ <Expand>
+ <Item Name="Inner">Inner</Item>
+ <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::BitIntType">
+ <DisplayString Condition="!IsUnsigned">signed _BitInt({NumBits})</DisplayString>
+ <DisplayString Condition="!IsUnsigned">unsigned _BitInt({NumBits})(</DisplayString>
+ <Expand>
+ <Item Name="NumBits">NumBits</Item>
+ <ExpandedItem>(clang::Type *)this, view(cmn)</ExpandedItem>
+ </Expand>
+ </Type>
+ <!-- We visualize all inner types for clang reference types. So a rvalue reference to an lvalue reference
+ to an int would visual as int & && This is a little different than GetPointeeType(),
+ but more clearly displays the data structure and seems natural -->
+ <Type Name="clang::LValueReferenceType">
+ <DisplayString>{((clang::ReferenceType *)this)->PointeeType,view(cpp)} &</DisplayString>
+ <Expand>
+ <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
+ <Item Name="PointeeType">PointeeType</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::RValueReferenceType">
+ <DisplayString>{((clang::ReferenceType *)this)->PointeeType,view(cpp)} &&</DisplayString>
+ <Expand>
+ <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
+ <Item Name="PointeeType">PointeeType</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::AttributedType">
+ <DisplayString>{ModifiedType} Attribute={(clang::AttributedType::Kind)AttributedTypeBits.AttrKind}</DisplayString>
+ </Type>
+
+ <!-- Unfortunately, Visual Studio has trouble seeing the PointerBitMask member PointerIntUnion, so I hardwire it to 2 bits-->
+ <Type Name="clang::DeclContext">
+ <DisplayString>{(clang::Decl::Kind)DeclContextBits.DeclKind,en}Decl</DisplayString>
+ <Expand>
+ <Item Name="DeclKind">(clang::Decl::Kind)DeclContextBits.DeclKind,en</Item>
+ <Synthetic Name="Members">
+ <DisplayString></DisplayString>
+ <Expand>
+ <LinkedListItems>
+ <HeadPointer>FirstDecl</HeadPointer>
+ <NextPointer>(clang::Decl *)(*(intptr_t *)NextInContextAndBits.Value.Data & ~3)</NextPointer>
+ <ValueNode>*this</ValueNode>
+ </LinkedListItems>
+ </Expand>
+ </Synthetic>
+ </Expand>
+ </Type>
+ <Type Name="clang::FieldDecl">
+ <DisplayString>Field {{{*(clang::DeclaratorDecl *)this,view(cpp)nd}}}</DisplayString>
+ </Type>
+ <Type Name="clang::CXXMethodDecl">
+ <DisplayString IncludeView="cpp">{*(clang::FunctionDecl *)this,nd}</DisplayString>
+ <DisplayString>Method {{{*this,view(cpp)}}}</DisplayString>
+ </Type>
+ <Type Name="clang::CXXConstructorDecl">
+ <DisplayString>Constructor {{{Name,view(cpp)}({*(clang::FunctionDecl *)this,view(parm0)nd})}}</DisplayString>
+ </Type>
+ <Type Name="clang::CXXDestructorDecl">
+ <DisplayString>Destructor {{~{Name,view(cpp)}()}}</DisplayString>
+ </Type>
+ <Type Name="clang::TemplateTypeParmDecl">
+ <DisplayString IncludeView="TorC" Condition="Typename">typename</DisplayString>
+ <DisplayString IncludeView="TorC" Condition="!Typename">class</DisplayString>
+ <DisplayString IncludeView="MaybeEllipses" Condition="TypeForDecl == nullptr">(not yet known if parameter pack) </DisplayString>
+ <DisplayString IncludeView="MaybeEllipses" Condition="((clang::TemplateTypeParmType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)TypeForDecl->CanonicalType.Value.Value.Data) & ~(uintptr_t)((1U << clang::TypeAlignmentInBits) - 1U)))->BaseType)->CanTTPTInfo.ParameterPack">...</DisplayString>
+ <DisplayString IncludeView="MaybeEllipses" Condition="!((clang::TemplateTypeParmType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)TypeForDecl->CanonicalType.Value.Value.Data) & ~(uintptr_t)((1U << clang::TypeAlignmentInBits) - 1U)))->BaseType)->CanTTPTInfo.ParameterPack"></DisplayString>
+ <DisplayString IncludeView="DefaultArg" Condition="(*(uintptr_t *)DefaultArgument.ValueOrInherited.Val.Value.Data & 3LL) == 0">{(TypeSourceInfo *)(*(uintptr_t *)DefaultArgument.ValueOrInherited.Val.Value.Data&~3LL),view(cpp)}</DisplayString>
+ <DisplayString IncludeView="DefaultArg">{{InheritedInitializer}}</DisplayString>
+ <DisplayString IncludeView="Initializer" Condition="*(uintptr_t *)DefaultArgument.ValueOrInherited.Val.Value.Data & 3LL">= {this,view(DefaultArg)na}</DisplayString>
+ <DisplayString IncludeView="Initializer"></DisplayString>
+ <DisplayString>{*this,view(TorC)} {*this,view(MaybeEllipses)}{Name,view(cpp)} {this,view(Initializer)na}</DisplayString>
+ </Type>
+ <Type Name="clang::TemplateDecl">
+ <DisplayString IncludeView="cpp">{*TemplatedDecl,view(cpp)}</DisplayString>
+ <DisplayString>template{TemplateParams,na} {*TemplatedDecl};</DisplayString>
+ <Expand>
+ <Item Name="TemplateParams">TemplateParams,na</Item>
+ <Item Name="TemplatedDecl">TemplatedDecl,na</Item>
+ </Expand>
+ </Type>
+ <!-- Unfortunately, visualization of PointerIntPair<PointerUnion> doesn't work due to limitations in natvis, so we will barehad it-->
+ <Type Name="clang::TypedefNameDecl">
+ <DisplayString Condition="(*(uintptr_t *)MaybeModedTInfo.Value.Data & 4)==0" IncludeView="type">{(clang::TypeSourceInfo *)(*(uintptr_t *)MaybeModedTInfo.Value.Data & ~7LL),view(cpp)na}</DisplayString>
+ <DisplayString Condition="(*(uintptr_t *)MaybeModedTInfo.Value.Data & 4)!=0" IncludeView="type">{(clang::TypedefNameDecl::ModedTInfo *)(*(uintptr_t *)MaybeModedTInfo.Value.Data & ~7LL),view(cpp)na}</DisplayString>
+ <DisplayString IncludeView="name">{(TypeDecl *)this,view(cpp)nand}</DisplayString>
+ <DisplayString>typedef {this,view(type)na} {this,view(name)na};</DisplayString>
+ <Expand>
+ <Item Name="IsTransparent" Condition="(*(uintptr_t *)MaybeModedTInfo.Value.Data & 1)==0">"Not yet calculated",sb</Item>
+ <Item Name="IsTransparent" Condition="(*(uintptr_t *)MaybeModedTInfo.Value.Data & 1)!=0">(bool)(*(uintptr_t *)MaybeModedTInfo.Value.Data & 2)</Item>
+ <Item Name="TypeSourceInfo" Condition="(*(uintptr_t *)MaybeModedTInfo.Value.Data & 4)==0">(clang::TypeSourceInfo *)(*(uintptr_t *)MaybeModedTInfo.Value.Data & ~7LL)</Item>
+ <Item Name="ModedTInfo" Condition="(*(uintptr_t *)MaybeModedTInfo.Value.Data & 4)!=0">(clang::TypedefNameDecl::ModedTInfo *)(*(uintptr_t *)MaybeModedTInfo.Value.Data & ~7LL)</Item>
+ <ExpandedItem>(TypeDecl *)this,nd</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::TypeAliasDecl">
+ <DisplayString IncludeView="cpp">{(TypedefNameDecl *)this,view(name)nand}</DisplayString>
+ <DisplayString>using {(TypedefNameDecl *)this,view(name)nand} = {(TypedefNameDecl *)this,view(type)nand}</DisplayString>
+ </Type>
+ <Type Name="clang::AssumedTemplateStorage">
+ <DisplayString>{Name}</DisplayString>
+ </Type>
+ <Type Name="clang::UncommonTemplateNameStorage::BitsTag">
+ <DisplayString>Kind={(UncommonTemplateNameStorage::Kind)Kind,en}, Size={Size}</DisplayString>
+ <Expand>
+ <Item Name="Kind">(UncommonTemplateNameStorage::Kind)Kind</Item>
+ <Item Name="Size">Size</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::UncommonTemplateNameStorage">
+ <DisplayString IncludeView="cmn">{Bits},</DisplayString>
+ <DisplayString Condition="Bits.Kind==UncommonTemplateNameStorage::Overloaded">{this,view(cmn)na},{(OverloadedTemplateStorage*)this,na}</DisplayString>
+ <DisplayString Condition="Bits.Kind==UncommonTemplateNameStorage::Assumed">{this,view(cmn)na},{(AssumedTemplateStorage*)this,na}</DisplayString>
+ <DisplayString Condition="Bits.Kind==UncommonTemplateNameStorage::SubstTemplateTemplateParm">{this,view(cmn)na},{(SubstTemplateTemplateParmStorage*)this,na}</DisplayString>
+ <DisplayString Condition="Bits.Kind==UncommonTemplateNameStorage::SubstTemplateTemplateParmPack">{this,view(cmn)na},{(SubstTemplateTemplateParmPackStorage*)this,na}</DisplayString>
+ <DisplayString>{this,view(cmn)na}</DisplayString>
+ <Expand>
+ <Item Name="Bits">Bits</Item>
+ <ExpandedItem Condition="Bits.Kind==UncommonTemplateNameStorage::Overloaded">(OverloadedTemplateStorage*)this</ExpandedItem>
+ <ExpandedItem Condition="Bits.Kind==UncommonTemplateNameStorage::Assumed">(AssumedTemplateStorage*)this</ExpandedItem>
+ <ExpandedItem Condition="Bits.Kind==UncommonTemplateNameStorage::SubstTemplateTemplateParm">(SubstTemplateTemplateParmStorage*)this</ExpandedItem>
+ <ExpandedItem Condition="Bits.Kind==UncommonTemplateNameStorage::SubstTemplateTemplateParmPack">(SubstTemplateTemplateParmPackStorage*)this</ExpandedItem>
+ </Expand>
+ </Type>
+ <!-- clang::TemplateName::StorageType -->
+ <Type Name="llvm::PointerUnion<clang::TemplateDecl *, clang::UncommonTemplateNameStorage *,
+ clang::QualifiedTemplateName *, clang::DependentTemplateName *>">
+ <!-- Expand this out by hand to get cpp view -->
+ <DisplayString Condition="(Val.Value &3) == 0" IncludeView="cpp">
+ {(clang::TemplateDecl *)(Val.Value & ~3LL),view(cpp)na}
+ </DisplayString>
+ <DisplayString Condition="(Val.Value &3) == 0">
+ {(clang::TemplateDecl *)(Val.Value & ~3LL),na}
+ </DisplayString>
+ <DisplayString Condition="(Val.Value &3) == 1" IncludeView="cpp">
+ {(clang::UncommonTemplateNameStorage *)(Val.Value & ~3LL),view(cpp)na}
+ </DisplayString>
+ <DisplayString Condition="(Val.Value &3) == 1">
+ {(clang::UncommonTemplateNameStorage *)(Val.Value & ~3LL),na}
+ </DisplayString>
+ <DisplayString Condition="(Val.Value &3) == 2" IncludeView="cpp">
+ {(clang::QualifiedTemplateName *)(Val.Value & ~3LL),view(cpp)na}
+ </DisplayString>
+ <DisplayString Condition="(Val.Value &3) == 2">
+ {(clang::QualifiedTemplateName *)(Val.Value & ~3LL),na}
+ </DisplayString>
+ <DisplayString Condition="(Val.Value &3) == 3" IncludeView="cpp">
+ {(clang::DependentTemplateName *)(Val.Value & ~3LL),view(cpp)na}
+ </DisplayString>
+ <DisplayString Condition="(Val.Value &3) == 3">
+ {(clang::DependentTemplateName *)(Val.Value & ~3LL),na}
+ </DisplayString>
+ <Expand>
+ <Item Name="[Holds]" Condition="(Val.Value &3) == 0">"TemplateDecl",s8b</Item>
+ <Item Name="[Ptr]" Optional="true" Condition="(Val.Value &3) == 0">
+ (clang::TemplateDecl *)(Val.Value & ~3LL)
+ </Item>
+ <Item Name="[Holds]" Condition="(Val.Value &3) == 1">"UncommonTemplateNameStorage",s8b</Item>
+ <Item Name="[Ptr]" Optional="true" Condition="(Val.Value &3) == 1">
+ (clang::UncommonTemplateNameStorage *)(Val.Value & ~3LL)
+ </Item>
+ <Item Name="[Holds]" Condition="(Val.Value &3) == 2">"QualifiedTemplateName",s8b</Item>
+ <Item Name="[Ptr]" Optional="true" Condition="(Val.Value &3) == 2">
+ (clang::QualifiedTemplateName *)(Val.Value & ~3LL)
+ </Item>
+ <Item Name="[Holds]" Condition="(Val.Value &3) == 3">"DependentTemplateName",s8b</Item>
+ <Item Name="[Ptr]" Optional="true" Condition="(Val.Value &3) == 3">
+ (clang::DependentTemplateName *)(Val.Value & ~3LL)
+ </Item>
+ <Item Name="[Val]">Val</Item>
+
+ </Expand>
+ </Type>
+ <Type Name="clang::TemplateName">
+ <DisplayString IncludeView="cpp">{Storage,view(cpp)na}</DisplayString>
+ <DisplayString>{Storage,na}</DisplayString>
+ <Expand>
+ <ExpandedItem>Storage</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::NamedDecl" >
+ <DisplayString IncludeView="cpp">{Name,view(cpp)}</DisplayString>
+ <DisplayString>{Name}</DisplayString>
+ </Type>
+ <Type Name="clang::TagDecl">
+ <DisplayString IncludeView="implicit" Condition="Implicit">implicit{" ",sb}</DisplayString>
+ <DisplayString IncludeView="implicit"></DisplayString>
+ <DisplayString IncludeView="modifiers">{*this,view(implicit)nd}</DisplayString>
+ <DisplayString IncludeView="cpp">{*this,view(modifiers)}{Name,view(cpp)}</DisplayString>
+ <DisplayString Condition="TagDeclBits.TagDeclKind==clang::TagTypeKind::Struct">{*this,view(modifiers)nd}struct {Name,view(cpp)}</DisplayString>
+ <DisplayString Condition="TagDeclBits.TagDeclKind==clang::TagTypeKind::Interface">{*this,view(modifiers)nd}interface {Name,view(cpp)}</DisplayString>
+ <DisplayString Condition="TagDeclBits.TagDeclKind==clang::TagTypeKind::Union">{*this,view(modifiers)nd}union {Name,view(cpp)}</DisplayString>
+ <DisplayString Condition="TagDeclBits.TagDeclKind==clang::TagTypeKind::Class">{*this,view(modifiers)nd}class {Name,view(cpp)}</DisplayString>
+ <DisplayString Condition="TagDeclBits.TagDeclKind==clang::TagTypeKind::Enum">{*this,view(modifiers)nd}enum {Name,view(cpp)}</DisplayString>
+ <Expand>
+ <ExpandedItem>(clang::DeclContext *)this</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::TagType">
+ <DisplayString IncludeView="cpp">{decl,view(cpp)na}</DisplayString>
+ <DisplayString>{*decl}</DisplayString>
+ <Expand>
+ <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
+ <Item Name="decl">decl</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::RecordType">
+ <DisplayString IncludeView="cpp">{(clang::TagType *)this,view(cpp)na}</DisplayString>
+ <DisplayString>{(clang::TagType *)this,na}</DisplayString>
+ <Expand>
+ <Item Name="TagType">*(clang::TagType *)this</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::SubstTemplateTypeParmType">
+ <DisplayString>{{{*Replaced,view(cpp)} <= {CanonicalType,view(cpp)}}}</DisplayString>
+ <Expand>
+ <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
+ <Item Name="Replaced">*Replaced</Item>
+ </Expand>
+ </Type>
+ <!-- We only show the first 5 parameter types in the display string (can't figure out how to loop in DisplayString)
+ but the expansion has all parameters -->
+ <Type Name="clang::FunctionProtoType">
+ <DisplayString IncludeView="left" Condition="FunctionTypeBits.HasTrailingReturn"></DisplayString>
+ <DisplayString IncludeView="left">{ResultType,view(cpp)}</DisplayString>
+ <DisplayString IncludeView="parm0" Condition="FunctionTypeBits.NumParams==0"></DisplayString>
+ <DisplayString IncludeView="parm0">{*(clang::QualType *)(this+1),view(cpp)}{*this,view(parm1)}</DisplayString>
+ <DisplayString IncludeView="parm1" Condition="FunctionTypeBits.NumParams==1"></DisplayString>
+ <DisplayString IncludeView="parm1">, {*((clang::QualType *)(this+1)+1),view(cpp)}{*this,view(parm2)}</DisplayString>
+ <DisplayString IncludeView="parm2" Condition="FunctionTypeBits.NumParams==2"></DisplayString>
+ <DisplayString IncludeView="parm2">, {*((clang::QualType *)(this+1)+2),view(cpp)}{*this,view(parm3)}</DisplayString>
+ <DisplayString IncludeView="parm3" Condition="FunctionTypeBits.NumParams==3"></DisplayString>
+ <DisplayString IncludeView="parm3">, {*((clang::QualType *)(this+1)+3),view(cpp)}{*this,view(parm4)}</DisplayString>
+ <DisplayString IncludeView="parm4" Condition="FunctionTypeBits.NumParams==4"></DisplayString>
+ <DisplayString IncludeView="parm4">, {*((clang::QualType *)(this+1)+4),view(cpp)}{*this,view(parm5)}</DisplayString>
+ <DisplayString IncludeView="parm5" Condition="FunctionTypeBits.NumParams==5"></DisplayString>
+ <DisplayString IncludeView="parm5">, /* expand for more params */</DisplayString>
+ <DisplayString IncludeView="right" Condition="FunctionTypeBits.HasTrailingReturn">({*this,view(parm0)}) -> {ResultType,view(cpp)}</DisplayString>
+ <DisplayString IncludeView="right">({*this,view(parm0)})</DisplayString>
+ <DisplayString>{this,view(left)na}{this,view(right)na}</DisplayString>
+ <Expand>
+ <Item Name="ResultType">ResultType</Item>
+ <Synthetic Name="Parameter Types">
+ <DisplayString>{*this,view(parm0)}</DisplayString>
+ <Expand>
+ <ArrayItems>
+ <Size>FunctionTypeBits.NumParams</Size>
+ <ValuePointer>(clang::QualType *)(this+1)</ValuePointer>
+ </ArrayItems>
+ </Expand>
+ </Synthetic>
+ <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
+ </Expand>
+ </Type>
+
+ <Type Name="clang::AdjustedType">
+ <DisplayString>{OriginalTy} adjusted to {AdjustedTy}</DisplayString>
+ <Expand>
+ <Item Name="OriginalTy">OriginalTy</Item>
+ <Item Name="AdjustedTy">AdjustedTy</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::DecayedType">
+ <DisplayString IncludeView="left">{OriginalTy,view(left)}</DisplayString>
+ <DisplayString IncludeView="right">{OriginalTy,view(right)}</DisplayString>
+ <DisplayString>{OriginalTy}</DisplayString>
+ <Expand>
+ <ExpandedItem>(clang::AdjustedType *)this</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::ElaboratedType">
+ <DisplayString IncludeView="left">{NamedType,view(left)}</DisplayString>
+ <DisplayString IncludeView="right">{NamedType,view(right)}</DisplayString>
+ <DisplayString>{NamedType}</DisplayString>
+ <Expand>
+ <Item Name="[Keyword]">(clang::ElaboratedTypeKeyword)TypeWithKeywordBits.Keyword</Item>
+ <Item Name="[Nested Name Specifier]">NNS</Item>
+ <Item Name="[Underlying Type]">NamedType,view(cmn)</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::TemplateTypeParmType">
+ <DisplayString IncludeView="cpp" Condition="((clang::TemplateTypeParmType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)CanonicalType.Value.Value.Data) & ~(uintptr_t)((1U << clang::TypeAlignmentInBits) - 1U)))->BaseType) != this">{TTPDecl->Name,view(cpp)}</DisplayString>
+ <DisplayString Condition="((clang::TemplateTypeParmType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)CanonicalType.Value.Value.Data) & ~(uintptr_t)((1U << clang::TypeAlignmentInBits) - 1U)))->BaseType) != this">Non-canonical: {*TTPDecl}</DisplayString>
+ <DisplayString>Canonical: {CanTTPTInfo}</DisplayString>
+ <Expand>
+ <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::InjectedClassNameType">
+ <DisplayString>{Decl,view(cpp)}</DisplayString>
+ <Expand>
+ <Item Name="Decl">Decl</Item>
+ <Item Name="InjectedType">InjectedType</Item>
+ <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::DependentNameType">
+ <DisplayString>{NNS}{Name,view(cpp)na}</DisplayString>
+ <Expand>
+ <Item Name="NNS">NNS</Item>
+ <Item Name="Name">Name</Item>
+ <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::NestedNameSpecifier">
+ <DisplayString Condition="!Specifier"></DisplayString>
+ <DisplayString Condition="((*(uintptr_t *)Prefix.Value.Data>>1)&3) == 0">{(IdentifierInfo*)Specifier,view(cpp)na}::</DisplayString>
+ <DisplayString Condition="((*(uintptr_t *)Prefix.Value.Data>>1)&3) == 1">{(NamedDecl*)Specifier,view(cpp)na}::</DisplayString>
+ <DisplayString Condition="((*(uintptr_t *)Prefix.Value.Data>>1)&3) == 2">{(Type*)Specifier,view(cpp)na}::</DisplayString>
+ <Expand>
+ <Item Name="Kind">(NestedNameSpecifier::StoredSpecifierKind)((*(uintptr_t *)Prefix.Value.Data>>1)&3)</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::PackExpansionType">
+ <DisplayString>{Pattern}</DisplayString>
+ <Expand>
+ <Item Name="Pattern">Pattern</Item>
+ <Item Name="NumExpansions">NumExpansions</Item>
+ <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::QualType">
+ <DisplayString IncludeView="poly">{((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)Value.Value.Data) & ~(uintptr_t)((1U << clang::TypeAlignmentInBits) - 1U)))->BaseType,view(poly)}{*this,view(fastQuals)}</DisplayString>
+ <DisplayString IncludeView="cpp">{((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)Value.Value.Data) & ~(uintptr_t)((1U << clang::TypeAlignmentInBits) - 1U)))->BaseType,view(cpp)}{*this,view(fastQuals)}</DisplayString>
+ <DisplayString IncludeView="left">{((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)Value.Value.Data) & ~(uintptr_t)((1U << clang::TypeAlignmentInBits) - 1U)))->BaseType,view(left)}{*this,view(fastQuals)}</DisplayString>
+ <DisplayString IncludeView="right">{((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)Value.Value.Data) & ~(uintptr_t)((1U << clang::TypeAlignmentInBits) - 1U)))->BaseType,view(right)}{*this,view(fastQuals)}</DisplayString>
+ <!-- For the Fast Qualifiers, it is simpler (and probably more efficient) just to list all 8 cases than create
+ views for each qualifier. TODO: Non-fast qualifiers -->
+ <DisplayString IncludeView="fastQuals" Condition="(((*(uintptr_t *)Value.Value.Data) >> 1) & 7)==0"></DisplayString>
+ <DisplayString IncludeView="fastQuals" Condition="(((*(uintptr_t *)Value.Value.Data) >> 1) & 7)==1">{" ",sb}const</DisplayString>
+ <DisplayString IncludeView="fastQuals" Condition="(((*(uintptr_t *)Value.Value.Data) >> 1) & 7)==2">{" ",sb}restrict</DisplayString>
+ <DisplayString IncludeView="fastQuals" Condition="(((*(uintptr_t *)Value.Value.Data) >> 1) & 7)==3">{" ",sb}const restrict</DisplayString>
+ <DisplayString IncludeView="fastQuals" Condition="(((*(uintptr_t *)Value.Value.Data) >> 1) & 7)==4">{" ",sb}volatile</DisplayString>
+ <DisplayString IncludeView="fastQuals" Condition="(((*(uintptr_t *)Value.Value.Data) >> 1) & 7)==5">{" ",sb}const volatile</DisplayString>
+ <DisplayString IncludeView="fastQuals" Condition="(((*(uintptr_t *)Value.Value.Data) >> 1) & 7)==6">{" ",sb}volatile restrict</DisplayString>
+ <DisplayString IncludeView="fastQuals" Condition="(((*(uintptr_t *)Value.Value.Data) >> 1) & 7)==7">{" ",sb}const volatile restrict</DisplayString>
+ <DisplayString IncludeView="fastQuals">Cannot visualize non-fast qualifiers</DisplayString>
+ <DisplayString Condition="(*(uintptr_t *)Value.Value.Data) == 0">Null</DisplayString>
+ <DisplayString>{((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)Value.Value.Data) & ~(uintptr_t)((1U << clang::TypeAlignmentInBits) - 1U)))->BaseType,na}{*this,view(fastQuals)}</DisplayString>
+ <Expand>
+ <Item Name="Fast Quals">*this,view(fastQuals)</Item>
+ <ExpandedItem>((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)Value.Value.Data) & ~(uintptr_t)((1U << clang::TypeAlignmentInBits) - 1U)))->BaseType</ExpandedItem>
+ </Expand>
+
+ </Type>
+ <Type Name="clang::LocInfoType">
+ <DisplayString IncludeView="cpp">{DeclInfo,view(cpp)na}</DisplayString>
+ <DisplayString>{DeclInfo,na}</DisplayString>
+ <Expand>
+ <Item Name="DeclInfo">DeclInfo</Item>
+ <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::TypeSourceInfo">
+ <DisplayString IncludeView="cpp">{Ty,view(cpp)}</DisplayString>
+ <DisplayString>{Ty}</DisplayString>
+ <Expand>
+ <ExpandedItem>Ty</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::TypeLoc">
+ <DisplayString>{(QualType *)&Ty,na}</DisplayString>
+ <Expand>
+ <Item Name="Ty">(QualType *)&Ty</Item>
+ <Item Name="Data">Data</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::TypeLocBuilder">
+ <DisplayString Optional="true" Condition="LastTy.Value.Value==0">Not building anything</DisplayString>
+ <DisplayString Optional="true">Building a {LastTy}</DisplayString>
+ </Type>
+ <Type Name="clang::TemplateArgumentLoc">
+ <DisplayString IncludeView="cpp">{Argument,view(cpp)}</DisplayString>
+ <DisplayString>{Argument}</DisplayString>
+ </Type>
+ <Type Name="clang::TemplateArgument">
+ <DisplayString IncludeView="cpp" Condition="Integer.Kind == clang::TemplateArgument::ArgKind::Type">{*(clang::QualType *)&TypeOrValue.V,view(cpp)}</DisplayString>
+ <DisplayString Condition="Integer.Kind == clang::TemplateArgument::ArgKind::Type">{(clang::TemplateArgument::ArgKind)TypeOrValue.Kind,en} template argument: {*(clang::QualType *)&TypeOrValue.V}</DisplayString>
+ <DisplayString IncludeView="arg0" Condition="Args.NumArgs==0"></DisplayString>
+ <DisplayString IncludeView="arg0">{Args.Args[0]}{*this,view(arg1)}</DisplayString>
+ <DisplayString IncludeView="arg1" Condition="Args.NumArgs==1"></DisplayString>
+ <DisplayString IncludeView="arg1">, {Args.Args[1]}{*this,view(arg2)}</DisplayString>
+ <DisplayString IncludeView="arg2" Condition="Args.NumArgs==2"></DisplayString>
+ <DisplayString IncludeView="arg2">, {Args.Args[2]}, ...</DisplayString>
+ <DisplayString IncludeView="arg0cpp" Condition="Args.NumArgs==0"></DisplayString>
+ <DisplayString IncludeView="arg0cpp">{Args.Args[0],view(cpp)}{*this,view(arg1cpp)}</DisplayString>
+ <DisplayString IncludeView="arg1cpp" Condition="Args.NumArgs==1"></DisplayString>
+ <DisplayString IncludeView="arg1cpp">, {Args.Args[1],view(cpp)}{*this,view(arg2cpp)}</DisplayString>
+ <DisplayString IncludeView="arg2cpp" Condition="Args.NumArgs==2"></DisplayString>
+ <DisplayString IncludeView="arg2cpp">, {Args.Args[2],view(cpp)}, ...</DisplayString>
+ <DisplayString IncludeView="cpp" Condition="Integer.Kind == clang::TemplateArgument::ArgKind::Pack">{*this,view(arg0cpp)}</DisplayString>
+ <DisplayString Condition="Integer.Kind == clang::TemplateArgument::ArgKind::Pack">{*this,view(arg0)}</DisplayString>
+ <DisplayString Condition="Integer.Kind == clang::TemplateArgument::ArgKind::Expression">{(clang::Expr *)TypeOrValue.V,view(cpp)na}</DisplayString>
+ <DisplayString>{(clang::TemplateArgument::ArgKind)TypeOrValue.Kind,en}</DisplayString>
+ <Expand>
+ <Item Name="QualType" Condition="Integer.Kind == clang::TemplateArgument::ArgKind::Type">*(clang::QualType *)&TypeOrValue.V</Item>
+ <Item Name="Expression" Condition="Integer.Kind == clang::TemplateArgument::ArgKind::Expression">(clang::Expr *)TypeOrValue.V</Item>
+ <ArrayItems Condition="Integer.Kind == clang::TemplateArgument::ArgKind::Pack">
+ <Size>Args.NumArgs</Size>
+ <ValuePointer>Args.Args</ValuePointer>
+ </ArrayItems>
+ <!-- TODO: Other kinds-->
+ </Expand>
+ </Type>
+ <Type Name="clang::TemplateArgumentListInfo">
+ <DisplayString IncludeView ="elt0" Condition="Arguments.Size == 0"></DisplayString>
+ <DisplayString IncludeView ="elt0">{((TemplateArgumentLoc*)Arguments.BeginX)[0],view(cpp)}{*this,view(elt1)}</DisplayString>
+ <DisplayString IncludeView ="elt1" Condition="Arguments.Size == 1"></DisplayString>
+ <DisplayString IncludeView ="elt1">, {((TemplateArgumentLoc*)Arguments.BeginX)[1],view(cpp)}{*this,view(elt2)}</DisplayString>
+ <DisplayString IncludeView ="elt2" Condition="Arguments.Size == 2"></DisplayString>
+ <DisplayString IncludeView ="elt2">, {((TemplateArgumentLoc*)Arguments.BeginX)[2],view(cpp)}{*this,view(elt3)}</DisplayString>
+ <DisplayString IncludeView ="elt3" Condition="Arguments.Size == 3"></DisplayString>
+ <DisplayString IncludeView ="elt3">, {((TemplateArgumentLoc*)Arguments.BeginX)[3],view(cpp)}{*this,view(elt4)}</DisplayString>
+ <DisplayString IncludeView ="elt4" Condition="Arguments.Size == 4"></DisplayString>
+ <DisplayString IncludeView ="elt4">, ...</DisplayString>
+ <DisplayString Condition="Arguments.Size == 0">empty</DisplayString>
+ <DisplayString Condition="Arguments.Size != 0"><{*this,view(elt0)}></DisplayString>
+ <DisplayString>Uninitialized</DisplayString>
+ </Type>
+ <Type Name="clang::TemplateArgumentList">
+ <DisplayString IncludeView="arg0" Condition="NumArguments==0"></DisplayString>
+ <DisplayString IncludeView="arg0">{Arguments[0],view(cpp)}{*this,view(arg1)}</DisplayString>
+ <DisplayString IncludeView="arg1" Condition="NumArguments==1"></DisplayString>
+ <DisplayString IncludeView="arg1">, {Arguments[1],view(cpp)}{*this,view(arg2)}</DisplayString>
+ <DisplayString IncludeView="arg2" Condition="NumArguments==2"></DisplayString>
+ <DisplayString IncludeView="arg2">, {Arguments[1],view(cpp)}, ...</DisplayString>
+ <DisplayString><{*this,view(arg0)}></DisplayString>
+ <Expand>
+ <Item Name="NumArguments">NumArguments</Item>
+ <ArrayItems>
+ <Size>NumArguments</Size>
+ <ValuePointer>Arguments</ValuePointer>
+ </ArrayItems>
+ </Expand>
+ </Type>
+ <Type Name="llvm::ArrayRef<clang::TemplateArgument>">
+ <DisplayString IncludeView="arg0" Condition="Length==0"></DisplayString>
+ <DisplayString IncludeView="arg0">{Data[0],view(cpp)}{*this,view(arg1)}</DisplayString>
+ <DisplayString IncludeView="arg1" Condition="Length==1"></DisplayString>
+ <DisplayString IncludeView="arg1">, {Data[1],view(cpp)}{*this,view(arg2)}</DisplayString>
+ <DisplayString IncludeView="arg2" Condition="Length==2"></DisplayString>
+ <DisplayString IncludeView="arg2">, {Data[2],view(cpp)}, ...</DisplayString>
+ <DisplayString><{*this,view(arg0)}></DisplayString>
+ <Expand>
+ <Item Name="Length">Length</Item>
+ <Synthetic Name="Data">
+ <Expand>
+ <ArrayItems>
+ <Size>Length</Size>
+ <ValuePointer>Data</ValuePointer>
+ </ArrayItems>
+ </Expand>
+ </Synthetic>
+ </Expand>
+ </Type>
+ <Type Name="clang::MultiLevelTemplateArgumentList">
+ <DisplayString IncludeView="level0" Condition="(llvm::ArrayRef<clang::TemplateArgument> *)TemplateArgumentLists.EndX - (llvm::ArrayRef<clang::TemplateArgument> *)TemplateArgumentLists.BeginX==0"></DisplayString>
+ <DisplayString IncludeView="level0">{((llvm::ArrayRef<clang::TemplateArgument> *)TemplateArgumentLists.BeginX)[0],view(cpp)}{*this,view(level1)}</DisplayString>
+ <DisplayString IncludeView="level1" Condition="(llvm::ArrayRef<clang::TemplateArgument> *)TemplateArgumentLists.EndX - (llvm::ArrayRef<clang::TemplateArgument> *)TemplateArgumentLists.BeginX==1"></DisplayString>
+ <DisplayString IncludeView="level1">::{((llvm::ArrayRef<clang::TemplateArgument> *)TemplateArgumentLists.BeginX)[1],view(cpp)}{*this,view(level2)}</DisplayString>
+ <DisplayString IncludeView="level2" Condition="(llvm::ArrayRef<clang::TemplateArgument> *)TemplateArgumentLists.EndX - (llvm::ArrayRef<clang::TemplateArgument> *)TemplateArgumentLists.BeginX==2"></DisplayString>
+ <DisplayString IncludeView="level2">::{((llvm::ArrayRef<clang::TemplateArgument> *)TemplateArgumentLists.BeginX)[2],view(cpp)}, ...</DisplayString>
+ <DisplayString>{*this,view(level0)}</DisplayString>
+ <Expand>
+ <Item Name="TemplateList">TemplateArgumentLists</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::ParsedTemplateArgument">
+ <DisplayString Condition="Kind==clang::ParsedTemplateArgument::Type" IncludeView="cpp">{(clang::QualType *)Arg,view(cpp)na}</DisplayString>
+ <DisplayString Condition="Kind==clang::ParsedTemplateArgument::Type">Type template argument: {*(clang::QualType *)Arg}</DisplayString>
+ <DisplayString Condition="Kind==clang::ParsedTemplateArgument::NonType">Non-type template argument: {*(clang::Expr *)Arg}</DisplayString>
+ <DisplayString Condition="Kind==clang::ParsedTemplateArgument::Template">Template template argument: {*(clang::TemplateName *)Arg</DisplayString>
+ <Expand>
+ <Item Name="Kind">Kind,en</Item>
+ <Item Name="Arg" Condition="Kind==clang::ParsedTemplateArgument::Type">(clang::QualType *)Arg</Item>
+ <Item Name="Arg" Condition="Kind==clang::ParsedTemplateArgument::NonType">(clang::Expr *)Arg</Item>
+ <Item Name="Arg" Condition="Kind==clang::ParsedTemplateArgument::Template">(clang::TemplateName *)Arg</Item>
+ </Expand>
+ </Type>
+ <!-- Builtin types that have C++ keywords are manually displayed as that keyword. Otherwise, just use the enum name -->
+ <Type Name="clang::BuiltinType">
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Void">void</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Bool">bool</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Char_U">char</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::UChar">unsigned char</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::WChar_U">wchar_t</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Char16">char16_t</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Char32">char32_t</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::UShort">unsigned short</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::UInt">unsigned int</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::ULong">unsigned long</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::ULongLong">unsigned long long</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::UInt128">__uint128_t</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Char_S">char</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::SChar">signed char</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::WChar_S">wchar_t</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Short">short</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Int">int</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Long">long</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::LongLong">long long</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Int128">__int128_t</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Half">__fp16</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Float">float</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::Double">double</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::LongDouble">long double</DisplayString>
+ <DisplayString Condition="BuiltinTypeBits.Kind==clang::BuiltinType::NullPtr">nullptr_t</DisplayString>
+ <DisplayString>{(clang::BuiltinType::Kind)BuiltinTypeBits.Kind, en}</DisplayString>
+ <Expand>
+ <Item Name="Kind">(clang::BuiltinType::Kind)BuiltinTypeBits.Kind</Item>
+ </Expand>
+ </Type>
+
+ <Type Name="clang::TemplateSpecializationType">
+ <DisplayString IncludeView="arg0" Condition="TemplateSpecializationTypeBits.NumArgs==0"></DisplayString>
+ <DisplayString IncludeView="arg0">{((clang::TemplateArgument *)(this+1))[0],view(cpp)}{*this,view(arg1)}</DisplayString>
+ <DisplayString IncludeView="arg1" Condition="TemplateSpecializationTypeBits.NumArgs==1"></DisplayString>
+ <DisplayString IncludeView="arg1">, {((clang::TemplateArgument *)(this+1))[1],view(cpp)}{*this,view(arg2)}</DisplayString>
+ <DisplayString IncludeView="arg2" Condition="TemplateSpecializationTypeBits.NumArgs==2"></DisplayString>
+ <DisplayString IncludeView="arg2">, {((clang::TemplateArgument *)(this+1))[2],view(cpp)}{*this,view(arg3)}</DisplayString>
+ <DisplayString Condition="(Template.Storage.Val.Value & 3) == 0">
+ {*((clang::TemplateDecl *)(Template.Storage.Val.Value))->TemplatedDecl,view(cpp)}<{*this,view(arg0)}>
+ </DisplayString>
+ <DisplayString>Can't visualize this TemplateSpecializationType</DisplayString>
+ <Expand>
+ <Item Name="Template">Template.Storage</Item>
+ <ArrayItems>
+ <Size>TemplateSpecializationTypeBits.NumArgs</Size>
+ <ValuePointer>(clang::TemplateArgument *)(this+1)</ValuePointer>
+ </ArrayItems>
+ <ExpandedItem>*(clang::Type *)this, view(cmn)</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::DeducedType">
+ <Expand>
+ <Item Name="isDeduced">(CanonicalType.Value.Value != this) || TypeBits.Dependent</Item>
+ <ExpandedItem>*(clang::Type *)this,view(cmn)</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::DeducedTemplateSpecializationType">
+ <DisplayString Condition="(CanonicalType.Value.Value != this) || TypeBits.Dependent">{CanonicalType,view(cpp)}</DisplayString>
+ <DisplayString IncludeView="cpp">{Template,view(cpp)}</DisplayString>
+ <DisplayString>{Template}</DisplayString>
+ <Expand>
+ <Item Name="Template">Template</Item>
+ <Item Name="Deduced As" Condition="(CanonicalType.Value.Value != this) || TypeBits.Dependent">CanonicalType,view(cpp)</Item>
+ <ExpandedItem>(clang::DeducedType *)this</ExpandedItem>
+ <Item Name="Template">Template</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::ClassTemplateSpecializationDecl">
+ <DisplayString>{*(CXXRecordDecl *)this,nd}{*TemplateArgs}</DisplayString>
+ <Expand>
+ <ExpandedItem>(CXXRecordDecl *)this,nd</ExpandedItem>
+ <Item Name="TemplateArgs">TemplateArgs</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::IdentifierInfo">
+ <DisplayString Condition="Entry != 0">{((llvm::StringMapEntry<clang::IdentifierInfo *>*)Entry)+1,sb}</DisplayString>
+ <Expand>
+ <Item Condition="Entry != 0" Name="[Identifier]">((llvm::StringMapEntry<clang::IdentifierInfo *>*)Entry)+1,s</Item>
+ <Item Name="Token Kind">(clang::tok::TokenKind)TokenID</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::DeclarationName">
+ <DisplayString Condition="Ptr == 0" IncludeView="cpp"></DisplayString>
+ <DisplayString Condition="Ptr == 0">Empty</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredIdentifier" IncludeView="cpp">{*(clang::IdentifierInfo *)(Ptr & ~PtrMask)}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredIdentifier">{{Identifier ({*(clang::IdentifierInfo *)(Ptr & ~PtrMask)})}}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredObjCZeroArgSelector">{{ObjC Zero Arg Selector (*{(clang::IdentifierInfo *)(Ptr & ~PtrMask)})}}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredObjCOneArgSelector">{{ObjC One Arg Selector (*{(clang::IdentifierInfo *)(Ptr & ~PtrMask)})}}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredCXXConstructorName" IncludeView="cpp">{(clang::detail::CXXSpecialNameExtra *)(Ptr & ~PtrMask),view(cpp)na}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredCXXConstructorName">C++ Constructor {{{(clang::detail::CXXSpecialNameExtra *)(Ptr & ~PtrMask),view(cpp)na}}}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredCXXDestructorName">C++ Destructor {{*(clang::detail::CXXSpecialNameExtra *)(Ptr & ~PtrMask)}}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredCXXConversionFunctionName">C++ Conversion function {{*(clang::detail::CXXSpecialNameExtra *)(Ptr & ~PtrMask)}}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredCXXOperatorName">C++ Operator {{*(clang::detail::CXXOperatorIdName *)(Ptr & ~PtrMask)}}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredDeclarationNameExtra"
+ IncludeView="cpp">{*(clang::detail::DeclarationNameExtra *)(Ptr & ~PtrMask),view(cpp)}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredDeclarationNameExtra">{{Extra ({*(clang::detail::DeclarationNameExtra *)(Ptr & ~PtrMask)})}}</DisplayString>
+ <Expand>
+ <Item Name="Kind">StoredNameKind(Ptr & PtrMask),en</Item>
+ <Item Condition="(Ptr & PtrMask) == StoredIdentifier" Name="[Identifier]">*(clang::IdentifierInfo *)(Ptr & ~PtrMask),na</Item>
+ <Item Condition="(Ptr & PtrMask) == StoredObjCZeroArgSelector" Name="[ObjC Zero Arg Selector]">*(clang::IdentifierInfo *)(Ptr & ~PtrMask),na</Item>
+ <Item Condition="(Ptr & PtrMask) == StoredObjCOneArgSelector" Name="[ObjC One Arg Selector]">*(clang::IdentifierInfo *)(Ptr & ~PtrMask),na</Item>
+ <Item Condition="(Ptr & PtrMask) == StoredCXXConstructorName" Name="[C++ Constructor]">*(clang::detail::CXXSpecialNameExtra *)(Ptr & ~PtrMask),na</Item>
+ <Item Condition="(Ptr & PtrMask) == StoredCXXDestructorName" Name="[C++ Destructor]">*(clang::detail::CXXSpecialNameExtra *)(Ptr & ~PtrMask),na</Item>
+ <Item Condition="(Ptr & PtrMask) == StoredCXXConversionFunctionName" Name="[C++ Conversion function]">*(clang::detail::CXXSpecialNameExtra *)(Ptr & ~PtrMask),na</Item>
+ <Item Condition="(Ptr & PtrMask) == StoredCXXOperatorName" Name="[C++ Operator]">*(clang::detail::CXXOperatorIdName *)(Ptr & ~PtrMask),na</Item>
+ <Item Condition="(Ptr & PtrMask) == StoredDeclarationNameExtra" Name="[Extra]">(clang::detail::DeclarationNameExtra *)(Ptr & ~PtrMask),na</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::detail::DeclarationNameExtra">
+ <DisplayString Condition="ExtraKindOrNumArgs == CXXDeductionGuideName" IncludeView="cpp">
+ {(CXXDeductionGuideNameExtra *)this,view(cpp)nand}
+ </DisplayString>
+ <DisplayString Condition="ExtraKindOrNumArgs == CXXDeductionGuideName">
+ {(CXXDeductionGuideNameExtra *)this,nand}
+ </DisplayString>
+ <DisplayString Condition="ExtraKindOrNumArgs == CXXLiteralOperatorName">C++ Literal operator</DisplayString>
+ <DisplayString Condition="ExtraKindOrNumArgs == CXXUsingDirective">C++ Using directive</DisplayString>
+ <DisplayString Condition="ExtraKindOrNumArgs == ObjCMultiArgSelector">Objective-C MultiArg selector</DisplayString>
+ <DisplayString>{(clang::detail::DeclarationNameExtra::ExtraKind)ExtraKindOrNumArgs,en}{" ",sb}{*this,view(cpp)}</DisplayString>
+ <Expand>
+ <ExpandedItem Condition="ExtraKindOrNumArgs == CXXDeductionGuideName">(CXXDeductionGuideNameExtra *)this</ExpandedItem>
+ <Item Name="ExtraKindOrNumArgs" Condition="ExtraKindOrNumArgs != CXXDeductionGuideName">ExtraKindOrNumArgs</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::detail::CXXDeductionGuideNameExtra">
+ <DisplayString IncludeView="cpp">{Template->TemplatedDecl,view(cpp)}</DisplayString>
+ <DisplayString>C++ Deduction guide for {Template->TemplatedDecl,view(cpp)na}</DisplayString>
+ </Type>
+ <Type Name="clang::detail::CXXSpecialNameExtra">
+ <DisplayString IncludeView="cpp">{Type,view(cpp)}</DisplayString>
+ <DisplayString>{Type}</DisplayString>
+ </Type>
+ <Type Name="clang::DeclarationNameInfo">
+ <DisplayString>{Name}</DisplayString>
+ </Type>
+ <Type Name="clang::TemplateIdAnnotation">
+ <DisplayString IncludeView="arg0" Condition="NumArgs==0"></DisplayString>
+ <DisplayString IncludeView="arg0">{(ParsedTemplateArgument *)(this+1),view(cpp)na}{this,view(arg1)na}</DisplayString>
+ <DisplayString IncludeView="arg1" Condition="NumArgs==1"></DisplayString>
+ <DisplayString IncludeView="arg1">, {((ParsedTemplateArgument *)(this+1))+1,view(cpp)na}{this,view(arg2)na}</DisplayString>
+ <DisplayString IncludeView="arg2" Condition="NumArgs==2"></DisplayString>
+ <DisplayString IncludeView="arg1">, ...</DisplayString>
+ <DisplayString>{Name,na}<{this,view(arg0)na}></DisplayString>
+ <Expand>
+ <Item Name="Name">Name</Item>
+ <Synthetic Name="Arguments">
+ <DisplayString>{this,view(arg0)na}</DisplayString>
+ <Expand>
+ <ArrayItems>
+ <Size>NumArgs</Size>
+ <ValuePointer>(ParsedTemplateArgument *)(this+1)</ValuePointer>
+ </ArrayItems>
+ </Expand>
+ </Synthetic>
+ <Item Name="Operator">Operator</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::Token">
+ <DisplayString Condition="Kind == clang::tok::annot_template_id">{{annot_template_id ({(clang::TemplateIdAnnotation *)(PtrData),na})}}</DisplayString>
+ <DisplayString Condition="Kind == clang::tok::identifier">{{Identifier ({(clang::IdentifierInfo *)(PtrData),na})}}</DisplayString>
+ <DisplayString>{(clang::tok::TokenKind)Kind,en}</DisplayString>
+ </Type>
+ <Type Name="clang::Lexer">
+ <DisplayString>{BufferPtr,nasb}</DisplayString>
+ </Type>
+ <Type Name="clang::Preprocessor::IncludeStackInfo">
+ <DisplayString Condition="TheLexer._Mypair._Myval2 != 0">{TheLexer._Mypair._Myval2,na}</DisplayString>
+ <DisplayString Condition="TheTokenLexer._Mypair._Myval2 != 0">Expanding Macro: {TheTokenLexer._Mypair._Myval2,na}</DisplayString>
+ <DisplayString></DisplayString>
+ </Type>
+ <Type Name="clang::Preprocessor">
+ <DisplayString IncludeView="cached" Condition="CachedLexPos < CachedTokens.Size">
+ [{(Token *)(CachedTokens.BeginX) + CachedLexPos,na}] {IncludeMacroStack._Mypair._Myval2._Mylast - 1,na}
+ </DisplayString>
+ <DisplayString IncludeView="cached"> {IncludeMacroStack._Mypair._Myval2._Mylast - 1,na}</DisplayString>
+ <DisplayString Condition="CurLexer._Mypair._Myval2 != 0">{CurLexer._Mypair._Myval2,na}</DisplayString>
+ <DisplayString Condition="CurTokenLexer._Mypair._Myval2 != 0">Expanding Macro: {CurTokenLexer._Mypair._Myval2,na}</DisplayString>
+ <!-- Can't use CurLexerCallback because natvis sees the type rather than the variable -->
+ <DisplayString Condition="IncludeMacroStack._Mypair._Myval2._Mylast - IncludeMacroStack._Mypair._Myval2._Myfirst">
+ {this,view(cached)}
+ </DisplayString>
+ <DisplayString>CLK_LexAfterModuleImport</DisplayString>
+ </Type>
+ <Type Name="clang::Parser">
+ <DisplayString>[{Tok}] {PP,na}</DisplayString>
+ </Type>
+ <Type Name="clang::LambdaIntroducer::LambdaCapture">
+ <DisplayString Condition="Kind == LCK_This">this</DisplayString>
+ <DisplayString Condition="Kind == LCK_StarThis">*this</DisplayString>
+ <DisplayString Condition="Kind == LCK_ByCopy">{Id}</DisplayString>
+ <DisplayString Condition="Kind == LCK_ByRef">&{Id}</DisplayString>
+ <DisplayString>No visualizer for {Kind}</DisplayString>
+ </Type>
+ <Type Name="clang::LambdaIntroducer">
+ <DisplayString IncludeView="default" Condition="Default==LCD_None"></DisplayString>
+ <DisplayString IncludeView="default" Condition="Default==LCD_ByCopy">=,</DisplayString>
+ <DisplayString IncludeView="default" Condition="Default==LCD_ByRef">&,</DisplayString>
+ <DisplayString IncludeView="capture0" Condition="Captures.Size==0"></DisplayString>
+ <DisplayString IncludeView="capture0">{(LambdaCapture *)(Captures.BeginX),na}{this,view(capture1)na}</DisplayString>
+ <DisplayString IncludeView="capture1" Condition="Captures.Size==1"></DisplayString>
+ <DisplayString IncludeView="capture1">,{(LambdaCapture *)(Captures.BeginX)+1,na}{this,view(capture2)na}</DisplayString>
+ <DisplayString IncludeView="capture2" Condition="Captures.Size==2"></DisplayString>
+ <DisplayString IncludeView="capture2">,{(LambdaCapture *)(Captures.BeginX)+2,na}{this,view(capture3)na}</DisplayString>
+ <DisplayString IncludeView="capture3" Condition="Captures.Size==3"></DisplayString>
+ <DisplayString IncludeView="capture3">,...</DisplayString>
+ <DisplayString>[{this,view(default)na}{this,view(capture0)na}]</DisplayString>
+ </Type>
+ <Type Name="clang::DeclSpec">
+ <DisplayString IncludeView="extra" Condition="TypeSpecType == TST_typename || TypeSpecType == TST_typeofType || TypeSpecType == TST_underlying_type || TypeSpecType == TST_atomic">
+ , [{TypeRep}]
+ </DisplayString>
+ <DisplayString IncludeView="extra" Condition="TypeSpecType == TST_typeofExpr || TypeSpecType == TST_decltype">
+ , [{ExprRep}]
+ </DisplayString>
+ <DisplayString IncludeView="extra" Condition="TypeSpecType == TST_enum || TypeSpecType == TST_struct || TypeSpecType == TST_interface || TypeSpecType == TST_union || TypeSpecType == TST_class">
+ , [{DeclRep}]
+ </DisplayString>
+ <DisplayString IncludeView="extra"></DisplayString>
+ <DisplayString>[{(clang::DeclSpec::SCS)StorageClassSpec,en}], [{(clang::TypeSpecifierType)TypeSpecType,en}]{this,view(extra)na}</DisplayString>
+ <Expand>
+ <Item Name="StorageClassSpec">(clang::DeclSpec::SCS)StorageClassSpec</Item>
+ <Item Name="TypeSpecType">(clang::TypeSpecifierType)TypeSpecType</Item>
+ <Item Name="TypeRep" Condition="TypeSpecType == TST_typename || TypeSpecType == TST_typeofType || TypeSpecType == TST_underlying_type || TypeSpecType == TST_atomic">
+ TypeRep
+ </Item>
+ <Item Name="ExprRep" Condition="TypeSpecType == TST_typeofExpr || TypeSpecType == TST_decltype">
+ ExprRep
+ </Item>
+ <Item Name="DeclRep" Condition="TypeSpecType == TST_enum || TypeSpecType == TST_struct || TypeSpecType == TST_interface || TypeSpecType == TST_union || TypeSpecType == TST_class">
+ DeclRep
+ </Item>
+
+ </Expand>
+ </Type>
+ <Type Name="clang::PragmaHandler">
+ <DisplayString>{Name,s}</DisplayString>
+ </Type>
+ <Type Name="clang::FileEntry">
+ <DisplayString>{RealPathName,s}</DisplayString>
+ </Type>
+ <Type Name="clang::DirectoryEntry">
+ <DisplayString>{Name,s}</DisplayString>
+ </Type>
+ <Type Name="clang::VarDecl::VarDeclBitfields">
+ <Expand>
+ <Item Name="StorageClass">(clang::StorageClass)SClass</Item>
+ <Item Name="ThreadStorageClass">(clang::ThreadStorageClassSpecifier)TSCSpec</Item>
+ <Item Name="InitStyle">(clang::VarDecl::InitializationStyle)InitStyle</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::DeclaratorDecl">
+ <DisplayString>{DeclType,view(left)} {Name,view(cpp)}{DeclType,view(right)}</DisplayString>
+ <Expand>
+ <Item Name="Name">Name</Item>
+ <Item Name="DeclType">DeclType</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::VarDecl">
+ <DisplayString>{(DeclaratorDecl*)this,nand}</DisplayString>
+ <Expand>
+ <ExpandedItem>(DeclaratorDecl*)this,nd</ExpandedItem>
+ <Item Name="Init">Init</Item>
+ <Item Name="VarDeclBits">VarDeclBits</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::ParmVarDecl">
+ <DisplayString>{*(VarDecl*)this,nd}</DisplayString>
+ <Expand>
+ <Item Name="ParmVarDeclBits">ParmVarDeclBits</Item>
+ <ExpandedItem>*(VarDecl*)this,nd</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::ExplicitSpecifier">
+ <DisplayString Condition="((*(uintptr_t *)ExplicitSpec.Value.Data>>1)&3) == ExplicitSpecKind::ResolvedTrue" IncludeView="cpp">{"explicit ",sb}</DisplayString>
+ <DisplayString Condition="((*(uintptr_t *)ExplicitSpec.Value.Data>>1)&3) == ExplicitSpecKind::ResolvedFalse" IncludeView="cpp"></DisplayString>
+ <DisplayString Condition="((*(uintptr_t *)ExplicitSpec.Value.Data>>1)&3) == ExplicitSpecKind::Unresolved" IncludeView="cpp">explicit({ExplicitSpec,view(ptr)na})</DisplayString>
+ <DisplayString Condition="((*(uintptr_t *)ExplicitSpec.Value.Data)&~7) == 0">{ExplicitSpec,view(int)en}</DisplayString>
+ <DisplayString>{ExplicitSpec,view(int)en} : {ExplicitSpec,view(ptr)na}</DisplayString>
+ </Type>
+ <Type Name="clang::CXXDeductionGuideDecl">
+ <DisplayString>{ExplicitSpec,view(cpp)}{Name,view(cpp)nd}({(FunctionDecl*)this,view(parm0)nand}) -> {((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)(((uintptr_t)DeclType.Value.Value) & ~15))->BaseType)->ResultType,view(cpp)}</DisplayString>
+ <Expand>
+ <Item Name="ExplicitSpec">ExplicitSpec</Item>
+ <Item Name="IsCopyDeductionCandidate">(bool)FunctionDeclBits.IsCopyDeductionCandidate</Item>
+ <ExpandedItem>(FunctionDecl*)this,nd</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::FunctionDecl">
+ <DisplayString IncludeView="retType">{((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->ResultType,view(cpp)}</DisplayString>
+ <DisplayString IncludeView="parm0" Condition="0 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->FunctionTypeBits.NumParams"></DisplayString>
+ <DisplayString IncludeView="parm0">{ParamInfo[0],na}{*this,view(parm1)nd}</DisplayString>
+ <DisplayString IncludeView="parm1" Condition="1 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->FunctionTypeBits.NumParams"></DisplayString>
+ <DisplayString IncludeView="parm1">, {ParamInfo[1],na}{*this,view(parm2)nd}</DisplayString>
+ <DisplayString IncludeView="parm2" Condition="2 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->FunctionTypeBits.NumParams"></DisplayString>
+ <DisplayString IncludeView="parm2">, {ParamInfo[2],na}{*this,view(parm3)nd}</DisplayString>
+ <DisplayString IncludeView="parm3" Condition="3 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->FunctionTypeBits.NumParams"></DisplayString>
+ <DisplayString IncludeView="parm3">, {ParamInfo[3],na}{*this,view(parm4)nd}</DisplayString>
+ <DisplayString IncludeView="parm4" Condition="4 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->FunctionTypeBits.NumParams"></DisplayString>
+ <DisplayString IncludeView="parm4">, {ParamInfo[4],na}{*this,view(parm5)nd}</DisplayString>
+ <DisplayString IncludeView="parm5" Condition="5 == ((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->FunctionTypeBits.NumParams"></DisplayString>
+ <DisplayString IncludeView="parm5">, /* expand for more params */</DisplayString>
+ <DisplayString Condition="((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->FunctionTypeBits.HasTrailingReturn">
+ auto {Name,view(cpp)nd}({*this,view(parm0)nd}) -> {((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->ResultType,view(cpp)}
+ </DisplayString>
+ <DisplayString>{this,view(retType)nand} {Name,view(cpp)nd}({*this,view(parm0)nd})</DisplayString>
+ <Expand>
+ <ExpandedItem>(clang::DeclaratorDecl *)this,nd</ExpandedItem>
+ <Item Name="ReturnType">((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->ResultType</Item>
+ <Synthetic Name="Parameter Types">
+ <DisplayString>{*this,view(parm0)nd}</DisplayString>
+ <Expand>
+ <ArrayItems>
+ <Size>((clang::FunctionProtoType *)((clang::ExtQualsTypeCommonBase *)((*(uintptr_t *)DeclType.Value.Value.Data) & ~15))->BaseType)->FunctionTypeBits.NumParams</Size>
+ <ValuePointer>ParamInfo</ValuePointer>
+ </ArrayItems>
+ </Expand>
+ </Synthetic>
+ <Item Name="TemplateOrSpecialization">TemplateOrSpecialization</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::OpaquePtr<*>">
+ <DisplayString>{*($T1*)&Ptr}</DisplayString>
+ <Expand>
+ <ExpandedItem>($T1*)&Ptr</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::UnionOpaquePtr<*>">
+ <DisplayString>{($T1 *)Ptr}</DisplayString>
+ <Expand>
+ <ExpandedItem>($T1 *)Ptr</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::TemplateParameterList">
+ <DisplayString IncludeView="parm0" Condition="NumParams==0"></DisplayString>
+ <DisplayString IncludeView="parm0">{*((NamedDecl **)(this+1))[0],view(cpp)}{*this,view(parm1)}</DisplayString>
+ <DisplayString IncludeView="parm1" Condition="NumParams==1"></DisplayString>
+ <DisplayString IncludeView="parm1">, {*((NamedDecl **)(this+1))[1],view(cpp)}{*this,view(parm2)}</DisplayString>
+ <DisplayString IncludeView="parm2" Condition="NumParams==2"></DisplayString>
+ <DisplayString IncludeView="parm2">, {*((NamedDecl **)(this+1))[2],view(cpp)}{*this,view(parm3)}</DisplayString>
+ <DisplayString IncludeView="parm3" Condition="NumParams==3"></DisplayString>
+ <DisplayString IncludeView="parm3">, {*((NamedDecl **)(this+1))[3],view(cpp)}{*this,view(parm4)}</DisplayString>
+ <DisplayString IncludeView="parm4" Condition="NumParams==4"></DisplayString>
+ <DisplayString IncludeView="parm4">, {*((NamedDecl **)(this+1))[4],view(cpp)}{*this,view(parm5)}</DisplayString>
+ <DisplayString IncludeView="parm5" Condition="NumParams==5"></DisplayString>
+ <DisplayString IncludeView="parm5">, /* Expand for more params */</DisplayString>
+ <DisplayString><{*this,view(parm0)}></DisplayString>
+ <Expand>
+ <ArrayItems>
+ <Size>NumParams</Size>
+ <ValuePointer>(NamedDecl **)(this+1)</ValuePointer>
+ </ArrayItems>
+ </Expand>
+ </Type>
+ <Type Name="clang::Stmt">
+ <DisplayString>{(clang::Stmt::StmtClass)StmtBits.sClass,en}</DisplayString>
+ <Expand>
+ <Item Name="Class">(clang::Stmt::StmtClass)StmtBits.sClass,en</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::Expr">
+ <DisplayString Condition="StmtBits.sClass==clang::Stmt::StmtClass::StringLiteralClass" IncludeView="poly">{*(clang::StringLiteral *)this}</DisplayString>
+ <DisplayString>Expression of class {(clang::Stmt::StmtClass)StmtBits.sClass,en} and type {TR,view(cpp)}</DisplayString>
+ </Type>
+ <Type Name="clang::StringLiteral">
+ <Expand>
+ <Item Name="Length">*(unsigned *)(((clang::StringLiteral *)this)+1)</Item>
+ <Item Name="Data" Condition="StringLiteralBits.NumConcatenated==1">(const char *)(((clang::StringLiteral *)this)+1)+4+4,[*(unsigned *)(((clang::StringLiteral *)this)+1)]s8</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::DeclAccessPair">
+ <DisplayString IncludeView="access" Condition="(Ptr&Mask) == clang::AS_public">public</DisplayString>
+ <DisplayString IncludeView="access" Condition="(Ptr&Mask) == clang::AS_protected">protected</DisplayString>
+ <DisplayString IncludeView="access" Condition="(Ptr&Mask) == clang::AS_private">private</DisplayString>
+ <DisplayString IncludeView="access" Condition="(Ptr&Mask) == clang::AS_none"></DisplayString>
+ <DisplayString IncludeView="decl">{*(clang::NamedDecl *)(Ptr&~Mask)}</DisplayString>
+ <DisplayString>{*this,view(access)} {*this,view(decl)}</DisplayString>
+ <Expand>
+ <Item Name="access">(clang::AccessSpecifier)(Ptr&Mask),en</Item>
+ <Item Name="decl">*(clang::NamedDecl *)(Ptr&~Mask)</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::UnqualifiedId">
+ <DisplayString Condition="Kind==UnqualifiedIdKind::IK_Identifier">[IK_Identifier] {*Identifier}</DisplayString>
+ <DisplayString Condition="Kind==UnqualifiedIdKind::IK_OperatorFunctionId">[IK_OperatorFunctionId] {OperatorFunctionId}</DisplayString>
+ <DisplayString Condition="Kind==UnqualifiedIdKind::IK_ConversionFunctionId">[IK_ConversionFunctionId] {ConversionFunctionId}</DisplayString>
+ <DisplayString Condition="Kind==UnqualifiedIdKind::IK_ConstructorName">[IK_ConstructorName] {ConstructorName}</DisplayString>
+ <DisplayString Condition="Kind==UnqualifiedIdKind::IK_DestructorName">[IK_DestructorName] {DestructorName}</DisplayString>
+ <DisplayString Condition="Kind==UnqualifiedIdKind::IK_DeductionGuideName">[IK_DeductionGuideName] {TemplateName}</DisplayString>
+ <DisplayString Condition="Kind==UnqualifiedIdKind::IK_TemplateId">[IK_TemplateId] {TemplateId}</DisplayString>
+ <DisplayString Condition="Kind==UnqualifiedIdKind::IK_ConstructorTemplateId">[IK_ConstructorTemplateId] {TemplateId}</DisplayString>
+ <DisplayString>Kind</DisplayString>
+ <Expand>
+ <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_Identifier">Identifier</ExpandedItem>
+ <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_OperatorFunctionId">OperatorFunctionId</ExpandedItem>
+ <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_ConversionFunctionId">ConversionFunctionId</ExpandedItem>
+ <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_ConstructorName">ConstructorName</ExpandedItem>
+ <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_DestructorName">DestructorName</ExpandedItem>
+ <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_DeductionGuideName">TemplateName</ExpandedItem>
+ <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_TemplateId">TemplateId</ExpandedItem>
+ <ExpandedItem Condition="Kind==UnqualifiedIdKind::IK_ConstructorTemplateId">TemplateId</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::DeclGroup">
+ <DisplayString>NumDecls={NumDecls}</DisplayString>
+ <Expand>
+ <ArrayItems>
+ <Size>NumDecls</Size>
+ <ValuePointer>(Decl **)(this+1)</ValuePointer>
+ </ArrayItems>
+ </Expand>
+ </Type>
+ <Type Name="clang::DeclGroupRef">
+ <DisplayString Condition="(Kind)((uintptr_t)D&1)==SingleDeclKind">{*D}</DisplayString>
+ <DisplayString>{*(DeclGroup *)((uintptr_t)D&~1)}</DisplayString>
+ <Expand>
+ <ExpandedItem Condition="(Kind)((uintptr_t)D&1)==SingleDeclKind">D</ExpandedItem>
+ <ExpandedItem Condition="(Kind)((uintptr_t)D&1)==DeclGroupKind">(DeclGroup *)((uintptr_t)D&~1)</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::Declarator">
+ <DisplayString>{DS} {Name}</DisplayString>
+ </Type>
+ <Type Name="clang::UnresolvedSet<*>">
+ <DisplayString>{Decls}</DisplayString>
+ <Expand>
+ <ExpandedItem>Decls</ExpandedItem>
+ </Expand>
+ </Type>
+ <Type Name="clang::LookupResult">
+ <DisplayString Condition="ResultKind == clang::LookupResult::Ambiguous">{Ambiguity,en}: {Decls}</DisplayString>
+ <DisplayString>{ResultKind,en}: {Decls}</DisplayString>
+ </Type>
+ <Type Name="clang::ActionResult<*, 0>">
+ <DisplayString Condition="Invalid">Invalid</DisplayString>
+ <DisplayString Condition="!*(void **)&Val">Unset</DisplayString>
+ <DisplayString>{Val}</DisplayString>
+ </Type>
+ <Type Name="clang::ActionResult<*, 1>">
+ <DisplayString Condition="Value&1">Invalid</DisplayString>
+ <DisplayString Condition="Value==0">Unset</DisplayString>
+ <DisplayString>{($T1)(Value&~1)}</DisplayString>
+ <Expand>
+ <Item Name="Invalid">(bool)(Value&1)</Item>
+ <Item Name="Val">($T1)(Value&~1)</Item>
+ </Expand>
+ </Type>
+</AutoVisualizer>
diff --git a/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cpp b/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cpp
index 6f342de04d479b..5b54c68161101a 100644
--- a/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cpp
+++ b/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cpp
@@ -1,22 +1,22 @@
-// RUN: %clang_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clang_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clang_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clang_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// When built as C on Linux, strndup is transformed to __strndup.
-// RUN: %clang_asan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// Unwind problem on arm: "main" is missing from the allocation stack trace.
+// RUN: %clang_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
+// RUN: %clang_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
+// RUN: %clang_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
+// RUN: %clang_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
+
+// When built as C on Linux, strndup is transformed to __strndup.
+// RUN: %clang_asan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck %s
+
+// Unwind problem on arm: "main" is missing from the allocation stack trace.
// UNSUPPORTED: target={{.*windows-msvc.*}},target=s390{{.*}},target=arm{{.*}} && !fast-unwinder-works
-
-#include <string.h>
-
-char kChars[] = { 'f', 'o', 'o' };
-
-int main(int argc, char **argv) {
- char *copy = strndup(kChars, 3);
- copy = strndup(kChars, 10);
- // CHECK: AddressSanitizer: global-buffer-overflow
- // CHECK: {{.*}}main {{.*}}.cpp:[[@LINE-2]]
- return *copy;
-}
+
+#include <string.h>
+
+char kChars[] = { 'f', 'o', 'o' };
+
+int main(int argc, char **argv) {
+ char *copy = strndup(kChars, 3);
+ copy = strndup(kChars, 10);
+ // CHECK: AddressSanitizer: global-buffer-overflow
+ // CHECK: {{.*}}main {{.*}}.cpp:[[@LINE-2]]
+ return *copy;
+}
diff --git a/flang/test/Driver/msvc-dependent-lib-flags.f90 b/flang/test/Driver/msvc-dependent-lib-flags.f90
index 765917f07d8e72..1b7ecb604ad67d 100644
--- a/flang/test/Driver/msvc-dependent-lib-flags.f90
+++ b/flang/test/Driver/msvc-dependent-lib-flags.f90
@@ -1,36 +1,36 @@
-! RUN: %flang -### --target=aarch64-windows-msvc -resource-dir=%S/Inputs/resource_dir %S/Inputs/hello.f90 -v 2>&1 | FileCheck %s --check-prefixes=MSVC
-! RUN: %flang -### --target=aarch64-windows-msvc -resource-dir=%S/Inputs/resource_dir -fms-runtime-lib=static_dbg %S/Inputs/hello.f90 -v 2>&1 | FileCheck %s --check-prefixes=MSVC-DEBUG
-! RUN: %flang -### --target=aarch64-windows-msvc -resource-dir=%S/Inputs/resource_dir -fms-runtime-lib=dll %S/Inputs/hello.f90 -v 2>&1 | FileCheck %s --check-prefixes=MSVC-DLL
-! RUN: %flang -### --target=aarch64-windows-msvc -resource-dir=%S/Inputs/resource_dir -fms-runtime-lib=dll_dbg %S/Inputs/hello.f90 -v 2>&1 | FileCheck %s --check-prefixes=MSVC-DLL-DEBUG
-
-! MSVC: -fc1
-! MSVC-SAME: --dependent-lib=clang_rt.builtins.lib
-! MSVC-SAME: -D_MT
-! MSVC-SAME: --dependent-lib=libcmt
-! MSVC-SAME: --dependent-lib=FortranRuntime.static.lib
-! MSVC-SAME: --dependent-lib=FortranDecimal.static.lib
-
-! MSVC-DEBUG: -fc1
-! MSVC-DEBUG-SAME: --dependent-lib=clang_rt.builtins.lib
-! MSVC-DEBUG-SAME: -D_MT
-! MSVC-DEBUG-SAME: -D_DEBUG
-! MSVC-DEBUG-SAME: --dependent-lib=libcmtd
-! MSVC-DEBUG-SAME: --dependent-lib=FortranRuntime.static_dbg.lib
-! MSVC-DEBUG-SAME: --dependent-lib=FortranDecimal.static_dbg.lib
-
-! MSVC-DLL: -fc1
-! MSVC-DLL-SAME: --dependent-lib=clang_rt.builtins.lib
-! MSVC-DLL-SAME: -D_MT
-! MSVC-DLL-SAME: -D_DLL
-! MSVC-DLL-SAME: --dependent-lib=msvcrt
-! MSVC-DLL-SAME: --dependent-lib=FortranRuntime.dynamic.lib
-! MSVC-DLL-SAME: --dependent-lib=FortranDecimal.dynamic.lib
-
-! MSVC-DLL-DEBUG: -fc1
-! MSVC-DLL-DEBUG-SAME: --dependent-lib=clang_rt.builtins.lib
-! MSVC-DLL-DEBUG-SAME: -D_MT
-! MSVC-DLL-DEBUG-SAME: -D_DEBUG
-! MSVC-DLL-DEBUG-SAME: -D_DLL
-! MSVC-DLL-DEBUG-SAME: --dependent-lib=msvcrtd
-! MSVC-DLL-DEBUG-SAME: --dependent-lib=FortranRuntime.dynamic_dbg.lib
-! MSVC-DLL-DEBUG-SAME: --dependent-lib=FortranDecimal.dynamic_dbg.lib
+! RUN: %flang -### --target=aarch64-windows-msvc -resource-dir=%S/Inputs/resource_dir %S/Inputs/hello.f90 -v 2>&1 | FileCheck %s --check-prefixes=MSVC
+! RUN: %flang -### --target=aarch64-windows-msvc -resource-dir=%S/Inputs/resource_dir -fms-runtime-lib=static_dbg %S/Inputs/hello.f90 -v 2>&1 | FileCheck %s --check-prefixes=MSVC-DEBUG
+! RUN: %flang -### --target=aarch64-windows-msvc -resource-dir=%S/Inputs/resource_dir -fms-runtime-lib=dll %S/Inputs/hello.f90 -v 2>&1 | FileCheck %s --check-prefixes=MSVC-DLL
+! RUN: %flang -### --target=aarch64-windows-msvc -resource-dir=%S/Inputs/resource_dir -fms-runtime-lib=dll_dbg %S/Inputs/hello.f90 -v 2>&1 | FileCheck %s --check-prefixes=MSVC-DLL-DEBUG
+
+! MSVC: -fc1
+! MSVC-SAME: --dependent-lib=clang_rt.builtins.lib
+! MSVC-SAME: -D_MT
+! MSVC-SAME: --dependent-lib=libcmt
+! MSVC-SAME: --dependent-lib=FortranRuntime.static.lib
+! MSVC-SAME: --dependent-lib=FortranDecimal.static.lib
+
+! MSVC-DEBUG: -fc1
+! MSVC-DEBUG-SAME: --dependent-lib=clang_rt.builtins.lib
+! MSVC-DEBUG-SAME: -D_MT
+! MSVC-DEBUG-SAME: -D_DEBUG
+! MSVC-DEBUG-SAME: --dependent-lib=libcmtd
+! MSVC-DEBUG-SAME: --dependent-lib=FortranRuntime.static_dbg.lib
+! MSVC-DEBUG-SAME: --dependent-lib=FortranDecimal.static_dbg.lib
+
+! MSVC-DLL: -fc1
+! MSVC-DLL-SAME: --dependent-lib=clang_rt.builtins.lib
+! MSVC-DLL-SAME: -D_MT
+! MSVC-DLL-SAME: -D_DLL
+! MSVC-DLL-SAME: --dependent-lib=msvcrt
+! MSVC-DLL-SAME: --dependent-lib=FortranRuntime.dynamic.lib
+! MSVC-DLL-SAME: --dependent-lib=FortranDecimal.dynamic.lib
+
+! MSVC-DLL-DEBUG: -fc1
+! MSVC-DLL-DEBUG-SAME: --dependent-lib=clang_rt.builtins.lib
+! MSVC-DLL-DEBUG-SAME: -D_MT
+! MSVC-DLL-DEBUG-SAME: -D_DEBUG
+! MSVC-DLL-DEBUG-SAME: -D_DLL
+! MSVC-DLL-DEBUG-SAME: --dependent-lib=msvcrtd
+! MSVC-DLL-DEBUG-SAME: --dependent-lib=FortranRuntime.dynamic_dbg.lib
+! MSVC-DLL-DEBUG-SAME: --dependent-lib=FortranDecimal.dynamic_dbg.lib
diff --git a/lld/test/COFF/Inputs/combined-resources.rc b/lld/test/COFF/Inputs/combined-resources.rc
index 08bfb94c44ae84..1caf0b356b4006 100644
--- a/lld/test/COFF/Inputs/combined-resources.rc
+++ b/lld/test/COFF/Inputs/combined-resources.rc
@@ -1,50 +1,50 @@
-#include "windows.h"
-
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-
-myaccelerators ACCELERATORS
-{
- "^C", 999, VIRTKEY, ALT
- "D", 1100, VIRTKEY, CONTROL, SHIFT
- "^R", 444, ASCII, NOINVERT
-}
-
-cursor BITMAP "combined-resources-cursor.bmp"
-okay BITMAP "combined-resources-okay.bmp"
-
-14432 MENU
-LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
-{
- MENUITEM "yu", 100
- MENUITEM "shala", 101
- MENUITEM "kaoya", 102
-}
-
-testdialog DIALOG 10, 10, 200, 300
-STYLE WS_POPUP | WS_BORDER
-CAPTION "Test"
-{
- CTEXT "Continue:", 1, 10, 10, 230, 14
- PUSHBUTTON "&OK", 2, 66, 134, 161, 13
-}
-
-12 ACCELERATORS
-{
- "X", 164, VIRTKEY, ALT
- "H", 5678, VIRTKEY, CONTROL, SHIFT
- "^R", 444, ASCII, NOINVERT
-}
-
-"eat" MENU
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS
-{
- MENUITEM "fish", 100
- MENUITEM "salad", 101
- MENUITEM "duck", 102
-}
-
-
-myresource stringarray {
- "this is a user defined resource\0",
- "it contains many strings\0",
-}
+#include "windows.h"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+myaccelerators ACCELERATORS
+{
+ "^C", 999, VIRTKEY, ALT
+ "D", 1100, VIRTKEY, CONTROL, SHIFT
+ "^R", 444, ASCII, NOINVERT
+}
+
+cursor BITMAP "combined-resources-cursor.bmp"
+okay BITMAP "combined-resources-okay.bmp"
+
+14432 MENU
+LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
+{
+ MENUITEM "yu", 100
+ MENUITEM "shala", 101
+ MENUITEM "kaoya", 102
+}
+
+testdialog DIALOG 10, 10, 200, 300
+STYLE WS_POPUP | WS_BORDER
+CAPTION "Test"
+{
+ CTEXT "Continue:", 1, 10, 10, 230, 14
+ PUSHBUTTON "&OK", 2, 66, 134, 161, 13
+}
+
+12 ACCELERATORS
+{
+ "X", 164, VIRTKEY, ALT
+ "H", 5678, VIRTKEY, CONTROL, SHIFT
+ "^R", 444, ASCII, NOINVERT
+}
+
+"eat" MENU
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS
+{
+ MENUITEM "fish", 100
+ MENUITEM "salad", 101
+ MENUITEM "duck", 102
+}
+
+
+myresource stringarray {
+ "this is a user defined resource\0",
+ "it contains many strings\0",
+}
diff --git a/lld/test/COFF/pdb-type-server-invalid-signature.yaml b/lld/test/COFF/pdb-type-server-invalid-signature.yaml
index 87c43676848455..8f1528ff1a89c1 100644
--- a/lld/test/COFF/pdb-type-server-invalid-signature.yaml
+++ b/lld/test/COFF/pdb-type-server-invalid-signature.yaml
@@ -23,8 +23,8 @@
# RUN: cp %S/Inputs/pdb-diff-cl.pdb %T
# RUN: lld-link %t3.obj -out:%t3.exe -debug -pdb:%t3.pdb -nodefaultlib -entry:main 2>&1 | FileCheck -DMSG=%errc_ENOENT %s -check-prefix=INVALID-PATH -allow-empty
-# INVALID-PATH-NOT: warning: Cannot use debug info for '{{.*}}3.obj' [LNK4099]
-# INVALID-PATH-NOT: failed to load reference 'c:\some_invalid_path_AABB98765\pdb-diff-cl.pdb': [[MSG]]
+# INVALID-PATH-NOT: warning: Cannot use debug info for '{{.*}}3.obj' [LNK4099]
+# INVALID-PATH-NOT: failed to load reference 'c:\some_invalid_path_AABB98765\pdb-diff-cl.pdb': [[MSG]]
--- !COFF
header:
diff --git a/lld/test/COFF/pdb_char8_t.ll b/lld/test/COFF/pdb_char8_t.ll
index 0cb71b641e8c82..0d160f0e50c7e4 100644
--- a/lld/test/COFF/pdb_char8_t.ll
+++ b/lld/test/COFF/pdb_char8_t.ll
@@ -1,46 +1,46 @@
-; REQUIRES: x86
-; RUN: llc -mtriple x86_64-windows-msvc -filetype obj -o %t.obj %s
-; RUN: lld-link /nodefaultlib /noentry /dll /debug /out:%t.exe /pdb:%t.pdb %t.obj
-; RUN: llvm-pdbutil dump -type-index=0x7c %t.pdb
-
-; CHECK: 0x007C (char8_t) | char8_t
-
-define dso_local i32 @main() #0 !dbg !9 {
- %1 = alloca i32, align 4
- %2 = alloca i8, align 1
- store i32 0, ptr %1, align 4
- call void @llvm.dbg.declare(metadata ptr %2, metadata !13, metadata !DIExpression()), !dbg !15
- store i8 0, ptr %2, align 1, !dbg !15
- %3 = load i8, ptr %2, align 1, !dbg !16
- %4 = zext i8 %3 to i32, !dbg !16
- ret i32 %4, !dbg !16
-}
-
-; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
-declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
-
-attributes #0 = { mustprogress noinline norecurse nounwind optnone uwtable "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
-attributes #1 = { nofree nosync nounwind readnone speculatable willreturn }
-
-!llvm.dbg.cu = !{!0}
-!llvm.linker.options = !{}
-!llvm.module.flags = !{!3, !4, !5, !6, !7}
-!llvm.ident = !{!8}
-
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 13.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)
-!1 = !DIFile(filename: "pdb_char8_t.cpp", directory: "C:\\src", checksumkind: CSK_MD5, checksum: "a00748d29f4e59003184945cd3e17ee3")
-!2 = !{}
-!3 = !{i32 2, !"CodeView", i32 1}
-!4 = !{i32 2, !"Debug Info Version", i32 3}
-!5 = !{i32 1, !"wchar_size", i32 2}
-!6 = !{i32 7, !"PIC Level", i32 2}
-!7 = !{i32 7, !"uwtable", i32 1}
-!8 = !{!"clang version 13.0.0"}
-!9 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 1, type: !10, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
-!10 = !DISubroutineType(types: !11)
-!11 = !{!12}
-!12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-!13 = !DILocalVariable(name: "local", scope: !9, file: !1, line: 3, type: !14)
-!14 = !DIBasicType(name: "char8_t", size: 8, encoding: DW_ATE_UTF)
-!15 = !DILocation(line: 3, scope: !9)
-!16 = !DILocation(line: 4, scope: !9)
+; REQUIRES: x86
+; RUN: llc -mtriple x86_64-windows-msvc -filetype obj -o %t.obj %s
+; RUN: lld-link /nodefaultlib /noentry /dll /debug /out:%t.exe /pdb:%t.pdb %t.obj
+; RUN: llvm-pdbutil dump -type-index=0x7c %t.pdb
+
+; CHECK: 0x007C (char8_t) | char8_t
+
+define dso_local i32 @main() #0 !dbg !9 {
+ %1 = alloca i32, align 4
+ %2 = alloca i8, align 1
+ store i32 0, ptr %1, align 4
+ call void @llvm.dbg.declare(metadata ptr %2, metadata !13, metadata !DIExpression()), !dbg !15
+ store i8 0, ptr %2, align 1, !dbg !15
+ %3 = load i8, ptr %2, align 1, !dbg !16
+ %4 = zext i8 %3 to i32, !dbg !16
+ ret i32 %4, !dbg !16
+}
+
+; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
+declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
+
+attributes #0 = { mustprogress noinline norecurse nounwind optnone uwtable "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
+attributes #1 = { nofree nosync nounwind readnone speculatable willreturn }
+
+!llvm.dbg.cu = !{!0}
+!llvm.linker.options = !{}
+!llvm.module.flags = !{!3, !4, !5, !6, !7}
+!llvm.ident = !{!8}
+
+!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 13.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)
+!1 = !DIFile(filename: "pdb_char8_t.cpp", directory: "C:\\src", checksumkind: CSK_MD5, checksum: "a00748d29f4e59003184945cd3e17ee3")
+!2 = !{}
+!3 = !{i32 2, !"CodeView", i32 1}
+!4 = !{i32 2, !"Debug Info Version", i32 3}
+!5 = !{i32 1, !"wchar_size", i32 2}
+!6 = !{i32 7, !"PIC Level", i32 2}
+!7 = !{i32 7, !"uwtable", i32 1}
+!8 = !{!"clang version 13.0.0"}
+!9 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 1, type: !10, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
+!10 = !DISubroutineType(types: !11)
+!11 = !{!12}
+!12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+!13 = !DILocalVariable(name: "local", scope: !9, file: !1, line: 3, type: !14)
+!14 = !DIBasicType(name: "char8_t", size: 8, encoding: DW_ATE_UTF)
+!15 = !DILocation(line: 3, scope: !9)
+!16 = !DILocation(line: 4, scope: !9)
diff --git a/lld/test/ELF/dynamic-list-cpp.s b/lld/test/ELF/dynamic-list-cpp.s
index b0efb8d16bcbe3..05f11e0079d34f 100644
--- a/lld/test/ELF/dynamic-list-cpp.s
+++ b/lld/test/ELF/dynamic-list-cpp.s
@@ -1,18 +1,18 @@
-# REQUIRES: x86
-
-## Confirm both mangled and unmangled names may appear in
-## the --dynamic-list file.
-
-# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
-
-# RUN: echo '{ _Z1fv; extern "C++" { "g()"; }; };' > %t.list
-# RUN: ld.lld -pie --dynamic-list %t.list %t.o -o %t
-# RUN: llvm-readelf --dyn-syms %t | FileCheck %s
-
-# CHECK: Symbol table '.dynsym' contains 3 entries:
-# CHECK: _Z1fv
-# CHECK-NEXT: _Z1gv
-
-.globl _Z1fv, _Z1gv
-_Z1fv:
-_Z1gv:
+# REQUIRES: x86
+
+## Confirm both mangled and unmangled names may appear in
+## the --dynamic-list file.
+
+# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
+
+# RUN: echo '{ _Z1fv; extern "C++" { "g()"; }; };' > %t.list
+# RUN: ld.lld -pie --dynamic-list %t.list %t.o -o %t
+# RUN: llvm-readelf --dyn-syms %t | FileCheck %s
+
+# CHECK: Symbol table '.dynsym' contains 3 entries:
+# CHECK: _Z1fv
+# CHECK-NEXT: _Z1gv
+
+.globl _Z1fv, _Z1gv
+_Z1fv:
+_Z1gv:
diff --git a/lldb/test/API/commands/expression/ir-interpreter-phi-nodes/Makefile b/lldb/test/API/commands/expression/ir-interpreter-phi-nodes/Makefile
index a1f689e07c77ff..d420a34c03e785 100644
--- a/lldb/test/API/commands/expression/ir-interpreter-phi-nodes/Makefile
+++ b/lldb/test/API/commands/expression/ir-interpreter-phi-nodes/Makefile
@@ -1,4 +1,4 @@
-
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
+
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/lldb/test/API/functionalities/postmortem/minidump/fizzbuzz.syms b/lldb/test/API/functionalities/postmortem/minidump/fizzbuzz.syms
index cab06c1c9d50b1..e817a491af5750 100644
--- a/lldb/test/API/functionalities/postmortem/minidump/fizzbuzz.syms
+++ b/lldb/test/API/functionalities/postmortem/minidump/fizzbuzz.syms
@@ -1,2 +1,2 @@
-MODULE windows x86 0F45B7919A9646F9BF8F2D6076EA421A11 fizzbuzz.pdb
-PUBLIC 1000 0 main
+MODULE windows x86 0F45B7919A9646F9BF8F2D6076EA421A11 fizzbuzz.pdb
+PUBLIC 1000 0 main
diff --git a/lldb/test/API/functionalities/unwind/zeroth_frame/Makefile b/lldb/test/API/functionalities/unwind/zeroth_frame/Makefile
index 15a931850e17e5..10495940055b63 100644
--- a/lldb/test/API/functionalities/unwind/zeroth_frame/Makefile
+++ b/lldb/test/API/functionalities/unwind/zeroth_frame/Makefile
@@ -1,3 +1,3 @@
-C_SOURCES := main.c
-
-include Makefile.rules
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/lldb/test/API/functionalities/unwind/zeroth_frame/TestZerothFrame.py b/lldb/test/API/functionalities/unwind/zeroth_frame/TestZerothFrame.py
index f4e883d314644a..fb60044e0bf253 100644
--- a/lldb/test/API/functionalities/unwind/zeroth_frame/TestZerothFrame.py
+++ b/lldb/test/API/functionalities/unwind/zeroth_frame/TestZerothFrame.py
@@ -1,89 +1,89 @@
-"""
-Test that line information is recalculated properly for a frame when it moves
-from the middle of the backtrace to a zero index.
-
-This is a regression test for a StackFrame bug, where whether frame is zero or
-not depends on an internal field. When LLDB was updating its frame list value
-of the field wasn't copied into existing StackFrame instances, so those
-StackFrame instances, would use an incorrect line entry evaluation logic in
-situations if it was in the middle of the stack frame list (not zeroth), and
-then moved to the top position. The difference in logic is that for zeroth
-frames line entry is returned for program counter, while for other frame
-(except for those that "behave like zeroth") it is for the instruction
-preceding PC, as PC points to the next instruction after function call. When
-the bug is present, when execution stops at the second breakpoint
-SBFrame.GetLineEntry() returns line entry for the previous line, rather than
-the one with a breakpoint. Note that this is specific to
-SBFrame.GetLineEntry(), SBFrame.GetPCAddress().GetLineEntry() would return
-correct entry.
-
-This bug doesn't reproduce through an LLDB interpretator, however it happens
-when using API directly, for example in LLDB-MI.
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ZerothFrame(TestBase):
- def test(self):
- """
- Test that line information is recalculated properly for a frame when it moves
- from the middle of the backtrace to a zero index.
- """
- self.build()
- self.setTearDownCleanup()
-
- exe = self.getBuildArtifact("a.out")
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- bp1_line = line_number("main.c", "// Set breakpoint 1 here")
- bp2_line = line_number("main.c", "// Set breakpoint 2 here")
-
- lldbutil.run_break_set_by_file_and_line(
- self, "main.c", bp1_line, num_expected_locations=1
- )
- lldbutil.run_break_set_by_file_and_line(
- self, "main.c", bp2_line, num_expected_locations=1
- )
-
- process = target.LaunchSimple(None, None, self.get_process_working_directory())
- self.assertTrue(process, VALID_PROCESS)
-
- thread = process.GetThreadAtIndex(0)
- if self.TraceOn():
- print("Backtrace at the first breakpoint:")
- for f in thread.frames:
- print(f)
- # Check that we have stopped at correct breakpoint.
- self.assertEqual(
- process.GetThreadAtIndex(0).frame[0].GetLineEntry().GetLine(),
- bp1_line,
- "LLDB reported incorrect line number.",
- )
-
- # Important to use SBProcess::Continue() instead of
- # self.runCmd('continue'), because the problem doesn't reproduce with
- # 'continue' command.
- process.Continue()
-
- thread = process.GetThreadAtIndex(0)
- if self.TraceOn():
- print("Backtrace at the second breakpoint:")
- for f in thread.frames:
- print(f)
- # Check that we have stopped at the breakpoint
- self.assertEqual(
- thread.frame[0].GetLineEntry().GetLine(),
- bp2_line,
- "LLDB reported incorrect line number.",
- )
- # Double-check with GetPCAddress()
- self.assertEqual(
- thread.frame[0].GetLineEntry().GetLine(),
- thread.frame[0].GetPCAddress().GetLineEntry().GetLine(),
- "LLDB reported incorrect line number.",
- )
+"""
+Test that line information is recalculated properly for a frame when it moves
+from the middle of the backtrace to a zero index.
+
+This is a regression test for a StackFrame bug, where whether frame is zero or
+not depends on an internal field. When LLDB was updating its frame list value
+of the field wasn't copied into existing StackFrame instances, so those
+StackFrame instances, would use an incorrect line entry evaluation logic in
+situations if it was in the middle of the stack frame list (not zeroth), and
+then moved to the top position. The difference in logic is that for zeroth
+frames line entry is returned for program counter, while for other frame
+(except for those that "behave like zeroth") it is for the instruction
+preceding PC, as PC points to the next instruction after function call. When
+the bug is present, when execution stops at the second breakpoint
+SBFrame.GetLineEntry() returns line entry for the previous line, rather than
+the one with a breakpoint. Note that this is specific to
+SBFrame.GetLineEntry(), SBFrame.GetPCAddress().GetLineEntry() would return
+correct entry.
+
+This bug doesn't reproduce through an LLDB interpretator, however it happens
+when using API directly, for example in LLDB-MI.
+"""
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ZerothFrame(TestBase):
+ def test(self):
+ """
+ Test that line information is recalculated properly for a frame when it moves
+ from the middle of the backtrace to a zero index.
+ """
+ self.build()
+ self.setTearDownCleanup()
+
+ exe = self.getBuildArtifact("a.out")
+ target = self.dbg.CreateTarget(exe)
+ self.assertTrue(target, VALID_TARGET)
+
+ bp1_line = line_number("main.c", "// Set breakpoint 1 here")
+ bp2_line = line_number("main.c", "// Set breakpoint 2 here")
+
+ lldbutil.run_break_set_by_file_and_line(
+ self, "main.c", bp1_line, num_expected_locations=1
+ )
+ lldbutil.run_break_set_by_file_and_line(
+ self, "main.c", bp2_line, num_expected_locations=1
+ )
+
+ process = target.LaunchSimple(None, None, self.get_process_working_directory())
+ self.assertTrue(process, VALID_PROCESS)
+
+ thread = process.GetThreadAtIndex(0)
+ if self.TraceOn():
+ print("Backtrace at the first breakpoint:")
+ for f in thread.frames:
+ print(f)
+ # Check that we have stopped at correct breakpoint.
+ self.assertEqual(
+ process.GetThreadAtIndex(0).frame[0].GetLineEntry().GetLine(),
+ bp1_line,
+ "LLDB reported incorrect line number.",
+ )
+
+ # Important to use SBProcess::Continue() instead of
+ # self.runCmd('continue'), because the problem doesn't reproduce with
+ # 'continue' command.
+ process.Continue()
+
+ thread = process.GetThreadAtIndex(0)
+ if self.TraceOn():
+ print("Backtrace at the second breakpoint:")
+ for f in thread.frames:
+ print(f)
+ # Check that we have stopped at the breakpoint
+ self.assertEqual(
+ thread.frame[0].GetLineEntry().GetLine(),
+ bp2_line,
+ "LLDB reported incorrect line number.",
+ )
+ # Double-check with GetPCAddress()
+ self.assertEqual(
+ thread.frame[0].GetLineEntry().GetLine(),
+ thread.frame[0].GetPCAddress().GetLineEntry().GetLine(),
+ "LLDB reported incorrect line number.",
+ )
diff --git a/lldb/test/API/python_api/debugger/Makefile b/lldb/test/API/python_api/debugger/Makefile
index bfad5f33e86753..99998b20bcb050 100644
--- a/lldb/test/API/python_api/debugger/Makefile
+++ b/lldb/test/API/python_api/debugger/Makefile
@@ -1,3 +1,3 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/lldb/test/Shell/BuildScript/modes.test b/lldb/test/Shell/BuildScript/modes.test
index 02311f712d770f..1ce50104855f46 100644
--- a/lldb/test/Shell/BuildScript/modes.test
+++ b/lldb/test/Shell/BuildScript/modes.test
@@ -1,35 +1,35 @@
-RUN: %build -n --verbose --arch=32 --mode=compile --compiler=any -o %t/foo.out foobar.c \
-RUN: | FileCheck --check-prefix=COMPILE %s
-
-RUN: %build -n --verbose --arch=32 --mode=compile --compiler=any --outdir %t foo.c bar.c \
-RUN: | FileCheck --check-prefix=COMPILE-MULTI %s
-
-RUN: %build -n --verbose --arch=32 --mode=link --compiler=any -o %t/foo.exe foobar.obj \
-RUN: | FileCheck --check-prefix=LINK %s
-
-RUN: %build -n --verbose --arch=32 --mode=link --compiler=any -o %t/foobar.exe foo.obj bar.obj \
-RUN: | FileCheck --check-prefix=LINK-MULTI %s
-
-RUN: %build -n --verbose --arch=32 --mode=compile-and-link --compiler=any -o %t/foobar.exe foobar.c \
-RUN: | FileCheck --check-prefix=BOTH %s
-
-RUN: %build -n --verbose --arch=32 --mode=compile-and-link --compiler=any -o %t/foobar.exe foo.c bar.c \
-RUN: | FileCheck --check-prefix=BOTH-MULTI %s
-
-
-COMPILE: compiling foobar.c -> foo.out
-
-COMPILE-MULTI: compiling foo.c -> foo.o{{(bj)?}}
-COMPILE-MULTI: compiling bar.c -> bar.o{{(bj)?}}
-
-
-LINK: linking foobar.obj -> foo.exe
-
-LINK-MULTI: linking foo.obj+bar.obj -> foobar.exe
-
-BOTH: compiling foobar.c -> [[OBJFOO:foobar.exe-foobar.o(bj)?]]
-BOTH: linking [[OBJFOO]] -> foobar.exe
-
-BOTH-MULTI: compiling foo.c -> [[OBJFOO:foobar.exe-foo.o(bj)?]]
-BOTH-MULTI: compiling bar.c -> [[OBJBAR:foobar.exe-bar.o(bj)?]]
-BOTH-MULTI: linking [[OBJFOO]]+[[OBJBAR]] -> foobar.exe
+RUN: %build -n --verbose --arch=32 --mode=compile --compiler=any -o %t/foo.out foobar.c \
+RUN: | FileCheck --check-prefix=COMPILE %s
+
+RUN: %build -n --verbose --arch=32 --mode=compile --compiler=any --outdir %t foo.c bar.c \
+RUN: | FileCheck --check-prefix=COMPILE-MULTI %s
+
+RUN: %build -n --verbose --arch=32 --mode=link --compiler=any -o %t/foo.exe foobar.obj \
+RUN: | FileCheck --check-prefix=LINK %s
+
+RUN: %build -n --verbose --arch=32 --mode=link --compiler=any -o %t/foobar.exe foo.obj bar.obj \
+RUN: | FileCheck --check-prefix=LINK-MULTI %s
+
+RUN: %build -n --verbose --arch=32 --mode=compile-and-link --compiler=any -o %t/foobar.exe foobar.c \
+RUN: | FileCheck --check-prefix=BOTH %s
+
+RUN: %build -n --verbose --arch=32 --mode=compile-and-link --compiler=any -o %t/foobar.exe foo.c bar.c \
+RUN: | FileCheck --check-prefix=BOTH-MULTI %s
+
+
+COMPILE: compiling foobar.c -> foo.out
+
+COMPILE-MULTI: compiling foo.c -> foo.o{{(bj)?}}
+COMPILE-MULTI: compiling bar.c -> bar.o{{(bj)?}}
+
+
+LINK: linking foobar.obj -> foo.exe
+
+LINK-MULTI: linking foo.obj+bar.obj -> foobar.exe
+
+BOTH: compiling foobar.c -> [[OBJFOO:foobar.exe-foobar.o(bj)?]]
+BOTH: linking [[OBJFOO]] -> foobar.exe
+
+BOTH-MULTI: compiling foo.c -> [[OBJFOO:foobar.exe-foo.o(bj)?]]
+BOTH-MULTI: compiling bar.c -> [[OBJBAR:foobar.exe-bar.o(bj)?]]
+BOTH-MULTI: linking [[OBJFOO]]+[[OBJBAR]] -> foobar.exe
diff --git a/lldb/test/Shell/BuildScript/script-args.test b/lldb/test/Shell/BuildScript/script-args.test
index 13e8a516094267..647a48e4442b12 100644
--- a/lldb/test/Shell/BuildScript/script-args.test
+++ b/lldb/test/Shell/BuildScript/script-args.test
@@ -1,32 +1,32 @@
-RUN: %build -n --verbose --arch=32 --mode=compile --compiler=any -o %t/foo.out foobar.c \
-RUN: | FileCheck %s
-RUN: %build -n --verbose --arch=32 --mode=compile --compiler=any --outdir %t foo.c bar.c \
-RUN: | FileCheck --check-prefix=MULTI-INPUT %s
-
-
-CHECK: Script Arguments:
-CHECK-NEXT: Arch: 32
-CHECK: Compiler: any
-CHECK: Outdir: {{.*}}script-args.test.tmp
-CHECK: Output: {{.*}}script-args.test.tmp{{.}}foo.out
-CHECK: Nodefaultlib: False
-CHECK: Opt: none
-CHECK: Mode: compile
-CHECK: Clean: True
-CHECK: Verbose: True
-CHECK: Dryrun: True
-CHECK: Inputs: foobar.c
-
-MULTI-INPUT: Script Arguments:
-MULTI-INPUT-NEXT: Arch: 32
-MULTI-INPUT-NEXT: Compiler: any
-MULTI-INPUT-NEXT: Outdir: {{.*}}script-args.test.tmp
-MULTI-INPUT-NEXT: Output:
-MULTI-INPUT-NEXT: Nodefaultlib: False
-MULTI-INPUT-NEXT: Opt: none
-MULTI-INPUT-NEXT: Mode: compile
-MULTI-INPUT-NEXT: Clean: True
-MULTI-INPUT-NEXT: Verbose: True
-MULTI-INPUT-NEXT: Dryrun: True
-MULTI-INPUT-NEXT: Inputs: foo.c
-MULTI-INPUT-NEXT: bar.c
+RUN: %build -n --verbose --arch=32 --mode=compile --compiler=any -o %t/foo.out foobar.c \
+RUN: | FileCheck %s
+RUN: %build -n --verbose --arch=32 --mode=compile --compiler=any --outdir %t foo.c bar.c \
+RUN: | FileCheck --check-prefix=MULTI-INPUT %s
+
+
+CHECK: Script Arguments:
+CHECK-NEXT: Arch: 32
+CHECK: Compiler: any
+CHECK: Outdir: {{.*}}script-args.test.tmp
+CHECK: Output: {{.*}}script-args.test.tmp{{.}}foo.out
+CHECK: Nodefaultlib: False
+CHECK: Opt: none
+CHECK: Mode: compile
+CHECK: Clean: True
+CHECK: Verbose: True
+CHECK: Dryrun: True
+CHECK: Inputs: foobar.c
+
+MULTI-INPUT: Script Arguments:
+MULTI-INPUT-NEXT: Arch: 32
+MULTI-INPUT-NEXT: Compiler: any
+MULTI-INPUT-NEXT: Outdir: {{.*}}script-args.test.tmp
+MULTI-INPUT-NEXT: Output:
+MULTI-INPUT-NEXT: Nodefaultlib: False
+MULTI-INPUT-NEXT: Opt: none
+MULTI-INPUT-NEXT: Mode: compile
+MULTI-INPUT-NEXT: Clean: True
+MULTI-INPUT-NEXT: Verbose: True
+MULTI-INPUT-NEXT: Dryrun: True
+MULTI-INPUT-NEXT: Inputs: foo.c
+MULTI-INPUT-NEXT: bar.c
diff --git a/lldb/test/Shell/BuildScript/toolchain-clang-cl.test b/lldb/test/Shell/BuildScript/toolchain-clang-cl.test
index 8c9ea9fddb8a50..4f64859a02b607 100644
--- a/lldb/test/Shell/BuildScript/toolchain-clang-cl.test
+++ b/lldb/test/Shell/BuildScript/toolchain-clang-cl.test
@@ -1,49 +1,49 @@
-REQUIRES: lld, system-windows
-
-RUN: %build -n --verbose --arch=32 --compiler=clang-cl --mode=compile-and-link -o %t/foo.exe foobar.c \
-RUN: | FileCheck --check-prefix=CHECK-32 %s
-
-RUN: %build -n --verbose --arch=64 --compiler=clang-cl --mode=compile-and-link -o %t/foo.exe foobar.c \
-RUN: | FileCheck --check-prefix=CHECK-64 %s
-
-CHECK-32: Script Arguments:
-CHECK-32: Arch: 32
-CHECK-32: Compiler: clang-cl
-CHECK-32: Outdir: {{.*}}
-CHECK-32: Output: {{.*}}toolchain-clang-cl.test.tmp\foo.exe
-CHECK-32: Nodefaultlib: False
-CHECK-32: Opt: none
-CHECK-32: Mode: compile
-CHECK-32: Clean: True
-CHECK-32: Verbose: True
-CHECK-32: Dryrun: True
-CHECK-32: Inputs: foobar.c
-CHECK-32: Cleaning {{.*}}toolchain-clang-cl.test.tmp{{.}}foobar.ilk
-CHECK-32: Cleaning {{.*}}toolchain-clang-cl.test.tmp{{.}}foo.exe-foobar.obj
-CHECK-32: Cleaning {{.*}}toolchain-clang-cl.test.tmp{{.}}foo.pdb
-CHECK-32: Cleaning {{.*}}toolchain-clang-cl.test.tmp{{.}}foo.exe
-CHECK-32: compiling foobar.c -> foo.exe-foobar.obj
-CHECK-32: {{.*}}clang-cl{{(\.EXE)?}} -m32
-CHECK-32: linking foo.exe-foobar.obj -> foo.exe
-CHECK-32: {{.*}}lld-link{{(\.EXE)?}}
-
-CHECK-64: Script Arguments:
-CHECK-64: Arch: 64
-CHECK-64: Compiler: clang-cl
-CHECK-64: Outdir: {{.*}}
-CHECK-64: Output: {{.*}}toolchain-clang-cl.test.tmp\foo.exe
-CHECK-64: Nodefaultlib: False
-CHECK-64: Opt: none
-CHECK-64: Mode: compile
-CHECK-64: Clean: True
-CHECK-64: Verbose: True
-CHECK-64: Dryrun: True
-CHECK-64: Inputs: foobar.c
-CHECK-64: Cleaning {{.*}}toolchain-clang-cl.test.tmp{{.}}foobar.ilk
-CHECK-64: Cleaning {{.*}}toolchain-clang-cl.test.tmp{{.}}foo.exe-foobar.obj
-CHECK-64: Cleaning {{.*}}toolchain-clang-cl.test.tmp{{.}}foo.pdb
-CHECK-64: Cleaning {{.*}}toolchain-clang-cl.test.tmp{{.}}foo.exe
-CHECK-64: compiling foobar.c -> foo.exe-foobar.obj
-CHECK-64: {{.*}}clang-cl{{(\.EXE)?}} -m64
-CHECK-64: linking foo.exe-foobar.obj -> foo.exe
-CHECK-64: {{.*}}lld-link{{(\.EXE)?}}
+REQUIRES: lld, system-windows
+
+RUN: %build -n --verbose --arch=32 --compiler=clang-cl --mode=compile-and-link -o %t/foo.exe foobar.c \
+RUN: | FileCheck --check-prefix=CHECK-32 %s
+
+RUN: %build -n --verbose --arch=64 --compiler=clang-cl --mode=compile-and-link -o %t/foo.exe foobar.c \
+RUN: | FileCheck --check-prefix=CHECK-64 %s
+
+CHECK-32: Script Arguments:
+CHECK-32: Arch: 32
+CHECK-32: Compiler: clang-cl
+CHECK-32: Outdir: {{.*}}
+CHECK-32: Output: {{.*}}toolchain-clang-cl.test.tmp\foo.exe
+CHECK-32: Nodefaultlib: False
+CHECK-32: Opt: none
+CHECK-32: Mode: compile
+CHECK-32: Clean: True
+CHECK-32: Verbose: True
+CHECK-32: Dryrun: True
+CHECK-32: Inputs: foobar.c
+CHECK-32: Cleaning {{.*}}toolchain-clang-cl.test.tmp{{.}}foobar.ilk
+CHECK-32: Cleaning {{.*}}toolchain-clang-cl.test.tmp{{.}}foo.exe-foobar.obj
+CHECK-32: Cleaning {{.*}}toolchain-clang-cl.test.tmp{{.}}foo.pdb
+CHECK-32: Cleaning {{.*}}toolchain-clang-cl.test.tmp{{.}}foo.exe
+CHECK-32: compiling foobar.c -> foo.exe-foobar.obj
+CHECK-32: {{.*}}clang-cl{{(\.EXE)?}} -m32
+CHECK-32: linking foo.exe-foobar.obj -> foo.exe
+CHECK-32: {{.*}}lld-link{{(\.EXE)?}}
+
+CHECK-64: Script Arguments:
+CHECK-64: Arch: 64
+CHECK-64: Compiler: clang-cl
+CHECK-64: Outdir: {{.*}}
+CHECK-64: Output: {{.*}}toolchain-clang-cl.test.tmp\foo.exe
+CHECK-64: Nodefaultlib: False
+CHECK-64: Opt: none
+CHECK-64: Mode: compile
+CHECK-64: Clean: True
+CHECK-64: Verbose: True
+CHECK-64: Dryrun: True
+CHECK-64: Inputs: foobar.c
+CHECK-64: Cleaning {{.*}}toolchain-clang-cl.test.tmp{{.}}foobar.ilk
+CHECK-64: Cleaning {{.*}}toolchain-clang-cl.test.tmp{{.}}foo.exe-foobar.obj
+CHECK-64: Cleaning {{.*}}toolchain-clang-cl.test.tmp{{.}}foo.pdb
+CHECK-64: Cleaning {{.*}}toolchain-clang-cl.test.tmp{{.}}foo.exe
+CHECK-64: compiling foobar.c -> foo.exe-foobar.obj
+CHECK-64: {{.*}}clang-cl{{(\.EXE)?}} -m64
+CHECK-64: linking foo.exe-foobar.obj -> foo.exe
+CHECK-64: {{.*}}lld-link{{(\.EXE)?}}
diff --git a/lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.cpp b/lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.cpp
index 6bf78b5dc43b29..d5b96472eb117f 100644
--- a/lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.cpp
+++ b/lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.cpp
@@ -1,40 +1,40 @@
-
-// nodefaultlib build: cl -Zi sigsegv.cpp /link /nodefaultlib
-
-#ifdef USE_CRT
-#include <stdio.h>
-#else
-int main();
-extern "C"
-{
- int _fltused;
- void mainCRTStartup() { main(); }
- void printf(const char*, ...) {}
-}
-#endif
-
-void crash(bool crash_self)
-{
- printf("Before...\n");
- if(crash_self)
- {
- printf("Crashing in 3, 2, 1 ...\n");
- *(volatile int*)nullptr = 0;
- }
- printf("After...\n");
-}
-
-int foo(int x, float y, const char* msg)
-{
- bool flag = x > y;
- if(flag)
- printf("x = %d, y = %f, msg = %s\n", x, y, msg);
- crash(flag);
- return x << 1;
-}
-
-int main()
-{
- foo(10, 3.14, "testing");
-}
-
+
+// nodefaultlib build: cl -Zi sigsegv.cpp /link /nodefaultlib
+
+#ifdef USE_CRT
+#include <stdio.h>
+#else
+int main();
+extern "C"
+{
+ int _fltused;
+ void mainCRTStartup() { main(); }
+ void printf(const char*, ...) {}
+}
+#endif
+
+void crash(bool crash_self)
+{
+ printf("Before...\n");
+ if(crash_self)
+ {
+ printf("Crashing in 3, 2, 1 ...\n");
+ *(volatile int*)nullptr = 0;
+ }
+ printf("After...\n");
+}
+
+int foo(int x, float y, const char* msg)
+{
+ bool flag = x > y;
+ if(flag)
+ printf("x = %d, y = %f, msg = %s\n", x, y, msg);
+ crash(flag);
+ return x << 1;
+}
+
+int main()
+{
+ foo(10, 3.14, "testing");
+}
+
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/inline_sites.s b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/inline_sites.s
index aac8f4c1698038..a9d248758bfcec 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/inline_sites.s
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/inline_sites.s
@@ -1,622 +1,622 @@
-# Compiled from the following files, but replaced the call to abort with nop.
-# clang-cl -fuse-ld=lld-link /Z7 /O1 /Faa.asm /winsysroot~/win_toolchain a.cpp
-# a.cpp:
-# #include "a.h"
-# int main(int argc, char** argv) {
-# volatile int main_local = Namespace1::foo(2);
-# return 0;
-# }
-# a.h:
-# #include <stdlib.h>
-# #include "b.h"
-# namespace Namespace1 {
-# inline int foo(int x) {
-# volatile int foo_local = x + 1;
-# ++foo_local;
-# if (!foo_local)
-# abort();
-# return Class1::bar(foo_local);
-# }
-# } // namespace Namespace1
-# b.h:
-# #include "c.h"
-# class Class1 {
-# public:
-# inline static int bar(int x) {
-# volatile int bar_local = x + 1;
-# ++bar_local;
-# return Namespace2::Class2::func(bar_local);
-# }
-# };
-# c.h:
-# namespace Namespace2 {
-# class Class2 {
-# public:
-# inline static int func(int x) {
-# volatile int func_local = x + 1;
-# func_local += x;
-# return func_local;
-# }
-# };
-# } // namespace Namespace2
-
- .text
- .def @feat.00;
- .scl 3;
- .type 0;
- .endef
- .globl @feat.00
-.set @feat.00, 0
- .intel_syntax noprefix
- .file "a.cpp"
- .def main;
- .scl 2;
- .type 32;
- .endef
- .section .text,"xr",one_only,main
- .globl main # -- Begin function main
-main: # @main
-.Lfunc_begin0:
- .cv_func_id 0
- .cv_file 1 "/tmp/a.cpp" "4FFB96E5DF1A95CE7DB9732CFFE001D7" 1
- .cv_loc 0 1 2 0 # a.cpp:2:0
-.seh_proc main
-# %bb.0:
- #DEBUG_VALUE: main:argv <- $rdx
- #DEBUG_VALUE: main:argc <- $ecx
- #DEBUG_VALUE: foo:x <- 2
- sub rsp, 56
- .seh_stackalloc 56
- .seh_endprologue
-.Ltmp0:
- .cv_file 2 "/tmp/./a.h" "BBFED90EF093E9C1D032CC9B05B5D167" 1
- .cv_inline_site_id 1 within 0 inlined_at 1 3 0
- .cv_loc 1 2 5 0 # ./a.h:5:0
- mov dword ptr [rsp + 44], 3
- .cv_loc 1 2 6 0 # ./a.h:6:0
- inc dword ptr [rsp + 44]
- .cv_loc 1 2 7 0 # ./a.h:7:0
- mov eax, dword ptr [rsp + 44]
- test eax, eax
- je .LBB0_2
-.Ltmp1:
-# %bb.1:
- #DEBUG_VALUE: main:argv <- $rdx
- #DEBUG_VALUE: main:argc <- $ecx
- #DEBUG_VALUE: foo:x <- 2
- .cv_loc 1 2 9 0 # ./a.h:9:0
- mov eax, dword ptr [rsp + 44]
-.Ltmp2:
- #DEBUG_VALUE: bar:x <- $eax
- .cv_file 3 "/tmp/./b.h" "A26CC743A260115F33AF91AB11F95877" 1
- .cv_inline_site_id 2 within 1 inlined_at 2 9 0
- .cv_loc 2 3 5 0 # ./b.h:5:0
- inc eax
-.Ltmp3:
- mov dword ptr [rsp + 52], eax
- .cv_loc 2 3 6 0 # ./b.h:6:0
- inc dword ptr [rsp + 52]
- .cv_loc 2 3 7 0 # ./b.h:7:0
- mov eax, dword ptr [rsp + 52]
-.Ltmp4:
- #DEBUG_VALUE: func:x <- $eax
- .cv_file 4 "/tmp/./c.h" "8AF4613F78624BBE96D1C408ABA39B2D" 1
- .cv_inline_site_id 3 within 2 inlined_at 3 7 0
- .cv_loc 3 4 5 0 # ./c.h:5:0
- lea ecx, [rax + 1]
-.Ltmp5:
- #DEBUG_VALUE: main:argc <- [DW_OP_LLVM_entry_value 1] $ecx
- mov dword ptr [rsp + 48], ecx
- .cv_loc 3 4 6 0 # ./c.h:6:0
- add dword ptr [rsp + 48], eax
- .cv_loc 3 4 7 0 # ./c.h:7:0
- mov eax, dword ptr [rsp + 48]
-.Ltmp6:
- .cv_loc 0 1 3 0 # a.cpp:3:0
- mov dword ptr [rsp + 48], eax
- .cv_loc 0 1 4 0 # a.cpp:4:0
- xor eax, eax
- # Use fake debug info to tests inline info.
- .cv_loc 1 2 20 0
- add rsp, 56
- ret
-.Ltmp7:
-.LBB0_2:
- #DEBUG_VALUE: main:argv <- $rdx
- #DEBUG_VALUE: main:argc <- $ecx
- #DEBUG_VALUE: foo:x <- 2
- .cv_loc 1 2 8 0 # ./a.h:8:0
- nop
-.Ltmp8:
- int3
-.Ltmp9:
- #DEBUG_VALUE: main:argc <- [DW_OP_LLVM_entry_value 1] $ecx
- #DEBUG_VALUE: main:argv <- [DW_OP_LLVM_entry_value 1] $rdx
-.Lfunc_end0:
- .seh_endproc
- # -- End function
- .section .drectve,"yn"
- .ascii " /DEFAULTLIB:libcmt.lib"
- .ascii " /DEFAULTLIB:oldnames.lib"
- .section .debug$S,"dr"
- .p2align 2
- .long 4 # Debug section magic
- .long 241
- .long .Ltmp11-.Ltmp10 # Subsection size
-.Ltmp10:
- .short .Ltmp13-.Ltmp12 # Record length
-.Ltmp12:
- .short 4353 # Record kind: S_OBJNAME
- .long 0 # Signature
- .asciz "/tmp/a-2b2ba0.obj" # Object name
- .p2align 2
-.Ltmp13:
- .short .Ltmp15-.Ltmp14 # Record length
-.Ltmp14:
- .short 4412 # Record kind: S_COMPILE3
- .long 1 # Flags and language
- .short 208 # CPUType
- .short 15 # Frontend version
- .short 0
- .short 0
- .short 0
- .short 15000 # Backend version
- .short 0
- .short 0
- .short 0
- .asciz "clang version 15.0.0" # Null-terminated compiler version string
- .p2align 2
-.Ltmp15:
-.Ltmp11:
- .p2align 2
- .long 246 # Inlinee lines subsection
- .long .Ltmp17-.Ltmp16 # Subsection size
-.Ltmp16:
- .long 0 # Inlinee lines signature
-
- # Inlined function foo starts at ./a.h:4
- .long 4099 # Type index of inlined function
- .cv_filechecksumoffset 2 # Offset into filechecksum table
- .long 4 # Starting line number
-
- # Inlined function bar starts at ./b.h:4
- .long 4106 # Type index of inlined function
- .cv_filechecksumoffset 3 # Offset into filechecksum table
- .long 4 # Starting line number
-
- # Inlined function func starts at ./c.h:4
- .long 4113 # Type index of inlined function
- .cv_filechecksumoffset 4 # Offset into filechecksum table
- .long 4 # Starting line number
-.Ltmp17:
- .p2align 2
- .section .debug$S,"dr",associative,main
- .p2align 2
- .long 4 # Debug section magic
- .long 241 # Symbol subsection for main
- .long .Ltmp19-.Ltmp18 # Subsection size
-.Ltmp18:
- .short .Ltmp21-.Ltmp20 # Record length
-.Ltmp20:
- .short 4423 # Record kind: S_GPROC32_ID
- .long 0 # PtrParent
- .long 0 # PtrEnd
- .long 0 # PtrNext
- .long .Lfunc_end0-main # Code size
- .long 0 # Offset after prologue
- .long 0 # Offset before epilogue
- .long 4117 # Function type index
- .secrel32 main # Function section relative address
- .secidx main # Function section index
- .byte 0 # Flags
- .asciz "main" # Function name
- .p2align 2
-.Ltmp21:
- .short .Ltmp23-.Ltmp22 # Record length
-.Ltmp22:
- .short 4114 # Record kind: S_FRAMEPROC
- .long 56 # FrameSize
- .long 0 # Padding
- .long 0 # Offset of padding
- .long 0 # Bytes of callee saved registers
- .long 0 # Exception handler offset
- .short 0 # Exception handler section
- .long 81920 # Flags (defines frame register)
- .p2align 2
-.Ltmp23:
- .short .Ltmp25-.Ltmp24 # Record length
-.Ltmp24:
- .short 4414 # Record kind: S_LOCAL
- .long 116 # TypeIndex
- .short 1 # Flags
- .asciz "argc"
- .p2align 2
-.Ltmp25:
- .cv_def_range .Lfunc_begin0 .Ltmp5 .Ltmp7 .Ltmp8, reg, 18
- .short .Ltmp27-.Ltmp26 # Record length
-.Ltmp26:
- .short 4414 # Record kind: S_LOCAL
- .long 4114 # TypeIndex
- .short 1 # Flags
- .asciz "argv"
- .p2align 2
-.Ltmp27:
- .cv_def_range .Lfunc_begin0 .Ltmp8, reg, 331
- .short .Ltmp29-.Ltmp28 # Record length
-.Ltmp28:
- .short 4414 # Record kind: S_LOCAL
- .long 4118 # TypeIndex
- .short 0 # Flags
- .asciz "main_local"
- .p2align 2
-.Ltmp29:
- .cv_def_range .Ltmp0 .Ltmp9, frame_ptr_rel, 48
- .short .Ltmp31-.Ltmp30 # Record length
-.Ltmp30:
- .short 4429 # Record kind: S_INLINESITE
- .long 0 # PtrParent
- .long 0 # PtrEnd
- .long 4099 # Inlinee type index
- .cv_inline_linetable 1 2 4 .Lfunc_begin0 .Lfunc_end0
- .p2align 2
-.Ltmp31:
- .short .Ltmp33-.Ltmp32 # Record length
-.Ltmp32:
- .short 4414 # Record kind: S_LOCAL
- .long 116 # TypeIndex
- .short 257 # Flags
- .asciz "x"
- .p2align 2
-.Ltmp33:
- .short .Ltmp35-.Ltmp34 # Record length
-.Ltmp34:
- .short 4414 # Record kind: S_LOCAL
- .long 4118 # TypeIndex
- .short 0 # Flags
- .asciz "foo_local"
- .p2align 2
-.Ltmp35:
- .cv_def_range .Ltmp0 .Ltmp6 .Ltmp7 .Ltmp9, frame_ptr_rel, 44
- .short .Ltmp37-.Ltmp36 # Record length
-.Ltmp36:
- .short 4429 # Record kind: S_INLINESITE
- .long 0 # PtrParent
- .long 0 # PtrEnd
- .long 4106 # Inlinee type index
- .cv_inline_linetable 2 3 4 .Lfunc_begin0 .Lfunc_end0
- .p2align 2
-.Ltmp37:
- .short .Ltmp39-.Ltmp38 # Record length
-.Ltmp38:
- .short 4414 # Record kind: S_LOCAL
- .long 116 # TypeIndex
- .short 1 # Flags
- .asciz "x"
- .p2align 2
-.Ltmp39:
- .cv_def_range .Ltmp2 .Ltmp3, reg, 17
- .short .Ltmp41-.Ltmp40 # Record length
-.Ltmp40:
- .short 4414 # Record kind: S_LOCAL
- .long 4118 # TypeIndex
- .short 0 # Flags
- .asciz "bar_local"
- .p2align 2
-.Ltmp41:
- .cv_def_range .Ltmp2 .Ltmp6, frame_ptr_rel, 52
- .short .Ltmp43-.Ltmp42 # Record length
-.Ltmp42:
- .short 4429 # Record kind: S_INLINESITE
- .long 0 # PtrParent
- .long 0 # PtrEnd
- .long 4113 # Inlinee type index
- .cv_inline_linetable 3 4 4 .Lfunc_begin0 .Lfunc_end0
- .p2align 2
-.Ltmp43:
- .short .Ltmp45-.Ltmp44 # Record length
-.Ltmp44:
- .short 4414 # Record kind: S_LOCAL
- .long 116 # TypeIndex
- .short 1 # Flags
- .asciz "x"
- .p2align 2
-.Ltmp45:
- .cv_def_range .Ltmp4 .Ltmp6, reg, 17
- .short .Ltmp47-.Ltmp46 # Record length
-.Ltmp46:
- .short 4414 # Record kind: S_LOCAL
- .long 4118 # TypeIndex
- .short 0 # Flags
- .asciz "func_local"
- .p2align 2
-.Ltmp47:
- .cv_def_range .Ltmp4 .Ltmp6, frame_ptr_rel, 48
- .short 2 # Record length
- .short 4430 # Record kind: S_INLINESITE_END
- .short 2 # Record length
- .short 4430 # Record kind: S_INLINESITE_END
- .short 2 # Record length
- .short 4430 # Record kind: S_INLINESITE_END
- .short 2 # Record length
- .short 4431 # Record kind: S_PROC_ID_END
-.Ltmp19:
- .p2align 2
- .cv_linetable 0, main, .Lfunc_end0
- .section .debug$S,"dr"
- .long 241
- .long .Ltmp49-.Ltmp48 # Subsection size
-.Ltmp48:
- .short .Ltmp51-.Ltmp50 # Record length
-.Ltmp50:
- .short 4360 # Record kind: S_UDT
- .long 4103 # Type
- .asciz "Class1"
- .p2align 2
-.Ltmp51:
- .short .Ltmp53-.Ltmp52 # Record length
-.Ltmp52:
- .short 4360 # Record kind: S_UDT
- .long 4110 # Type
- .asciz "Namespace2::Class2"
- .p2align 2
-.Ltmp53:
-.Ltmp49:
- .p2align 2
- .cv_filechecksums # File index to string table offset subsection
- .cv_stringtable # String table
- .long 241
- .long .Ltmp55-.Ltmp54 # Subsection size
-.Ltmp54:
- .short .Ltmp57-.Ltmp56 # Record length
-.Ltmp56:
- .short 4428 # Record kind: S_BUILDINFO
- .long 4124 # LF_BUILDINFO index
- .p2align 2
-.Ltmp57:
-.Ltmp55:
- .p2align 2
- .section .debug$T,"dr"
- .p2align 2
- .long 4 # Debug section magic
- # StringId (0x1000)
- .short 0x12 # Record length
- .short 0x1605 # Record kind: LF_STRING_ID
- .long 0x0 # Id
- .asciz "Namespace1" # StringData
- .byte 241
- # ArgList (0x1001)
- .short 0xa # Record length
- .short 0x1201 # Record kind: LF_ARGLIST
- .long 0x1 # NumArgs
- .long 0x74 # Argument: int
- # Procedure (0x1002)
- .short 0xe # Record length
- .short 0x1008 # Record kind: LF_PROCEDURE
- .long 0x74 # ReturnType: int
- .byte 0x0 # CallingConvention: NearC
- .byte 0x0 # FunctionOptions
- .short 0x1 # NumParameters
- .long 0x1001 # ArgListType: (int)
- # FuncId (0x1003)
- .short 0xe # Record length
- .short 0x1601 # Record kind: LF_FUNC_ID
- .long 0x1000 # ParentScope: Namespace1
- .long 0x1002 # FunctionType: int (int)
- .asciz "foo" # Name
- # Class (0x1004)
- .short 0x2a # Record length
- .short 0x1504 # Record kind: LF_CLASS
- .short 0x0 # MemberCount
- .short 0x280 # Properties ( ForwardReference (0x80) | HasUniqueName (0x200) )
- .long 0x0 # FieldList
- .long 0x0 # DerivedFrom
- .long 0x0 # VShape
- .short 0x0 # SizeOf
- .asciz "Class1" # Name
- .asciz ".?AVClass1@@" # LinkageName
- .byte 242
- .byte 241
- # MemberFunction (0x1005)
- .short 0x1a # Record length
- .short 0x1009 # Record kind: LF_MFUNCTION
- .long 0x74 # ReturnType: int
- .long 0x1004 # ClassType: Class1
- .long 0x0 # ThisType
- .byte 0x0 # CallingConvention: NearC
- .byte 0x0 # FunctionOptions
- .short 0x1 # NumParameters
- .long 0x1001 # ArgListType: (int)
- .long 0x0 # ThisAdjustment
- # FieldList (0x1006)
- .short 0xe # Record length
- .short 0x1203 # Record kind: LF_FIELDLIST
- .short 0x1511 # Member kind: OneMethod ( LF_ONEMETHOD )
- .short 0xb # Attrs: Public, Static
- .long 0x1005 # Type: int Class1::(int)
- .asciz "bar" # Name
- # Class (0x1007)
- .short 0x2a # Record length
- .short 0x1504 # Record kind: LF_CLASS
- .short 0x1 # MemberCount
- .short 0x200 # Properties ( HasUniqueName (0x200) )
- .long 0x1006 # FieldList: <field list>
- .long 0x0 # DerivedFrom
- .long 0x0 # VShape
- .short 0x1 # SizeOf
- .asciz "Class1" # Name
- .asciz ".?AVClass1@@" # LinkageName
- .byte 242
- .byte 241
- # StringId (0x1008)
- .short 0x12 # Record length
- .short 0x1605 # Record kind: LF_STRING_ID
- .long 0x0 # Id
- .asciz "/tmp/./b.h" # StringData
- .byte 241
- # UdtSourceLine (0x1009)
- .short 0xe # Record length
- .short 0x1606 # Record kind: LF_UDT_SRC_LINE
- .long 0x1007 # UDT: Class1
- .long 0x1008 # SourceFile: /tmp/./b.h
- .long 0x2 # LineNumber
- # MemberFuncId (0x100A)
- .short 0xe # Record length
- .short 0x1602 # Record kind: LF_MFUNC_ID
- .long 0x1004 # ClassType: Class1
- .long 0x1005 # FunctionType: int Class1::(int)
- .asciz "bar" # Name
- # Class (0x100B)
- .short 0x42 # Record length
- .short 0x1504 # Record kind: LF_CLASS
- .short 0x0 # MemberCount
- .short 0x280 # Properties ( ForwardReference (0x80) | HasUniqueName (0x200) )
- .long 0x0 # FieldList
- .long 0x0 # DerivedFrom
- .long 0x0 # VShape
- .short 0x0 # SizeOf
- .asciz "Namespace2::Class2" # Name
- .asciz ".?AVClass2 at Namespace2@@" # LinkageName
- .byte 243
- .byte 242
- .byte 241
- # MemberFunction (0x100C)
- .short 0x1a # Record length
- .short 0x1009 # Record kind: LF_MFUNCTION
- .long 0x74 # ReturnType: int
- .long 0x100b # ClassType: Namespace2::Class2
- .long 0x0 # ThisType
- .byte 0x0 # CallingConvention: NearC
- .byte 0x0 # FunctionOptions
- .short 0x1 # NumParameters
- .long 0x1001 # ArgListType: (int)
- .long 0x0 # ThisAdjustment
- # FieldList (0x100D)
- .short 0x12 # Record length
- .short 0x1203 # Record kind: LF_FIELDLIST
- .short 0x1511 # Member kind: OneMethod ( LF_ONEMETHOD )
- .short 0xb # Attrs: Public, Static
- .long 0x100c # Type: int Namespace2::Class2::(int)
- .asciz "func" # Name
- .byte 243
- .byte 242
- .byte 241
- # Class (0x100E)
- .short 0x42 # Record length
- .short 0x1504 # Record kind: LF_CLASS
- .short 0x1 # MemberCount
- .short 0x200 # Properties ( HasUniqueName (0x200) )
- .long 0x100d # FieldList: <field list>
- .long 0x0 # DerivedFrom
- .long 0x0 # VShape
- .short 0x1 # SizeOf
- .asciz "Namespace2::Class2" # Name
- .asciz ".?AVClass2 at Namespace2@@" # LinkageName
- .byte 243
- .byte 242
- .byte 241
- # StringId (0x100F)
- .short 0x12 # Record length
- .short 0x1605 # Record kind: LF_STRING_ID
- .long 0x0 # Id
- .asciz "/tmp/./c.h" # StringData
- .byte 241
- # UdtSourceLine (0x1010)
- .short 0xe # Record length
- .short 0x1606 # Record kind: LF_UDT_SRC_LINE
- .long 0x100e # UDT: Namespace2::Class2
- .long 0x100f # SourceFile: /tmp/./c.h
- .long 0x2 # LineNumber
- # MemberFuncId (0x1011)
- .short 0x12 # Record length
- .short 0x1602 # Record kind: LF_MFUNC_ID
- .long 0x100b # ClassType: Namespace2::Class2
- .long 0x100c # FunctionType: int Namespace2::Class2::(int)
- .asciz "func" # Name
- .byte 243
- .byte 242
- .byte 241
- # Pointer (0x1012)
- .short 0xa # Record length
- .short 0x1002 # Record kind: LF_POINTER
- .long 0x670 # PointeeType: char*
- .long 0x1000c # Attrs: [ Type: Near64, Mode: Pointer, SizeOf: 8 ]
- # ArgList (0x1013)
- .short 0xe # Record length
- .short 0x1201 # Record kind: LF_ARGLIST
- .long 0x2 # NumArgs
- .long 0x74 # Argument: int
- .long 0x1012 # Argument: char**
- # Procedure (0x1014)
- .short 0xe # Record length
- .short 0x1008 # Record kind: LF_PROCEDURE
- .long 0x74 # ReturnType: int
- .byte 0x0 # CallingConvention: NearC
- .byte 0x0 # FunctionOptions
- .short 0x2 # NumParameters
- .long 0x1013 # ArgListType: (int, char**)
- # FuncId (0x1015)
- .short 0x12 # Record length
- .short 0x1601 # Record kind: LF_FUNC_ID
- .long 0x0 # ParentScope
- .long 0x1014 # FunctionType: int (int, char**)
- .asciz "main" # Name
- .byte 243
- .byte 242
- .byte 241
- # Modifier (0x1016)
- .short 0xa # Record length
- .short 0x1001 # Record kind: LF_MODIFIER
- .long 0x74 # ModifiedType: int
- .short 0x2 # Modifiers ( Volatile (0x2) )
- .byte 242
- .byte 241
- # StringId (0x1017)
- .short 0xe # Record length
- .short 0x1605 # Record kind: LF_STRING_ID
- .long 0x0 # Id
- .asciz "/tmp" # StringData
- .byte 243
- .byte 242
- .byte 241
- # StringId (0x1018)
- .short 0xe # Record length
- .short 0x1605 # Record kind: LF_STRING_ID
- .long 0x0 # Id
- .asciz "a.cpp" # StringData
- .byte 242
- .byte 241
- # StringId (0x1019)
- .short 0xa # Record length
- .short 0x1605 # Record kind: LF_STRING_ID
- .long 0x0 # Id
- .byte 0 # StringData
- .byte 243
- .byte 242
- .byte 241
- # StringId (0x101A)
- .short 0x4e # Record length
- .short 0x1605 # Record kind: LF_STRING_ID
- .long 0x0 # Id
- .asciz "/usr/local/google/home/zequanwu/llvm-project/build/release/bin/clang" # StringData
- .byte 243
- .byte 242
- .byte 241
- # StringId (0x101B)
- .short 0x9f6 # Record length
- .short 0x1605 # Record kind: LF_STRING_ID
- .long 0x0 # Id
- .asciz "\"-cc1\" \"-triple\" \"x86_64-pc-windows-msvc19.20.0\" \"-S\" \"-disable-free\" \"-clear-ast-before-backend\" \"-disable-llvm-verifier\" \"-discard-value-names\" \"-mrelocation-model\" \"pic\" \"-pic-level\" \"2\" \"-mframe-pointer=none\" \"-relaxed-aliasing\" \"-fmath-errno\" \"-ffp-contract=on\" \"-fno-rounding-math\" \"-mconstructor-aliases\" \"-funwind-tables=2\" \"-target-cpu\" \"x86-64\" \"-mllvm\" \"-x86-asm-syntax=intel\" \"-tune-cpu\" \"generic\" \"-mllvm\" \"-treat-scalable-fixed-error-as-warning\" \"-D_MT\" \"-flto-visibility-public-std\" \"--dependent-lib=libcmt\" \"--dependent-lib=oldnames\" \"-stack-protector\" \"2\" \"-fms-volatile\" \"-fdiagnostics-format\" \"msvc\" \"-gno-column-info\" \"-gcodeview\" \"-debug-info-kind=constructor\" \"-ffunction-sections\" \"-fcoverage-compilation-dir=/tmp\" \"-resource-dir\" \"/usr/local/google/home/zequanwu/llvm-project/build/release/lib/clang/15.0.0\" \"-internal-isystem\" \"/usr/local/google/home/zequanwu/llvm-project/build/release/lib/clang/15.0.0/include\" \"-internal-isystem\" \"/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/DIA SDK/include\" \"-internal-isystem\" \"/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/VC/Tools/MSVC/14.26.28801/include\" \"-internal-isystem\" \"/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/VC/Tools/MSVC/14.26.28801/atlmfc/include\" \"-internal-isystem\" \"/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/Windows Kits/10/Include/10.0.19041.0/ucrt\" \"-internal-isystem\" \"/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/Windows Kits/10/Include/10.0.19041.0/shared\" \"-internal-isystem\" \"/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/Windows Kits/10/Include/10.0.19041.0/um\" \"-internal-isystem\" \"/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/Windows Kits/10/Include/10.0.19041.0/winrt\" \"-internal-isystem\" \"/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/Windows Kits/10/Include/10.0.19041.0/cppwinrt\" \"-Os\" \"-fdeprecated-macro\" \"-fdebug-compilation-dir=/tmp\" \"-ferror-limit\" \"19\" \"-fno-use-cxa-atexit\" \"-fms-extensions\" \"-fms-compatibility\" \"-fms-compatibility-version=19.20\" \"-std=c++14\" \"-fdelayed-template-parsing\" \"-fcolor-diagnostics\" \"-vectorize-loops\" \"-vectorize-slp\" \"-faddrsig\" \"-x\" \"c++\"" # StringData
- .byte 242
- .byte 241
- # BuildInfo (0x101C)
- .short 0x1a # Record length
- .short 0x1603 # Record kind: LF_BUILDINFO
- .short 0x5 # NumArgs
- .long 0x1017 # Argument: /tmp
- .long 0x101a # Argument: /usr/local/google/home/zequanwu/llvm-project/build/release/bin/clang
- .long 0x1018 # Argument: a.cpp
- .long 0x1019 # Argument
- .long 0x101b # Argument: "-cc1" "-triple" "x86_64-pc-windows-msvc19.20.0" "-S" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-mrelocation-model" "pic" "-pic-level" "2" "-mframe-pointer=none" "-relaxed-aliasing" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "x86-64" "-mllvm" "-x86-asm-syntax=intel" "-tune-cpu" "generic" "-mllvm" "-treat-scalable-fixed-error-as-warning" "-D_MT" "-flto-visibility-public-std" "--dependent-lib=libcmt" "--dependent-lib=oldnames" "-stack-protector" "2" "-fms-volatile" "-fdiagnostics-format" "msvc" "-gno-column-info" "-gcodeview" "-debug-info-kind=constructor" "-ffunction-sections" "-fcoverage-compilation-dir=/tmp" "-resource-dir" "/usr/local/google/home/zequanwu/llvm-project/build/release/lib/clang/15.0.0" "-internal-isystem" "/usr/local/google/home/zequanwu/llvm-project/build/release/lib/clang/15.0.0/include" "-internal-isystem" "/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/DIA SDK/include" "-internal-isystem" "/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/VC/Tools/MSVC/14.26.28801/include" "-internal-isystem" "/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/VC/Tools/MSVC/14.26.28801/atlmfc/include" "-internal-isystem" "/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/Windows Kits/10/Include/10.0.19041.0/ucrt" "-internal-isystem" "/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/Windows Kits/10/Include/10.0.19041.0/shared" "-internal-isystem" "/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/Windows Kits/10/Include/10.0.19041.0/um" "-internal-isystem" "/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/Windows Kits/10/Include/10.0.19041.0/winrt" "-internal-isystem" "/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/Windows Kits/10/Include/10.0.19041.0/cppwinrt" "-Os" "-fdeprecated-macro" "-fdebug-compilation-dir=/tmp" "-ferror-limit" "19" "-fno-use-cxa-atexit" "-fms-extensions" "-fms-compatibility" "-fms-compatibility-version=19.20" "-std=c++14" "-fdelayed-template-parsing" "-fcolor-diagnostics" "-vectorize-loops" "-vectorize-slp" "-faddrsig" "-x" "c++"
- .byte 242
- .byte 241
- .addrsig
+# Compiled from the following files, but replaced the call to abort with nop.
+# clang-cl -fuse-ld=lld-link /Z7 /O1 /Faa.asm /winsysroot~/win_toolchain a.cpp
+# a.cpp:
+# #include "a.h"
+# int main(int argc, char** argv) {
+# volatile int main_local = Namespace1::foo(2);
+# return 0;
+# }
+# a.h:
+# #include <stdlib.h>
+# #include "b.h"
+# namespace Namespace1 {
+# inline int foo(int x) {
+# volatile int foo_local = x + 1;
+# ++foo_local;
+# if (!foo_local)
+# abort();
+# return Class1::bar(foo_local);
+# }
+# } // namespace Namespace1
+# b.h:
+# #include "c.h"
+# class Class1 {
+# public:
+# inline static int bar(int x) {
+# volatile int bar_local = x + 1;
+# ++bar_local;
+# return Namespace2::Class2::func(bar_local);
+# }
+# };
+# c.h:
+# namespace Namespace2 {
+# class Class2 {
+# public:
+# inline static int func(int x) {
+# volatile int func_local = x + 1;
+# func_local += x;
+# return func_local;
+# }
+# };
+# } // namespace Namespace2
+
+ .text
+ .def @feat.00;
+ .scl 3;
+ .type 0;
+ .endef
+ .globl @feat.00
+.set @feat.00, 0
+ .intel_syntax noprefix
+ .file "a.cpp"
+ .def main;
+ .scl 2;
+ .type 32;
+ .endef
+ .section .text,"xr",one_only,main
+ .globl main # -- Begin function main
+main: # @main
+.Lfunc_begin0:
+ .cv_func_id 0
+ .cv_file 1 "/tmp/a.cpp" "4FFB96E5DF1A95CE7DB9732CFFE001D7" 1
+ .cv_loc 0 1 2 0 # a.cpp:2:0
+.seh_proc main
+# %bb.0:
+ #DEBUG_VALUE: main:argv <- $rdx
+ #DEBUG_VALUE: main:argc <- $ecx
+ #DEBUG_VALUE: foo:x <- 2
+ sub rsp, 56
+ .seh_stackalloc 56
+ .seh_endprologue
+.Ltmp0:
+ .cv_file 2 "/tmp/./a.h" "BBFED90EF093E9C1D032CC9B05B5D167" 1
+ .cv_inline_site_id 1 within 0 inlined_at 1 3 0
+ .cv_loc 1 2 5 0 # ./a.h:5:0
+ mov dword ptr [rsp + 44], 3
+ .cv_loc 1 2 6 0 # ./a.h:6:0
+ inc dword ptr [rsp + 44]
+ .cv_loc 1 2 7 0 # ./a.h:7:0
+ mov eax, dword ptr [rsp + 44]
+ test eax, eax
+ je .LBB0_2
+.Ltmp1:
+# %bb.1:
+ #DEBUG_VALUE: main:argv <- $rdx
+ #DEBUG_VALUE: main:argc <- $ecx
+ #DEBUG_VALUE: foo:x <- 2
+ .cv_loc 1 2 9 0 # ./a.h:9:0
+ mov eax, dword ptr [rsp + 44]
+.Ltmp2:
+ #DEBUG_VALUE: bar:x <- $eax
+ .cv_file 3 "/tmp/./b.h" "A26CC743A260115F33AF91AB11F95877" 1
+ .cv_inline_site_id 2 within 1 inlined_at 2 9 0
+ .cv_loc 2 3 5 0 # ./b.h:5:0
+ inc eax
+.Ltmp3:
+ mov dword ptr [rsp + 52], eax
+ .cv_loc 2 3 6 0 # ./b.h:6:0
+ inc dword ptr [rsp + 52]
+ .cv_loc 2 3 7 0 # ./b.h:7:0
+ mov eax, dword ptr [rsp + 52]
+.Ltmp4:
+ #DEBUG_VALUE: func:x <- $eax
+ .cv_file 4 "/tmp/./c.h" "8AF4613F78624BBE96D1C408ABA39B2D" 1
+ .cv_inline_site_id 3 within 2 inlined_at 3 7 0
+ .cv_loc 3 4 5 0 # ./c.h:5:0
+ lea ecx, [rax + 1]
+.Ltmp5:
+ #DEBUG_VALUE: main:argc <- [DW_OP_LLVM_entry_value 1] $ecx
+ mov dword ptr [rsp + 48], ecx
+ .cv_loc 3 4 6 0 # ./c.h:6:0
+ add dword ptr [rsp + 48], eax
+ .cv_loc 3 4 7 0 # ./c.h:7:0
+ mov eax, dword ptr [rsp + 48]
+.Ltmp6:
+ .cv_loc 0 1 3 0 # a.cpp:3:0
+ mov dword ptr [rsp + 48], eax
+ .cv_loc 0 1 4 0 # a.cpp:4:0
+ xor eax, eax
+ # Use fake debug info to tests inline info.
+ .cv_loc 1 2 20 0
+ add rsp, 56
+ ret
+.Ltmp7:
+.LBB0_2:
+ #DEBUG_VALUE: main:argv <- $rdx
+ #DEBUG_VALUE: main:argc <- $ecx
+ #DEBUG_VALUE: foo:x <- 2
+ .cv_loc 1 2 8 0 # ./a.h:8:0
+ nop
+.Ltmp8:
+ int3
+.Ltmp9:
+ #DEBUG_VALUE: main:argc <- [DW_OP_LLVM_entry_value 1] $ecx
+ #DEBUG_VALUE: main:argv <- [DW_OP_LLVM_entry_value 1] $rdx
+.Lfunc_end0:
+ .seh_endproc
+ # -- End function
+ .section .drectve,"yn"
+ .ascii " /DEFAULTLIB:libcmt.lib"
+ .ascii " /DEFAULTLIB:oldnames.lib"
+ .section .debug$S,"dr"
+ .p2align 2
+ .long 4 # Debug section magic
+ .long 241
+ .long .Ltmp11-.Ltmp10 # Subsection size
+.Ltmp10:
+ .short .Ltmp13-.Ltmp12 # Record length
+.Ltmp12:
+ .short 4353 # Record kind: S_OBJNAME
+ .long 0 # Signature
+ .asciz "/tmp/a-2b2ba0.obj" # Object name
+ .p2align 2
+.Ltmp13:
+ .short .Ltmp15-.Ltmp14 # Record length
+.Ltmp14:
+ .short 4412 # Record kind: S_COMPILE3
+ .long 1 # Flags and language
+ .short 208 # CPUType
+ .short 15 # Frontend version
+ .short 0
+ .short 0
+ .short 0
+ .short 15000 # Backend version
+ .short 0
+ .short 0
+ .short 0
+ .asciz "clang version 15.0.0" # Null-terminated compiler version string
+ .p2align 2
+.Ltmp15:
+.Ltmp11:
+ .p2align 2
+ .long 246 # Inlinee lines subsection
+ .long .Ltmp17-.Ltmp16 # Subsection size
+.Ltmp16:
+ .long 0 # Inlinee lines signature
+
+ # Inlined function foo starts at ./a.h:4
+ .long 4099 # Type index of inlined function
+ .cv_filechecksumoffset 2 # Offset into filechecksum table
+ .long 4 # Starting line number
+
+ # Inlined function bar starts at ./b.h:4
+ .long 4106 # Type index of inlined function
+ .cv_filechecksumoffset 3 # Offset into filechecksum table
+ .long 4 # Starting line number
+
+ # Inlined function func starts at ./c.h:4
+ .long 4113 # Type index of inlined function
+ .cv_filechecksumoffset 4 # Offset into filechecksum table
+ .long 4 # Starting line number
+.Ltmp17:
+ .p2align 2
+ .section .debug$S,"dr",associative,main
+ .p2align 2
+ .long 4 # Debug section magic
+ .long 241 # Symbol subsection for main
+ .long .Ltmp19-.Ltmp18 # Subsection size
+.Ltmp18:
+ .short .Ltmp21-.Ltmp20 # Record length
+.Ltmp20:
+ .short 4423 # Record kind: S_GPROC32_ID
+ .long 0 # PtrParent
+ .long 0 # PtrEnd
+ .long 0 # PtrNext
+ .long .Lfunc_end0-main # Code size
+ .long 0 # Offset after prologue
+ .long 0 # Offset before epilogue
+ .long 4117 # Function type index
+ .secrel32 main # Function section relative address
+ .secidx main # Function section index
+ .byte 0 # Flags
+ .asciz "main" # Function name
+ .p2align 2
+.Ltmp21:
+ .short .Ltmp23-.Ltmp22 # Record length
+.Ltmp22:
+ .short 4114 # Record kind: S_FRAMEPROC
+ .long 56 # FrameSize
+ .long 0 # Padding
+ .long 0 # Offset of padding
+ .long 0 # Bytes of callee saved registers
+ .long 0 # Exception handler offset
+ .short 0 # Exception handler section
+ .long 81920 # Flags (defines frame register)
+ .p2align 2
+.Ltmp23:
+ .short .Ltmp25-.Ltmp24 # Record length
+.Ltmp24:
+ .short 4414 # Record kind: S_LOCAL
+ .long 116 # TypeIndex
+ .short 1 # Flags
+ .asciz "argc"
+ .p2align 2
+.Ltmp25:
+ .cv_def_range .Lfunc_begin0 .Ltmp5 .Ltmp7 .Ltmp8, reg, 18
+ .short .Ltmp27-.Ltmp26 # Record length
+.Ltmp26:
+ .short 4414 # Record kind: S_LOCAL
+ .long 4114 # TypeIndex
+ .short 1 # Flags
+ .asciz "argv"
+ .p2align 2
+.Ltmp27:
+ .cv_def_range .Lfunc_begin0 .Ltmp8, reg, 331
+ .short .Ltmp29-.Ltmp28 # Record length
+.Ltmp28:
+ .short 4414 # Record kind: S_LOCAL
+ .long 4118 # TypeIndex
+ .short 0 # Flags
+ .asciz "main_local"
+ .p2align 2
+.Ltmp29:
+ .cv_def_range .Ltmp0 .Ltmp9, frame_ptr_rel, 48
+ .short .Ltmp31-.Ltmp30 # Record length
+.Ltmp30:
+ .short 4429 # Record kind: S_INLINESITE
+ .long 0 # PtrParent
+ .long 0 # PtrEnd
+ .long 4099 # Inlinee type index
+ .cv_inline_linetable 1 2 4 .Lfunc_begin0 .Lfunc_end0
+ .p2align 2
+.Ltmp31:
+ .short .Ltmp33-.Ltmp32 # Record length
+.Ltmp32:
+ .short 4414 # Record kind: S_LOCAL
+ .long 116 # TypeIndex
+ .short 257 # Flags
+ .asciz "x"
+ .p2align 2
+.Ltmp33:
+ .short .Ltmp35-.Ltmp34 # Record length
+.Ltmp34:
+ .short 4414 # Record kind: S_LOCAL
+ .long 4118 # TypeIndex
+ .short 0 # Flags
+ .asciz "foo_local"
+ .p2align 2
+.Ltmp35:
+ .cv_def_range .Ltmp0 .Ltmp6 .Ltmp7 .Ltmp9, frame_ptr_rel, 44
+ .short .Ltmp37-.Ltmp36 # Record length
+.Ltmp36:
+ .short 4429 # Record kind: S_INLINESITE
+ .long 0 # PtrParent
+ .long 0 # PtrEnd
+ .long 4106 # Inlinee type index
+ .cv_inline_linetable 2 3 4 .Lfunc_begin0 .Lfunc_end0
+ .p2align 2
+.Ltmp37:
+ .short .Ltmp39-.Ltmp38 # Record length
+.Ltmp38:
+ .short 4414 # Record kind: S_LOCAL
+ .long 116 # TypeIndex
+ .short 1 # Flags
+ .asciz "x"
+ .p2align 2
+.Ltmp39:
+ .cv_def_range .Ltmp2 .Ltmp3, reg, 17
+ .short .Ltmp41-.Ltmp40 # Record length
+.Ltmp40:
+ .short 4414 # Record kind: S_LOCAL
+ .long 4118 # TypeIndex
+ .short 0 # Flags
+ .asciz "bar_local"
+ .p2align 2
+.Ltmp41:
+ .cv_def_range .Ltmp2 .Ltmp6, frame_ptr_rel, 52
+ .short .Ltmp43-.Ltmp42 # Record length
+.Ltmp42:
+ .short 4429 # Record kind: S_INLINESITE
+ .long 0 # PtrParent
+ .long 0 # PtrEnd
+ .long 4113 # Inlinee type index
+ .cv_inline_linetable 3 4 4 .Lfunc_begin0 .Lfunc_end0
+ .p2align 2
+.Ltmp43:
+ .short .Ltmp45-.Ltmp44 # Record length
+.Ltmp44:
+ .short 4414 # Record kind: S_LOCAL
+ .long 116 # TypeIndex
+ .short 1 # Flags
+ .asciz "x"
+ .p2align 2
+.Ltmp45:
+ .cv_def_range .Ltmp4 .Ltmp6, reg, 17
+ .short .Ltmp47-.Ltmp46 # Record length
+.Ltmp46:
+ .short 4414 # Record kind: S_LOCAL
+ .long 4118 # TypeIndex
+ .short 0 # Flags
+ .asciz "func_local"
+ .p2align 2
+.Ltmp47:
+ .cv_def_range .Ltmp4 .Ltmp6, frame_ptr_rel, 48
+ .short 2 # Record length
+ .short 4430 # Record kind: S_INLINESITE_END
+ .short 2 # Record length
+ .short 4430 # Record kind: S_INLINESITE_END
+ .short 2 # Record length
+ .short 4430 # Record kind: S_INLINESITE_END
+ .short 2 # Record length
+ .short 4431 # Record kind: S_PROC_ID_END
+.Ltmp19:
+ .p2align 2
+ .cv_linetable 0, main, .Lfunc_end0
+ .section .debug$S,"dr"
+ .long 241
+ .long .Ltmp49-.Ltmp48 # Subsection size
+.Ltmp48:
+ .short .Ltmp51-.Ltmp50 # Record length
+.Ltmp50:
+ .short 4360 # Record kind: S_UDT
+ .long 4103 # Type
+ .asciz "Class1"
+ .p2align 2
+.Ltmp51:
+ .short .Ltmp53-.Ltmp52 # Record length
+.Ltmp52:
+ .short 4360 # Record kind: S_UDT
+ .long 4110 # Type
+ .asciz "Namespace2::Class2"
+ .p2align 2
+.Ltmp53:
+.Ltmp49:
+ .p2align 2
+ .cv_filechecksums # File index to string table offset subsection
+ .cv_stringtable # String table
+ .long 241
+ .long .Ltmp55-.Ltmp54 # Subsection size
+.Ltmp54:
+ .short .Ltmp57-.Ltmp56 # Record length
+.Ltmp56:
+ .short 4428 # Record kind: S_BUILDINFO
+ .long 4124 # LF_BUILDINFO index
+ .p2align 2
+.Ltmp57:
+.Ltmp55:
+ .p2align 2
+ .section .debug$T,"dr"
+ .p2align 2
+ .long 4 # Debug section magic
+ # StringId (0x1000)
+ .short 0x12 # Record length
+ .short 0x1605 # Record kind: LF_STRING_ID
+ .long 0x0 # Id
+ .asciz "Namespace1" # StringData
+ .byte 241
+ # ArgList (0x1001)
+ .short 0xa # Record length
+ .short 0x1201 # Record kind: LF_ARGLIST
+ .long 0x1 # NumArgs
+ .long 0x74 # Argument: int
+ # Procedure (0x1002)
+ .short 0xe # Record length
+ .short 0x1008 # Record kind: LF_PROCEDURE
+ .long 0x74 # ReturnType: int
+ .byte 0x0 # CallingConvention: NearC
+ .byte 0x0 # FunctionOptions
+ .short 0x1 # NumParameters
+ .long 0x1001 # ArgListType: (int)
+ # FuncId (0x1003)
+ .short 0xe # Record length
+ .short 0x1601 # Record kind: LF_FUNC_ID
+ .long 0x1000 # ParentScope: Namespace1
+ .long 0x1002 # FunctionType: int (int)
+ .asciz "foo" # Name
+ # Class (0x1004)
+ .short 0x2a # Record length
+ .short 0x1504 # Record kind: LF_CLASS
+ .short 0x0 # MemberCount
+ .short 0x280 # Properties ( ForwardReference (0x80) | HasUniqueName (0x200) )
+ .long 0x0 # FieldList
+ .long 0x0 # DerivedFrom
+ .long 0x0 # VShape
+ .short 0x0 # SizeOf
+ .asciz "Class1" # Name
+ .asciz ".?AVClass1@@" # LinkageName
+ .byte 242
+ .byte 241
+ # MemberFunction (0x1005)
+ .short 0x1a # Record length
+ .short 0x1009 # Record kind: LF_MFUNCTION
+ .long 0x74 # ReturnType: int
+ .long 0x1004 # ClassType: Class1
+ .long 0x0 # ThisType
+ .byte 0x0 # CallingConvention: NearC
+ .byte 0x0 # FunctionOptions
+ .short 0x1 # NumParameters
+ .long 0x1001 # ArgListType: (int)
+ .long 0x0 # ThisAdjustment
+ # FieldList (0x1006)
+ .short 0xe # Record length
+ .short 0x1203 # Record kind: LF_FIELDLIST
+ .short 0x1511 # Member kind: OneMethod ( LF_ONEMETHOD )
+ .short 0xb # Attrs: Public, Static
+ .long 0x1005 # Type: int Class1::(int)
+ .asciz "bar" # Name
+ # Class (0x1007)
+ .short 0x2a # Record length
+ .short 0x1504 # Record kind: LF_CLASS
+ .short 0x1 # MemberCount
+ .short 0x200 # Properties ( HasUniqueName (0x200) )
+ .long 0x1006 # FieldList: <field list>
+ .long 0x0 # DerivedFrom
+ .long 0x0 # VShape
+ .short 0x1 # SizeOf
+ .asciz "Class1" # Name
+ .asciz ".?AVClass1@@" # LinkageName
+ .byte 242
+ .byte 241
+ # StringId (0x1008)
+ .short 0x12 # Record length
+ .short 0x1605 # Record kind: LF_STRING_ID
+ .long 0x0 # Id
+ .asciz "/tmp/./b.h" # StringData
+ .byte 241
+ # UdtSourceLine (0x1009)
+ .short 0xe # Record length
+ .short 0x1606 # Record kind: LF_UDT_SRC_LINE
+ .long 0x1007 # UDT: Class1
+ .long 0x1008 # SourceFile: /tmp/./b.h
+ .long 0x2 # LineNumber
+ # MemberFuncId (0x100A)
+ .short 0xe # Record length
+ .short 0x1602 # Record kind: LF_MFUNC_ID
+ .long 0x1004 # ClassType: Class1
+ .long 0x1005 # FunctionType: int Class1::(int)
+ .asciz "bar" # Name
+ # Class (0x100B)
+ .short 0x42 # Record length
+ .short 0x1504 # Record kind: LF_CLASS
+ .short 0x0 # MemberCount
+ .short 0x280 # Properties ( ForwardReference (0x80) | HasUniqueName (0x200) )
+ .long 0x0 # FieldList
+ .long 0x0 # DerivedFrom
+ .long 0x0 # VShape
+ .short 0x0 # SizeOf
+ .asciz "Namespace2::Class2" # Name
+ .asciz ".?AVClass2 at Namespace2@@" # LinkageName
+ .byte 243
+ .byte 242
+ .byte 241
+ # MemberFunction (0x100C)
+ .short 0x1a # Record length
+ .short 0x1009 # Record kind: LF_MFUNCTION
+ .long 0x74 # ReturnType: int
+ .long 0x100b # ClassType: Namespace2::Class2
+ .long 0x0 # ThisType
+ .byte 0x0 # CallingConvention: NearC
+ .byte 0x0 # FunctionOptions
+ .short 0x1 # NumParameters
+ .long 0x1001 # ArgListType: (int)
+ .long 0x0 # ThisAdjustment
+ # FieldList (0x100D)
+ .short 0x12 # Record length
+ .short 0x1203 # Record kind: LF_FIELDLIST
+ .short 0x1511 # Member kind: OneMethod ( LF_ONEMETHOD )
+ .short 0xb # Attrs: Public, Static
+ .long 0x100c # Type: int Namespace2::Class2::(int)
+ .asciz "func" # Name
+ .byte 243
+ .byte 242
+ .byte 241
+ # Class (0x100E)
+ .short 0x42 # Record length
+ .short 0x1504 # Record kind: LF_CLASS
+ .short 0x1 # MemberCount
+ .short 0x200 # Properties ( HasUniqueName (0x200) )
+ .long 0x100d # FieldList: <field list>
+ .long 0x0 # DerivedFrom
+ .long 0x0 # VShape
+ .short 0x1 # SizeOf
+ .asciz "Namespace2::Class2" # Name
+ .asciz ".?AVClass2 at Namespace2@@" # LinkageName
+ .byte 243
+ .byte 242
+ .byte 241
+ # StringId (0x100F)
+ .short 0x12 # Record length
+ .short 0x1605 # Record kind: LF_STRING_ID
+ .long 0x0 # Id
+ .asciz "/tmp/./c.h" # StringData
+ .byte 241
+ # UdtSourceLine (0x1010)
+ .short 0xe # Record length
+ .short 0x1606 # Record kind: LF_UDT_SRC_LINE
+ .long 0x100e # UDT: Namespace2::Class2
+ .long 0x100f # SourceFile: /tmp/./c.h
+ .long 0x2 # LineNumber
+ # MemberFuncId (0x1011)
+ .short 0x12 # Record length
+ .short 0x1602 # Record kind: LF_MFUNC_ID
+ .long 0x100b # ClassType: Namespace2::Class2
+ .long 0x100c # FunctionType: int Namespace2::Class2::(int)
+ .asciz "func" # Name
+ .byte 243
+ .byte 242
+ .byte 241
+ # Pointer (0x1012)
+ .short 0xa # Record length
+ .short 0x1002 # Record kind: LF_POINTER
+ .long 0x670 # PointeeType: char*
+ .long 0x1000c # Attrs: [ Type: Near64, Mode: Pointer, SizeOf: 8 ]
+ # ArgList (0x1013)
+ .short 0xe # Record length
+ .short 0x1201 # Record kind: LF_ARGLIST
+ .long 0x2 # NumArgs
+ .long 0x74 # Argument: int
+ .long 0x1012 # Argument: char**
+ # Procedure (0x1014)
+ .short 0xe # Record length
+ .short 0x1008 # Record kind: LF_PROCEDURE
+ .long 0x74 # ReturnType: int
+ .byte 0x0 # CallingConvention: NearC
+ .byte 0x0 # FunctionOptions
+ .short 0x2 # NumParameters
+ .long 0x1013 # ArgListType: (int, char**)
+ # FuncId (0x1015)
+ .short 0x12 # Record length
+ .short 0x1601 # Record kind: LF_FUNC_ID
+ .long 0x0 # ParentScope
+ .long 0x1014 # FunctionType: int (int, char**)
+ .asciz "main" # Name
+ .byte 243
+ .byte 242
+ .byte 241
+ # Modifier (0x1016)
+ .short 0xa # Record length
+ .short 0x1001 # Record kind: LF_MODIFIER
+ .long 0x74 # ModifiedType: int
+ .short 0x2 # Modifiers ( Volatile (0x2) )
+ .byte 242
+ .byte 241
+ # StringId (0x1017)
+ .short 0xe # Record length
+ .short 0x1605 # Record kind: LF_STRING_ID
+ .long 0x0 # Id
+ .asciz "/tmp" # StringData
+ .byte 243
+ .byte 242
+ .byte 241
+ # StringId (0x1018)
+ .short 0xe # Record length
+ .short 0x1605 # Record kind: LF_STRING_ID
+ .long 0x0 # Id
+ .asciz "a.cpp" # StringData
+ .byte 242
+ .byte 241
+ # StringId (0x1019)
+ .short 0xa # Record length
+ .short 0x1605 # Record kind: LF_STRING_ID
+ .long 0x0 # Id
+ .byte 0 # StringData
+ .byte 243
+ .byte 242
+ .byte 241
+ # StringId (0x101A)
+ .short 0x4e # Record length
+ .short 0x1605 # Record kind: LF_STRING_ID
+ .long 0x0 # Id
+ .asciz "/usr/local/google/home/zequanwu/llvm-project/build/release/bin/clang" # StringData
+ .byte 243
+ .byte 242
+ .byte 241
+ # StringId (0x101B)
+ .short 0x9f6 # Record length
+ .short 0x1605 # Record kind: LF_STRING_ID
+ .long 0x0 # Id
+ .asciz "\"-cc1\" \"-triple\" \"x86_64-pc-windows-msvc19.20.0\" \"-S\" \"-disable-free\" \"-clear-ast-before-backend\" \"-disable-llvm-verifier\" \"-discard-value-names\" \"-mrelocation-model\" \"pic\" \"-pic-level\" \"2\" \"-mframe-pointer=none\" \"-relaxed-aliasing\" \"-fmath-errno\" \"-ffp-contract=on\" \"-fno-rounding-math\" \"-mconstructor-aliases\" \"-funwind-tables=2\" \"-target-cpu\" \"x86-64\" \"-mllvm\" \"-x86-asm-syntax=intel\" \"-tune-cpu\" \"generic\" \"-mllvm\" \"-treat-scalable-fixed-error-as-warning\" \"-D_MT\" \"-flto-visibility-public-std\" \"--dependent-lib=libcmt\" \"--dependent-lib=oldnames\" \"-stack-protector\" \"2\" \"-fms-volatile\" \"-fdiagnostics-format\" \"msvc\" \"-gno-column-info\" \"-gcodeview\" \"-debug-info-kind=constructor\" \"-ffunction-sections\" \"-fcoverage-compilation-dir=/tmp\" \"-resource-dir\" \"/usr/local/google/home/zequanwu/llvm-project/build/release/lib/clang/15.0.0\" \"-internal-isystem\" \"/usr/local/google/home/zequanwu/llvm-project/build/release/lib/clang/15.0.0/include\" \"-internal-isystem\" \"/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/DIA SDK/include\" \"-internal-isystem\" \"/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/VC/Tools/MSVC/14.26.28801/include\" \"-internal-isystem\" \"/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/VC/Tools/MSVC/14.26.28801/atlmfc/include\" \"-internal-isystem\" \"/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/Windows Kits/10/Include/10.0.19041.0/ucrt\" \"-internal-isystem\" \"/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/Windows Kits/10/Include/10.0.19041.0/shared\" \"-internal-isystem\" \"/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/Windows Kits/10/Include/10.0.19041.0/um\" \"-internal-isystem\" \"/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/Windows Kits/10/Include/10.0.19041.0/winrt\" \"-internal-isystem\" \"/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/Windows Kits/10/Include/10.0.19041.0/cppwinrt\" \"-Os\" \"-fdeprecated-macro\" \"-fdebug-compilation-dir=/tmp\" \"-ferror-limit\" \"19\" \"-fno-use-cxa-atexit\" \"-fms-extensions\" \"-fms-compatibility\" \"-fms-compatibility-version=19.20\" \"-std=c++14\" \"-fdelayed-template-parsing\" \"-fcolor-diagnostics\" \"-vectorize-loops\" \"-vectorize-slp\" \"-faddrsig\" \"-x\" \"c++\"" # StringData
+ .byte 242
+ .byte 241
+ # BuildInfo (0x101C)
+ .short 0x1a # Record length
+ .short 0x1603 # Record kind: LF_BUILDINFO
+ .short 0x5 # NumArgs
+ .long 0x1017 # Argument: /tmp
+ .long 0x101a # Argument: /usr/local/google/home/zequanwu/llvm-project/build/release/bin/clang
+ .long 0x1018 # Argument: a.cpp
+ .long 0x1019 # Argument
+ .long 0x101b # Argument: "-cc1" "-triple" "x86_64-pc-windows-msvc19.20.0" "-S" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-mrelocation-model" "pic" "-pic-level" "2" "-mframe-pointer=none" "-relaxed-aliasing" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "x86-64" "-mllvm" "-x86-asm-syntax=intel" "-tune-cpu" "generic" "-mllvm" "-treat-scalable-fixed-error-as-warning" "-D_MT" "-flto-visibility-public-std" "--dependent-lib=libcmt" "--dependent-lib=oldnames" "-stack-protector" "2" "-fms-volatile" "-fdiagnostics-format" "msvc" "-gno-column-info" "-gcodeview" "-debug-info-kind=constructor" "-ffunction-sections" "-fcoverage-compilation-dir=/tmp" "-resource-dir" "/usr/local/google/home/zequanwu/llvm-project/build/release/lib/clang/15.0.0" "-internal-isystem" "/usr/local/google/home/zequanwu/llvm-project/build/release/lib/clang/15.0.0/include" "-internal-isystem" "/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/DIA SDK/include" "-internal-isystem" "/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/VC/Tools/MSVC/14.26.28801/include" "-internal-isystem" "/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/VC/Tools/MSVC/14.26.28801/atlmfc/include" "-internal-isystem" "/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/Windows Kits/10/Include/10.0.19041.0/ucrt" "-internal-isystem" "/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/Windows Kits/10/Include/10.0.19041.0/shared" "-internal-isystem" "/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/Windows Kits/10/Include/10.0.19041.0/um" "-internal-isystem" "/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/Windows Kits/10/Include/10.0.19041.0/winrt" "-internal-isystem" "/usr/local/google/home/zequanwu/chromium/src/third_party/depot_tools/win_toolchain/vs_files/3bda71a11e/Windows Kits/10/Include/10.0.19041.0/cppwinrt" "-Os" "-fdeprecated-macro" "-fdebug-compilation-dir=/tmp" "-ferror-limit" "19" "-fno-use-cxa-atexit" "-fms-extensions" "-fms-compatibility" "-fms-compatibility-version=19.20" "-std=c++14" "-fdelayed-template-parsing" "-fcolor-diagnostics" "-vectorize-loops" "-vectorize-slp" "-faddrsig" "-x" "c++"
+ .byte 242
+ .byte 241
+ .addrsig
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/inline_sites_live.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/inline_sites_live.lldbinit
index 2291c7c4527175..eab5061dafbdcd 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/inline_sites_live.lldbinit
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/inline_sites_live.lldbinit
@@ -1,7 +1,7 @@
-br set -p BP_bar -f inline_sites_live.cpp
-br set -p BP_foo -f inline_sites_live.cpp
-run
-expression param
-continue
-expression param
-expression local
+br set -p BP_bar -f inline_sites_live.cpp
+br set -p BP_foo -f inline_sites_live.cpp
+run
+expression param
+continue
+expression param
+expression local
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/local-variables-registers.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/local-variables-registers.lldbinit
index ad080da24dab71..feda7485675792 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/local-variables-registers.lldbinit
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/local-variables-registers.lldbinit
@@ -1,35 +1,35 @@
-image lookup -a 0x140001000 -v
-image lookup -a 0x140001003 -v
-image lookup -a 0x140001006 -v
-
-image lookup -a 0x140001011 -v
-image lookup -a 0x140001017 -v
-image lookup -a 0x140001019 -v
-image lookup -a 0x14000101e -v
-image lookup -a 0x14000102c -v
-
-image lookup -a 0x140001031 -v
-image lookup -a 0x140001032 -v
-image lookup -a 0x140001033 -v
-image lookup -a 0x140001034 -v
-image lookup -a 0x140001035 -v
-image lookup -a 0x140001036 -v
-image lookup -a 0x140001037 -v
-image lookup -a 0x14000103b -v
-image lookup -a 0x14000103d -v
-image lookup -a 0x14000103f -v
-image lookup -a 0x140001041 -v
-image lookup -a 0x140001043 -v
-image lookup -a 0x140001045 -v
-image lookup -a 0x140001046 -v
-image lookup -a 0x140001047 -v
-image lookup -a 0x140001048 -v
-image lookup -a 0x140001049 -v
-image lookup -a 0x14000104a -v
-image lookup -a 0x14000104b -v
-image lookup -a 0x14000104c -v
-image lookup -a 0x14000104e -v
-image lookup -a 0x14000104f -v
-image lookup -a 0x140001050 -v
-image lookup -a 0x140001051 -v
-exit
+image lookup -a 0x140001000 -v
+image lookup -a 0x140001003 -v
+image lookup -a 0x140001006 -v
+
+image lookup -a 0x140001011 -v
+image lookup -a 0x140001017 -v
+image lookup -a 0x140001019 -v
+image lookup -a 0x14000101e -v
+image lookup -a 0x14000102c -v
+
+image lookup -a 0x140001031 -v
+image lookup -a 0x140001032 -v
+image lookup -a 0x140001033 -v
+image lookup -a 0x140001034 -v
+image lookup -a 0x140001035 -v
+image lookup -a 0x140001036 -v
+image lookup -a 0x140001037 -v
+image lookup -a 0x14000103b -v
+image lookup -a 0x14000103d -v
+image lookup -a 0x14000103f -v
+image lookup -a 0x140001041 -v
+image lookup -a 0x140001043 -v
+image lookup -a 0x140001045 -v
+image lookup -a 0x140001046 -v
+image lookup -a 0x140001047 -v
+image lookup -a 0x140001048 -v
+image lookup -a 0x140001049 -v
+image lookup -a 0x14000104a -v
+image lookup -a 0x14000104b -v
+image lookup -a 0x14000104c -v
+image lookup -a 0x14000104e -v
+image lookup -a 0x14000104f -v
+image lookup -a 0x140001050 -v
+image lookup -a 0x140001051 -v
+exit
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/lookup-by-types.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/lookup-by-types.lldbinit
index afe3f2c8b943e3..3f639eb2e539bc 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/lookup-by-types.lldbinit
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/lookup-by-types.lldbinit
@@ -1,4 +1,4 @@
-image lookup -type A
-image lookup -type B
-
+image lookup -type A
+image lookup -type B
+
quit
\ No newline at end of file
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/subfield_register_simple_type.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/subfield_register_simple_type.lldbinit
index 3dc33fd789dac0..32758f1fbc51f3 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/subfield_register_simple_type.lldbinit
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/subfield_register_simple_type.lldbinit
@@ -1,2 +1,2 @@
-image lookup -a 0x40102f -v
-quit
+image lookup -a 0x40102f -v
+quit
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/function-types-classes.cpp b/lldb/test/Shell/SymbolFile/NativePDB/function-types-classes.cpp
index ca2a84de7698a4..f0fac90e5065a1 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/function-types-classes.cpp
+++ b/lldb/test/Shell/SymbolFile/NativePDB/function-types-classes.cpp
@@ -113,9 +113,9 @@ auto incomplete = &three<Incomplete*, Incomplete**, const Incomplete*>;
// CHECK: |-CXXRecordDecl {{.*}} union U
// CHECK: |-EnumDecl {{.*}} E
// CHECK: |-CXXRecordDecl {{.*}} struct S
-// CHECK: |-VarDecl {{.*}} a 'S (*)(C *, U &, E &&)'
-// CHECK: |-VarDecl {{.*}} b 'E (*)(const S *, const C &, const U &&)'
-// CHECK: |-VarDecl {{.*}} c 'U (*)(volatile E *, volatile S &, volatile C &&)'
+// CHECK: |-VarDecl {{.*}} a 'S (*)(C *, U &, E &&)'
+// CHECK: |-VarDecl {{.*}} b 'E (*)(const S *, const C &, const U &&)'
+// CHECK: |-VarDecl {{.*}} c 'U (*)(volatile E *, volatile S &, volatile C &&)'
// CHECK: |-VarDecl {{.*}} d 'C (*)(const volatile U *, const volatile E &, const volatile S &&)'
// CHECK: |-CXXRecordDecl {{.*}} struct B
// CHECK: | `-CXXRecordDecl {{.*}} struct A
@@ -125,14 +125,14 @@ auto incomplete = &three<Incomplete*, Incomplete**, const Incomplete*>;
// CHECK: | | `-CXXRecordDecl {{.*}} struct S
// CHECK: | `-NamespaceDecl {{.*}} B
// CHECK: | `-CXXRecordDecl {{.*}} struct S
-// CHECK: |-VarDecl {{.*}} e 'A::B::S *(*)(B::A::S *, A::C::S &)'
-// CHECK: |-VarDecl {{.*}} f 'A::C::S &(*)(A::B::S *, B::A::S *)'
+// CHECK: |-VarDecl {{.*}} e 'A::B::S *(*)(B::A::S *, A::C::S &)'
+// CHECK: |-VarDecl {{.*}} f 'A::C::S &(*)(A::B::S *, B::A::S *)'
// CHECK: |-VarDecl {{.*}} g 'B::A::S *(*)(A::C::S &, A::B::S *)'
// CHECK: |-CXXRecordDecl {{.*}} struct TC<int>
// CHECK: |-CXXRecordDecl {{.*}} struct TC<TC<int>>
// CHECK: |-CXXRecordDecl {{.*}} struct TC<A::B::S>
// CHECK: |-CXXRecordDecl {{.*}} struct TC<void>
-// CHECK: |-VarDecl {{.*}} h 'TC<void> (*)(TC<int>, TC<TC<int>>, TC<A::B::S>)'
+// CHECK: |-VarDecl {{.*}} h 'TC<void> (*)(TC<int>, TC<TC<int>>, TC<A::B::S>)'
// CHECK: |-VarDecl {{.*}} i 'A::B::S (*)()'
// CHECK: |-CXXRecordDecl {{.*}} struct Incomplete
// CHECK: `-VarDecl {{.*}} incomplete 'Incomplete *(*)(Incomplete **, const Incomplete *)'
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/inline_sites_live.cpp b/lldb/test/Shell/SymbolFile/NativePDB/inline_sites_live.cpp
index 767149ea18c468..40298272696580 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/inline_sites_live.cpp
+++ b/lldb/test/Shell/SymbolFile/NativePDB/inline_sites_live.cpp
@@ -1,34 +1,34 @@
-// clang-format off
-// REQUIRES: system-windows
-
-// RUN: %build -o %t.exe -- %s
-// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
-// RUN: %p/Inputs/inline_sites_live.lldbinit 2>&1 | FileCheck %s
-
-void use(int) {}
-
-void __attribute__((always_inline)) bar(int param) {
- use(param); // BP_bar
-}
-
-void __attribute__((always_inline)) foo(int param) {
- int local = param+1;
- bar(local);
- use(param);
- use(local); // BP_foo
-}
-
-int main(int argc, char** argv) {
- foo(argc);
-}
-
-// CHECK: * thread #1, stop reason = breakpoint 1
-// CHECK-NEXT: frame #0: {{.*}}`main [inlined] bar(param=2)
-// CHECK: (lldb) expression param
-// CHECK-NEXT: (int) $0 = 2
-// CHECK: * thread #1, stop reason = breakpoint 2
-// CHECK-NEXT: frame #0: {{.*}}`main [inlined] foo(param=1)
-// CHECK: (lldb) expression param
-// CHECK-NEXT: (int) $1 = 1
-// CHECK-NEXT: (lldb) expression local
-// CHECK-NEXT: (int) $2 = 2
+// clang-format off
+// REQUIRES: system-windows
+
+// RUN: %build -o %t.exe -- %s
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/inline_sites_live.lldbinit 2>&1 | FileCheck %s
+
+void use(int) {}
+
+void __attribute__((always_inline)) bar(int param) {
+ use(param); // BP_bar
+}
+
+void __attribute__((always_inline)) foo(int param) {
+ int local = param+1;
+ bar(local);
+ use(param);
+ use(local); // BP_foo
+}
+
+int main(int argc, char** argv) {
+ foo(argc);
+}
+
+// CHECK: * thread #1, stop reason = breakpoint 1
+// CHECK-NEXT: frame #0: {{.*}}`main [inlined] bar(param=2)
+// CHECK: (lldb) expression param
+// CHECK-NEXT: (int) $0 = 2
+// CHECK: * thread #1, stop reason = breakpoint 2
+// CHECK-NEXT: frame #0: {{.*}}`main [inlined] foo(param=1)
+// CHECK: (lldb) expression param
+// CHECK-NEXT: (int) $1 = 1
+// CHECK-NEXT: (lldb) expression local
+// CHECK-NEXT: (int) $2 = 2
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/lookup-by-types.cpp b/lldb/test/Shell/SymbolFile/NativePDB/lookup-by-types.cpp
index f3aea8115f3858..cd5bbfc30fa0e1 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/lookup-by-types.cpp
+++ b/lldb/test/Shell/SymbolFile/NativePDB/lookup-by-types.cpp
@@ -1,46 +1,46 @@
-// clang-format off
-
-// RUN: %build -o %t.exe -- %s
-// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
-// RUN: %p/Inputs/lookup-by-types.lldbinit 2>&1 | FileCheck %s
-
-class B;
-class A {
-public:
- static const A constA;
- static A a;
- static B b;
- int val = 1;
-};
-class B {
-public:
- static A a;
- int val = 2;
-};
-A varA;
-B varB;
-const A A::constA = varA;
-A A::a = varA;
-B A::b = varB;
-A B::a = varA;
-
-int main(int argc, char **argv) {
- return varA.val + varB.val;
-}
-
-// CHECK: image lookup -type A
-// CHECK-NEXT: 1 match found in {{.*}}.exe
-// CHECK-NEXT: compiler_type = "class A {
-// CHECK-NEXT: static const A constA;
-// CHECK-NEXT: static A a;
-// CHECK-NEXT: static B b;
-// CHECK-NEXT: public:
-// CHECK-NEXT: int val;
-// CHECK-NEXT: }"
-// CHECK: image lookup -type B
-// CHECK-NEXT: 1 match found in {{.*}}.exe
-// CHECK-NEXT: compiler_type = "class B {
-// CHECK-NEXT: static A a;
-// CHECK-NEXT: public:
-// CHECK-NEXT: int val;
-// CHECK-NEXT: }"
+// clang-format off
+
+// RUN: %build -o %t.exe -- %s
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/lookup-by-types.lldbinit 2>&1 | FileCheck %s
+
+class B;
+class A {
+public:
+ static const A constA;
+ static A a;
+ static B b;
+ int val = 1;
+};
+class B {
+public:
+ static A a;
+ int val = 2;
+};
+A varA;
+B varB;
+const A A::constA = varA;
+A A::a = varA;
+B A::b = varB;
+A B::a = varA;
+
+int main(int argc, char **argv) {
+ return varA.val + varB.val;
+}
+
+// CHECK: image lookup -type A
+// CHECK-NEXT: 1 match found in {{.*}}.exe
+// CHECK-NEXT: compiler_type = "class A {
+// CHECK-NEXT: static const A constA;
+// CHECK-NEXT: static A a;
+// CHECK-NEXT: static B b;
+// CHECK-NEXT: public:
+// CHECK-NEXT: int val;
+// CHECK-NEXT: }"
+// CHECK: image lookup -type B
+// CHECK-NEXT: 1 match found in {{.*}}.exe
+// CHECK-NEXT: compiler_type = "class B {
+// CHECK-NEXT: static A a;
+// CHECK-NEXT: public:
+// CHECK-NEXT: int val;
+// CHECK-NEXT: }"
diff --git a/lldb/unittests/Breakpoint/CMakeLists.txt b/lldb/unittests/Breakpoint/CMakeLists.txt
index 757c2da1a4d9de..db985bc82dc5e2 100644
--- a/lldb/unittests/Breakpoint/CMakeLists.txt
+++ b/lldb/unittests/Breakpoint/CMakeLists.txt
@@ -1,10 +1,10 @@
-add_lldb_unittest(LLDBBreakpointTests
- BreakpointIDTest.cpp
- WatchpointAlgorithmsTests.cpp
-
- LINK_LIBS
- lldbBreakpoint
- lldbCore
- LINK_COMPONENTS
- Support
- )
+add_lldb_unittest(LLDBBreakpointTests
+ BreakpointIDTest.cpp
+ WatchpointAlgorithmsTests.cpp
+
+ LINK_LIBS
+ lldbBreakpoint
+ lldbCore
+ LINK_COMPONENTS
+ Support
+ )
diff --git a/llvm/docs/CommandGuide/llvm-pdbutil.rst b/llvm/docs/CommandGuide/llvm-pdbutil.rst
index 955353187112c1..74e1444794dff2 100644
--- a/llvm/docs/CommandGuide/llvm-pdbutil.rst
+++ b/llvm/docs/CommandGuide/llvm-pdbutil.rst
@@ -27,18 +27,18 @@ Subcommands
a different purpose. A brief summary of each command follows, with more detail
in the sections that follow.
- * :ref:`pretty_subcommand` - Dump symbol and type information in a format that
+ * :ref:`pretty_subcommand` - Dump symbol and type information in a format that
tries to look as much like the original source code as possible.
- * :ref:`dump_subcommand` - Dump low level types and structures from the PDB
+ * :ref:`dump_subcommand` - Dump low level types and structures from the PDB
file, including CodeView records, hash tables, PDB streams, etc.
- * :ref:`bytes_subcommand` - Dump data from the PDB file's streams, records,
+ * :ref:`bytes_subcommand` - Dump data from the PDB file's streams, records,
types, symbols, etc as raw bytes.
- * :ref:`yaml2pdb_subcommand` - Given a yaml description of a PDB file, produce
+ * :ref:`yaml2pdb_subcommand` - Given a yaml description of a PDB file, produce
a valid PDB file that matches that description.
- * :ref:`pdb2yaml_subcommand` - For a given PDB file, produce a YAML
- description of some or all of the file in a way that the PDB can be
+ * :ref:`pdb2yaml_subcommand` - For a given PDB file, produce a YAML
+ description of some or all of the file in a way that the PDB can be
reconstructed.
- * :ref:`merge_subcommand` - Given two PDBs, produce a third PDB that is the
+ * :ref:`merge_subcommand` - Given two PDBs, produce a third PDB that is the
result of merging the two input PDBs.
.. _pretty_subcommand:
@@ -49,7 +49,7 @@ pretty
.. program:: llvm-pdbutil pretty
.. important::
- The **pretty** subcommand is built on the Windows DIA SDK, and as such is not
+ The **pretty** subcommand is built on the Windows DIA SDK, and as such is not
supported on non-Windows platforms.
USAGE: :program:`llvm-pdbutil` pretty [*options*] <input PDB file>
@@ -57,10 +57,10 @@ USAGE: :program:`llvm-pdbutil` pretty [*options*] <input PDB file>
Summary
^^^^^^^^^^^
-The *pretty* subcommand displays a very high level representation of your
-program's debug info. Since it is built on the Windows DIA SDK which is the
-standard API that Windows tools and debuggers query debug information, it
-presents a more authoritative view of how a debugger is going to interpret your
+The *pretty* subcommand displays a very high level representation of your
+program's debug info. Since it is built on the Windows DIA SDK which is the
+standard API that Windows tools and debuggers query debug information, it
+presents a more authoritative view of how a debugger is going to interpret your
debug information than a mode which displays low-level CodeView records.
Options
@@ -70,55 +70,55 @@ Filtering and Sorting Options
+++++++++++++++++++++++++++++
.. note::
- *exclude* filters take priority over *include* filters. So if a filter
+ *exclude* filters take priority over *include* filters. So if a filter
matches both an include and an exclude rule, then it is excluded.
.. option:: -exclude-compilands=<string>
- When dumping compilands, compiland source-file contributions, or per-compiland
- symbols, this option instructs **llvm-pdbutil** to omit any compilands that
+ When dumping compilands, compiland source-file contributions, or per-compiland
+ symbols, this option instructs **llvm-pdbutil** to omit any compilands that
match the specified regular expression.
.. option:: -exclude-symbols=<string>
- When dumping global, public, or per-compiland symbols, this option instructs
- **llvm-pdbutil** to omit any symbols that match the specified regular
+ When dumping global, public, or per-compiland symbols, this option instructs
+ **llvm-pdbutil** to omit any symbols that match the specified regular
expression.
.. option:: -exclude-types=<string>
- When dumping types, this option instructs **llvm-pdbutil** to omit any types
+ When dumping types, this option instructs **llvm-pdbutil** to omit any types
that match the specified regular expression.
.. option:: -include-compilands=<string>
- When dumping compilands, compiland source-file contributions, or per-compiland
- symbols, limit the initial search to only those compilands that match the
+ When dumping compilands, compiland source-file contributions, or per-compiland
+ symbols, limit the initial search to only those compilands that match the
specified regular expression.
.. option:: -include-symbols=<string>
- When dumping global, public, or per-compiland symbols, limit the initial
+ When dumping global, public, or per-compiland symbols, limit the initial
search to only those symbols that match the specified regular expression.
.. option:: -include-types=<string>
- When dumping types, limit the initial search to only those types that match
+ When dumping types, limit the initial search to only those types that match
the specified regular expression.
.. option:: -min-class-padding=<uint>
- Only display types that have at least the specified amount of alignment
+ Only display types that have at least the specified amount of alignment
padding, accounting for padding in base classes and aggregate field members.
.. option:: -min-class-padding-imm=<uint>
- Only display types that have at least the specified amount of alignment
+ Only display types that have at least the specified amount of alignment
padding, ignoring padding in base classes and aggregate field members.
.. option:: -min-type-size=<uint>
- Only display types T where sizeof(T) is greater than or equal to the specified
+ Only display types T where sizeof(T) is greater than or equal to the specified
amount.
.. option:: -no-compiler-generated
@@ -127,7 +127,7 @@ Filtering and Sorting Options
.. option:: -no-enum-definitions
- When dumping an enum, don't show the full enum (e.g. the individual enumerator
+ When dumping an enum, don't show the full enum (e.g. the individual enumerator
values).
.. option:: -no-system-libs
@@ -233,12 +233,12 @@ Other Options
.. option:: -color-output
- Force color output on or off. By default, color if used if outputting to a
+ Force color output on or off. By default, color if used if outputting to a
terminal.
.. option:: -load-address=<uint>
- When displaying relative virtual addresses, assume the process is loaded at the
+ When displaying relative virtual addresses, assume the process is loaded at the
given address and display what would be the absolute address.
.. _dump_subcommand:
@@ -253,14 +253,14 @@ USAGE: :program:`llvm-pdbutil` dump [*options*] <input PDB file>
Summary
^^^^^^^^^^^
-The **dump** subcommand displays low level information about the structure of a
-PDB file. It is used heavily by LLVM's testing infrastructure, but can also be
-used for PDB forensics. It serves a role similar to that of Microsoft's
-`cvdump` tool.
-
-.. note::
- The **dump** subcommand exposes internal details of the file format. As
- such, the reader should be familiar with :doc:`/PDB/index` before using this
+The **dump** subcommand displays low level information about the structure of a
+PDB file. It is used heavily by LLVM's testing infrastructure, but can also be
+used for PDB forensics. It serves a role similar to that of Microsoft's
+`cvdump` tool.
+
+.. note::
+ The **dump** subcommand exposes internal details of the file format. As
+ such, the reader should be familiar with :doc:`/PDB/index` before using this
command.
Options
@@ -388,8 +388,8 @@ Type Record Options
When used in conjunction with :option:`-type-index` or :option:`-id-index`,
dumps the entire dependency graph for the specified index instead of just the
single record with the specified index. For example, if type index 0x4000 is
- a function whose return type has index 0x3000, and you specify
- `-dependents=0x4000`, then this would dump both records (as well as any other
+ a function whose return type has index 0x3000, and you specify
+ `-dependents=0x4000`, then this would dump both records (as well as any other
dependents in the tree).
Miscellaneous Options
diff --git a/llvm/docs/GettingInvolved.rst b/llvm/docs/GettingInvolved.rst
index 93be3bd1d8545e..cb957e1d9b576a 100644
--- a/llvm/docs/GettingInvolved.rst
+++ b/llvm/docs/GettingInvolved.rst
@@ -1,495 +1,495 @@
-Getting Involved
-================
-
-LLVM welcomes contributions of all kinds. To get started, please review the following topics:
-
-.. contents::
- :local:
-
-.. toctree::
- :hidden:
-
- Contributing
- DeveloperPolicy
- CodeReview
- SupportPolicy
- SphinxQuickstartTemplate
- HowToSubmitABug
- BugLifeCycle
- CodingStandards
- GitHub
- GitBisecting
- GitRepositoryPolicy
-
-:doc:`Contributing`
- An overview on how to contribute to LLVM.
-
-:doc:`DeveloperPolicy`
- The LLVM project's policy towards developers and their contributions.
-
-:doc:`CodeReview`
- The LLVM project's code-review process.
-
-:doc:`SupportPolicy`
- The LLVM support policy for core and non-core components.
-
-:doc:`SphinxQuickstartTemplate`
- A template + tutorial for writing new Sphinx documentation. It is meant
- to be read in source form.
-
-:doc:`HowToSubmitABug`
- Instructions for properly submitting information about any bugs you run into
- in the LLVM system.
-
-:doc:`BugLifeCycle`
- Describes how bugs are reported, triaged and closed.
-
-:doc:`CodingStandards`
- Details the LLVM coding standards and provides useful information on writing
- efficient C++ code.
-
-:doc:`GitHub`
- Describes how to use the llvm-project repository and code reviews on GitHub.
-
-:doc:`GitBisecting`
- Describes how to use ``git bisect`` on LLVM's repository.
-
-:doc:`GitRepositoryPolicy`
- Collection of policies around the git repositories.
-
-.. _development-process:
-
-Development Process
--------------------
-
-Information about LLVM's development process.
-
-.. toctree::
- :hidden:
-
- Projects
- HowToReleaseLLVM
- ReleaseProcess
- HowToAddABuilder
- ReleaseNotes
-
-:doc:`Projects`
- How-to guide and templates for new projects that *use* the LLVM
- infrastructure. The templates (directory organization, Makefiles, and test
- tree) allow the project code to be located outside (or inside) the ``llvm/``
- tree, while using LLVM header files and libraries.
-
-:doc:`HowToReleaseLLVM`
- This is a guide to preparing LLVM releases. Most developers can ignore it.
-
-:doc:`ReleaseProcess`
- This is a guide to validate a new release, during the release process. Most developers can ignore it.
-
-:doc:`HowToAddABuilder`
- Instructions for adding new builder to LLVM buildbot master.
-
-:doc:`Release notes for the current release <ReleaseNotes>`
- This describes new features, known bugs, and other limitations.
-
-.. _lists-forums:
-
-Forums & Mailing Lists
-----------------------
-
-If you can't find what you need in these docs, try consulting the
-Discourse forums. There are also commit mailing lists for all commits to the LLVM Project.
-The :doc:`CodeOfConduct` applies to all these forums and mailing lists.
-
-`LLVM Discourse`__
- The forums for all things LLVM and related sub-projects. There are categories and subcategories for a wide variety of areas within LLVM. You can also view tags or search for a specific topic.
-
- .. __: https://discourse.llvm.org/
-
-`Commits Archive (llvm-commits)`__
- This list contains all commit messages that are made when LLVM developers
- commit code changes to the repository. It also serves as a forum for
- patch review (i.e. send patches here). It is useful for those who want to
- stay on the bleeding edge of LLVM development. This list is very high
- volume.
-
- .. __: http://lists.llvm.org/pipermail/llvm-commits/
-
-`Bugs & Patches Archive (llvm-bugs)`__
- This list gets emailed every time a bug is opened and closed. It is
- higher volume than the LLVM-dev list.
-
- .. __: http://lists.llvm.org/pipermail/llvm-bugs/
-
-`LLVM Announcements`__
- If you just want project wide announcements such as releases, developers meetings, or blog posts, then you should check out the Announcement category on LLVM Discourse.
-
- .. __: https://discourse.llvm.org/c/announce/46
-
-.. _online-sync-ups:
-
-Online Sync-Ups
----------------
-
-A number of regular calls are organized on specific topics. It should be
-expected that the range of topics will change over time. At the time of
-writing, the following sync-ups are organized.
-The :doc:`CodeOfConduct` applies to all online sync-ups.
-
-If you'd like to organize a new sync-up, please add the info in the table
-below. Please also create a calendar event for it and invite calendar at llvm.org
-to the event, so that it'll show up on the :ref:`llvm-community-calendar`.
-Please see :ref:`llvm-community-calendar-host-guidance` for more guidance on
-what to add to your calendar invite.
-
-.. list-table:: LLVM regular sync-up calls
- :widths: 25 25 25 25
- :header-rows: 1
-
- * - Topic
- - Frequency
- - Calendar link
- - Minutes/docs link
- * - Loop Optimization Working Group
- - Every 2 weeks on Wednesday
- - `ics <./_static/LoopOptWG_invite.ics>`__
- - `Minutes/docs <https://docs.google.com/document/d/1sdzoyB11s0ccTZ3fobqctDpgJmRoFcz0sviKxqczs4g/edit>`__
- * - RISC-V
- - Every 2 weeks on Thursday
- - `ics <https://calendar.google.com/calendar/ical/lowrisc.org_0n5pkesfjcnp0bh5hps1p0bd80%40group.calendar.google.com/public/basic.ics>`__
- `gcal <https://calendar.google.com/calendar/b/1?cid=bG93cmlzYy5vcmdfMG41cGtlc2ZqY25wMGJoNWhwczFwMGJkODBAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ>`__
- - `Minutes/docs <https://docs.google.com/document/d/1G3ocHm2zE6AYTS2N3_3w2UxFnSEyKkcF57siLWe-NVs>`__
- * - Scalable Vectors and Arm SVE
- - Monthly, every 3rd Tuesday
- - `ics <https://calendar.google.com/calendar/ical/bjms39pe6k6bo5egtsp7don414%40group.calendar.google.com/public/basic.ics>`__
- `gcal <https://calendar.google.com/calendar/u/0/embed?src=bjms39pe6k6bo5egtsp7don414@group.calendar.google.com>`__
- - `Minutes/docs <https://docs.google.com/document/d/1UPH2Hzou5RgGT8XfO39OmVXKEibWPfdYLELSaHr3xzo/edit>`__
- * - ML Guided Compiler Optimizations
- - Monthly
- -
- - `Minutes/docs <https://docs.google.com/document/d/1JecbplF09l3swTjze-UVeLh4L48svJxGVy4mz_e9Rhs/edit?usp=gmail#heading=h.ts9cmcjbir1j>`__
- * - `LLVM security group <https://llvm.org/docs/Security.html>`__
- - Monthly, every 3rd Tuesday
- - `ics <https://calendar.google.com/calendar/ical/eoh3m9k1l6vqbd1fkp94fv5q74%40group.calendar.google.com/public/basic.ics>`__
- `gcal <https://calendar.google.com/calendar/embed?src=eoh3m9k1l6vqbd1fkp94fv5q74%40group.calendar.google.com>`__
- - `Minutes/docs <https://discourse.llvm.org/t/llvm-security-group-public-sync-ups/62735>`__
- * - `CIRCT <https://github.com/llvm/circt>`__
- - Weekly, on Wednesday
- -
- - `Minutes/docs <https://docs.google.com/document/d/1fOSRdyZR2w75D87yU2Ma9h2-_lEPL4NxvhJGJd-s5pk/edit#heading=h.mulvhjtr8dk9>`__
- * - `MLIR <https://mlir.llvm.org>`__ design meetings
- - Weekly, on Thursdays
- -
- - `Minutes/docs <https://docs.google.com/document/d/1y_9f1AbfgcoVdJh4_aM6-BaSHvrHl8zuA5G4jv_94K8/edit#heading=h.cite1kolful9>`__
- * - flang
- - Multiple meeting series, `documented here <https://github.com/llvm/llvm-project/blob/main/flang/docs/GettingInvolved.md#calls>`__
- -
- -
- * - OpenMP
- - Multiple meeting series, `documented here <https://openmp.llvm.org/docs/SupportAndFAQ.html>`__
- -
- -
- * - LLVM Alias Analysis
- - Every 4 weeks on Tuesdays
- - `ics <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201103/a3499a67/attachment-0001.ics>`__
- - `Minutes/docs <https://docs.google.com/document/d/17U-WvX8qyKc3S36YUKr3xfF-GHunWyYowXbxEdpHscw>`__
- * - Vector Predication
- - Every 2 weeks on Tuesdays, 3pm UTC
- -
- - `Minutes/docs <https://docs.google.com/document/d/1q26ToudQjnqN5x31zk8zgq_s0lem1-BF8pQmciLa4k8/edit?usp=sharing>`__
- * - LLVM Pointer Authentication
- - Every month on Mondays
- - `ics <https://calendar.google.com/calendar/ical/fr1qtmrmt2s9odufjvurkb6j70%40group.calendar.google.com/public/basic.ics>`__
- - `Minutes/docs <https://discourse.llvm.org/t/llvm-pointer-authentication-sync-ups/62661>`__
- * - MemorySSA in LLVM
- - Every 8 weeks on Mondays
- - `ics <https://calendar.google.com/calendar/ical/c_1mincouiltpa24ac14of14lhi4%40group.calendar.google.com/public/basic.ics>`__
- `gcal <https://calendar.google.com/calendar/embed?src=c_1mincouiltpa24ac14of14lhi4%40group.calendar.google.com>`__
- - `Minutes/docs <https://docs.google.com/document/d/1-uEEZfmRdPThZlctOq9eXlmUaSSAAi8oKxhrPY_lpjk/edit#>`__
- * - LLVM Embedded Toolchains
- - Every 4 weeks on Thursdays
- - `ics <https://drive.google.com/file/d/1uNa-PFYkhAfT83kR2Nc4Fi706TAQFBEL/view?usp=sharing>`__
- `gcal <https://calendar.google.com/calendar/u/0?cid=ZDQyc3ZlajJmbjIzNG1jaTUybjFsdjA2dWNAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ>`__
- - `Minutes/docs <https://docs.google.com/document/d/1GahxppHJ7o1O_fn1Mbidu1DHEg7V2aOr92LXCtNV1_o/edit?usp=sharing>`__
- * - Clang C and C++ Language Working Group
- - 1st and 3rd Wednesday of the month
- - `gcal <https://calendar.google.com/calendar/u/0?cid=cW1lZGg0ZXNpMnIyZDN2aTVydGVrdWF1YzRAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ>`__
- - `Minutes/docs <https://docs.google.com/document/d/1x5-RbOC6-jnI_NcJ9Dp4pSmGhhNe7lUevuWUIB46TeM/edit?usp=sharing>`__
- * - LLVM SPIR-V Backend Working Group
- - Every week on Monday
- -
- - `Meeting details/agenda <https://docs.google.com/document/d/1UjX-LAwPjJ75Nmb8a5jz-Qrm-pPtKtQw0k1S1Lop9jU/edit?usp=sharing>`__
- * - SYCL Upstream Working Group
- - Every 2 weeks on Mondays
- - `gcal <https://calendar.google.com/calendar/u/0?cid=c3ljbC5sbHZtLndnQGdtYWlsLmNvbQ>`__
- - `Meeting details/agenda <https://docs.google.com/document/d/1ivYDSn_5ChTeiZ7TiO64WC_jYJnGwAUiT9Ngi9cAdFU/edit?usp=sharing>`__
- * - GlobalISel
- - Every 2nd Tuesday of the month
- - `gcal <https://calendar.google.com/calendar/u/0?cid=ZDcyMjc0ZjZiZjNhMzFlYmE3NTNkMWM2MGM2NjM5ZWU3ZDE2MjM4MGFlZDc2ZjViY2UyYzMwNzVhZjk4MzQ4ZEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t>`__
- - `Meeting details/agenda <https://docs.google.com/document/d/1Ry8O4-Tm5BFj9AMjr8qTQFU80z-ptiNQ62687NaIvLs/edit?usp=sharing>`__
- * - Floating Point Working Group
- - Every 3rd Wednesday of the month
- - `ics <https://calendar.google.com/calendar/ical/02582507bac79d186900712566ec3fc69b33ac24d7de0a8c76c7b19976f190c0%40group.calendar.google.com/private-6e35506dbfe13812e92e9aa8cd5d761d/basic.ics>`__
- `gcal <https://calendar.google.com/calendar/u/0?cid=MDI1ODI1MDdiYWM3OWQxODY5MDA3MTI1NjZlYzNmYzY5YjMzYWMyNGQ3ZGUwYThjNzZjN2IxOTk3NmYxOTBjMEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t>`__
- - `Meeting details/agenda: <https://docs.google.com/document/d/1QcmUlWftPlBi-Wz6b6PipqJfvjpJ-OuRMRnN9Dm2t0c>`__
-
-.. _office-hours:
-
-Office hours
-------------
-
-A number of experienced LLVM contributors make themselves available for a chat
-on a regular schedule, to anyone who is looking for some guidance. Please find
-the list of who is available when, through which medium, and what their area of
-expertise is. Don't be too shy to dial in!
-
-Office hours are also listed on the :ref:`llvm-community-calendar`. Of course,
-people take time off from time to time, so if you dial in and you don't find
-anyone present, chances are they happen to be off that day.
-
-The :doc:`CodeOfConduct` applies to all office hours.
-
-.. list-table:: LLVM office hours
- :widths: 15 40 15 15 15
- :header-rows: 1
-
- * - Name
- - In-scope topics
- - When?
- - Where?
- - Languages
- * - Kristof Beyls
- - General questions on how to contribute to LLVM; organizing meetups;
- submitting talks; and other general LLVM-related topics. Arm/AArch64
- codegen. LLVM security group. LLVM Office Hours.
- - Every 2nd and 4th Wednesday of the month at 9.30am CET, for 30 minutes.
- `ics <https://calendar.google.com/calendar/ical/co0h4ndpvtfe64opn7eraiq3ac%40group.calendar.google.com/public/basic.ics>`__
- - `Jitsi <https://meet.jit.si/KristofBeylsLLVMOfficeHour>`__
- - English, Flemish, Dutch
- * - Alina Sbirlea
- - General questions on how to contribute to LLVM; women in compilers;
- MemorySSA, BatchAA, various loop passes, new pass manager.
- - Monthly, 2nd Tuesdays, 10.00am PT/7:00pm CET, for 30 minutes.
- `ics <https://calendar.google.com/calendar/ical/c_pm6e7160iq7n5fcm1s6m3rjhh4%40group.calendar.google.com/public/basic.ics>`__
- `gcal <https://calendar.google.com/calendar/embed?src=c_pm6e7160iq7n5fcm1s6m3rjhh4%40group.calendar.google.com>`__
- - `GoogleMeet <https://meet.google.com/hhk-xpdj-gvx>`__
- - English, Romanian
- * - Aaron Ballman (he/him)
- - Clang internals; frontend attributes; clang-tidy; clang-query; AST matchers
- - Monthly, 2nd Monday and 3rd Friday of the month at 10:00am Eastern and again at 2:00pm Eastern, for 60 minutes.
- `ics <https://calendar.google.com/calendar/ical/npgke5dug0uliud0qapptmps58%40group.calendar.google.com/public/basic.ics>`__
- `gcal <https://calendar.google.com/calendar/embed?src=npgke5dug0uliud0qapptmps58%40group.calendar.google.com>`__
- - `GoogleMeet <https://meet.google.com/xok-iqne-gmi>`__
- - English, Norwegian (not fluently)
- * - Johannes Doerfert (he/him)
- - OpenMP, LLVM-IR, interprocedural optimizations, Attributor, workshops, research, ...
- - Every week, Wednesdays 9:30am (Pacific Time), for 1 hour.
- `ics <https://drive.google.com/file/d/1E_QkRvirmdJzlXf2EKBUX-v8Xj7-eW3v/view?usp=sharing>`__
- - `MS Teams <https://teams.microsoft.com/l/meetup-join/19%3ameeting_MTMxNzU4MWYtYzViNS00OTM2LWJmNWQtMjg5ZWFhNGVjNzgw%40thread.v2/0?context=%7b%22Tid%22%3a%22a722dec9-ae4e-4ae3-9d75-fd66e2680a63%22%2c%22Oid%22%3a%22885bda30-ce8e-46db-aa7e-15de0474831a%22%7d>`__
- - English, German
- * - Tobias Grosser
- - General questions on how to contribute to LLVM/MLIR, Polly, Loop Optimization, FPL, Research in LLVM, PhD in CS, Summer of Code.
- - Monthly, last Monday of the month at 18:00 London time (typically 9am PT), for 30 minutes.
- - `Video Call <https://meet.grosser.science/LLVMOfficeHours>`__
- - English, German, Spanish, French
- * - Anastasia Stulova
- - Clang internals for C/C++ language extensions and dialects, OpenCL, GPU, SPIR-V, how to contribute, women in compilers.
- - Monthly, 1st Tuesday of the month at 17:00 BST - London time (9:00am PT except for 2 weeks in spring), 30 mins slot.
- - `GoogleMeet <https://meet.google.com/kdy-fdbv-nuk>`__
- - English, Russian, German (not fluently)
- * - Alexey Bader
- - SYCL compiler, offload tools, OpenCL and SPIR-V, how to contribute.
- - Monthly, 2nd Monday of the month at 9:30am PT, for 30 minutes.
- - `GoogleMeet <https://meet.google.com/pdz-xhns-uus>`__
- - English, Russian
- * - Maksim Panchenko
- - BOLT internals, IR, new passes, proposals, etc.
- - Monthly, 2nd Wednesday of the month at 11:00am PT, for 30 minutes.
- - `Zoom <https://fb.zoom.us/j/97065697120?pwd=NTFaUWJjZW9uVkJuaVlPTE9qclE3dz09>`__
- - English, Russian
- * - Quentin Colombet (he/him)
- - LLVM/MLIR; Codegen (Instruction selection (GlobalISel/SDISel), Machine IR,
- Register allocation, etc.); Optimizations; MCA
- - Monthly, 1st Wednesday of the month at 8.00am PT, for 30 minutes.
- `ics <https://calendar.google.com/calendar/ical/48c4ad60290a4df218e51e1ceec1106fe317b0ebc76938d9273592053f38204e%40group.calendar.google.com/public/basic.ics>`__
- `gcal <https://calendar.google.com/calendar/embed?src=48c4ad60290a4df218e51e1ceec1106fe317b0ebc76938d9273592053f38204e%40group.calendar.google.com>`__
- - `Google meet <https://meet.google.com/cbz-grrp-obs>`__
- - English, French
- * - Phoebe Wang (she/her)
- - X86 backend, General questions to X86, women in compilers.
- - Monthly, 3rd Wednesday of the month at 8:30am Beijing time, for 30 minutes.
- - `MS Teams <https://teams.microsoft.com/l/meetup-join/19%3ameeting_NWQ0MjU0NjYtZjUyMi00YTU3LThmM2EtY2Y2YTE4NGM3NmFi%40thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%227b309d9c-a9bb-44c8-a940-ab97eef42d4d%22%7d>`__
- - English, Chinese
- * - Amara Emerson
- - GlobalISel questions.
- - Monthly, 4th Wednesday of the month at 9:30am PT, for 30 minutes.
- - `Google meet <https://meet.google.com/pdd-dibg-cwv>`__
- - English
- * - Maksim Levental and Jeremy Kun
- - MLIR newcomers and general discussion (`livestreamed <https://www.youtube.com/playlist?list=PLhxO86S3jsX2k7kOhZaV-qKWm8tNsUdAE>`__)
- - Every two weeks, Fridays at 3:00pm US Pacific, for 90 minutes.
- - Livestream chat or `Google meet <https://meet.google.com/wit-tvzc-dwc>`__
- - English
- * - Rotating hosts
- - Getting Started, beginner questions, new contributors.
- - Every Tuesday at 2 PM ET (11 AM PT), for 30 minutes.
- - `Google meet <https://meet.google.com/nga-uhpf-bbb>`__
- - English
-
-
-Guidance for office hours hosts
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-* If you're interested in becoming an office hours host, please add your
- information to the list above. Please create a calendar event for it and
- invite calendar at llvm.org to the event so that it'll show up on the
- :ref:`llvm-community-calendar`.
- Please see :ref:`llvm-community-calendar-host-guidance` for more guidance on
- what to add to your calendar invite.
-* When starting an office hours session, consider typing something like "*Hi,
- I'm available for chats in the next half hour at* video chat URL. *I'm
- looking forward to having conversations on the video chat or here.*" on the
- LLVM chat channels that you are already on. These could include:
-
- * the `#office-hours Discord channel
- <https://discord.com/channels/636084430946959380/976196303681896538>`__.
- * :ref:`IRC`
-
- Doing this can help:
- * overcome potential anxiety to call in for a first time,
- * people who prefer to first exchange a few messages through text chat
- before dialing in, and
- * remind the wider community that office hours do exist.
-* If you decide to no longer host office hours, please do remove your entry
- from the list above.
-
-
-.. _IRC:
-
-IRC
----
-
-Users and developers of the LLVM project (including subprojects such as Clang)
-can be found in #llvm on `irc.oftc.net <irc://irc.oftc.net/llvm>`_. The channel
-is actively moderated.
-
-The #llvm-build channel has a bot for
-`LLVM buildbot <http://lab.llvm.org/buildbot/#/console>`_ status changes. The
-bot will post a message with a link to a build bot and a blamelist when a build
-goes from passing to failing and again (without the blamelist) when the build
-goes from failing back to passing. It is a good channel for actively monitoring
-build statuses, but it is a noisy channel due to the automated messages. The
-channel is not actively moderated.
-
-In addition to the traditional IRC there is a
-`Discord <https://discord.com/channels/636084430946959380/636725486533345280>`_
-chat server available. To sign up, please use this
-`invitation link <https://discord.com/invite/xS7Z362>`_.
-
-
-.. _meetups-social-events:
-
-Meetups and social events
--------------------------
-
-.. toctree::
- :hidden:
-
- MeetupGuidelines
-
-Besides developer `meetings and conferences <https://llvm.org/devmtg/>`_,
-there are several user groups called
-`LLVM Socials <https://www.meetup.com/pro/llvm/>`_. We greatly encourage you to
-join one in your city. Or start a new one if there is none:
-
-:doc:`MeetupGuidelines`
-
-.. _community-proposals:
-
-Community wide proposals
-------------------------
-
-Proposals for massive changes in how the community behaves and how the work flow
-can be better.
-
-.. toctree::
- :hidden:
-
- Proposals/GitHubMove
- BugpointRedesign
- Proposals/TestSuite
- Proposals/VariableNames
- Proposals/VectorPredication
-
-:doc:`Proposals/GitHubMove`
- Proposal to move from SVN/Git to GitHub.
-
-:doc:`BugpointRedesign`
- Design doc for a redesign of the Bugpoint tool.
-
-:doc:`Proposals/TestSuite`
- Proposals for additional benchmarks/programs for llvm's test-suite.
-
-:doc:`Proposals/VariableNames`
- Proposal to change the variable names coding standard.
-
-:doc:`Proposals/VectorPredication`
- Proposal for predicated vector instructions in LLVM.
-
-.. _llvm-community-calendar:
-
-LLVM community calendar
------------------------
-
-We aim to maintain a public calendar view of all events happening in the LLVM
-community such as :ref:`online-sync-ups` and :ref:`office-hours`. The calendar
-can be found at
-https://calendar.google.com/calendar/u/0/embed?src=calendar@llvm.org and can
-also be seen inline below:
-
-.. raw:: html
-
- <iframe src="https://calendar.google.com/calendar/embed?height=600&wkst=1&bgcolor=%23ffffff&ctz=UTC&showCalendars=0&showDate=1&showNav=1&src=Y2FsZW5kYXJAbGx2bS5vcmc&color=%23039BE5" style="border:solid 1px #777" width="800" height="600" frameborder="0" scrolling="no"></iframe>
-
-Note that the web view of the LLVM community calendar shows events in
-Coordinated Universal Time (UTC). If you use Google Calendar, consider
-subscribing to it with the + button in the bottom-right corner to view all
-events in your local timezone alongside your other calendars.
-
-.. _llvm-community-calendar-host-guidance:
-
-Guidance on what to put into LLVM community calendar invites
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-To add your event, create a calendar event for it and invite calendar at llvm.org
-on it. Your event should then show up on the community calendar.
-
-Please put the following pieces of information in your calendar invite:
-
-* Write a single paragraph describing what the event is about. Include things
- such as who the event is for and what sort of topics are discussed.
-* State explicitly that the :doc:`CodeOfConduct` applies to this event.
-* Make it clear who:
-
- * the organizer is.
-
- * the person to contact is in case of any code-of-conduct issues. Typically,
- this would be the organizer.
-
-* If you have meeting minutes for your event, add a pointer to where those live.
- A good place for meeting minutes could be as a post on LLVM Discourse.
-
-An example invite looks as follows
-
-.. code-block:: none
-
- This event is a meetup for all developers of LLDB. Meeting agendas are posted
- on discourse before the event.
-
- Attendees are required to adhere to the LLVM Code of Conduct
- (https://llvm.org/docs/CodeOfConduct.html). For any Code of Conduct reports,
- please contact the organizers, and also email conduct at llvm.org.
-
- Agenda/Meeting Minutes: Link to minutes
-
- Organizer(s): First Surname (name at email.com)
-
+Getting Involved
+================
+
+LLVM welcomes contributions of all kinds. To get started, please review the following topics:
+
+.. contents::
+ :local:
+
+.. toctree::
+ :hidden:
+
+ Contributing
+ DeveloperPolicy
+ CodeReview
+ SupportPolicy
+ SphinxQuickstartTemplate
+ HowToSubmitABug
+ BugLifeCycle
+ CodingStandards
+ GitHub
+ GitBisecting
+ GitRepositoryPolicy
+
+:doc:`Contributing`
+ An overview on how to contribute to LLVM.
+
+:doc:`DeveloperPolicy`
+ The LLVM project's policy towards developers and their contributions.
+
+:doc:`CodeReview`
+ The LLVM project's code-review process.
+
+:doc:`SupportPolicy`
+ The LLVM support policy for core and non-core components.
+
+:doc:`SphinxQuickstartTemplate`
+ A template + tutorial for writing new Sphinx documentation. It is meant
+ to be read in source form.
+
+:doc:`HowToSubmitABug`
+ Instructions for properly submitting information about any bugs you run into
+ in the LLVM system.
+
+:doc:`BugLifeCycle`
+ Describes how bugs are reported, triaged and closed.
+
+:doc:`CodingStandards`
+ Details the LLVM coding standards and provides useful information on writing
+ efficient C++ code.
+
+:doc:`GitHub`
+ Describes how to use the llvm-project repository and code reviews on GitHub.
+
+:doc:`GitBisecting`
+ Describes how to use ``git bisect`` on LLVM's repository.
+
+:doc:`GitRepositoryPolicy`
+ Collection of policies around the git repositories.
+
+.. _development-process:
+
+Development Process
+-------------------
+
+Information about LLVM's development process.
+
+.. toctree::
+ :hidden:
+
+ Projects
+ HowToReleaseLLVM
+ ReleaseProcess
+ HowToAddABuilder
+ ReleaseNotes
+
+:doc:`Projects`
+ How-to guide and templates for new projects that *use* the LLVM
+ infrastructure. The templates (directory organization, Makefiles, and test
+ tree) allow the project code to be located outside (or inside) the ``llvm/``
+ tree, while using LLVM header files and libraries.
+
+:doc:`HowToReleaseLLVM`
+ This is a guide to preparing LLVM releases. Most developers can ignore it.
+
+:doc:`ReleaseProcess`
+ This is a guide to validate a new release, during the release process. Most developers can ignore it.
+
+:doc:`HowToAddABuilder`
+ Instructions for adding new builder to LLVM buildbot master.
+
+:doc:`Release notes for the current release <ReleaseNotes>`
+ This describes new features, known bugs, and other limitations.
+
+.. _lists-forums:
+
+Forums & Mailing Lists
+----------------------
+
+If you can't find what you need in these docs, try consulting the
+Discourse forums. There are also commit mailing lists for all commits to the LLVM Project.
+The :doc:`CodeOfConduct` applies to all these forums and mailing lists.
+
+`LLVM Discourse`__
+ The forums for all things LLVM and related sub-projects. There are categories and subcategories for a wide variety of areas within LLVM. You can also view tags or search for a specific topic.
+
+ .. __: https://discourse.llvm.org/
+
+`Commits Archive (llvm-commits)`__
+ This list contains all commit messages that are made when LLVM developers
+ commit code changes to the repository. It also serves as a forum for
+ patch review (i.e. send patches here). It is useful for those who want to
+ stay on the bleeding edge of LLVM development. This list is very high
+ volume.
+
+ .. __: http://lists.llvm.org/pipermail/llvm-commits/
+
+`Bugs & Patches Archive (llvm-bugs)`__
+ This list gets emailed every time a bug is opened and closed. It is
+ higher volume than the LLVM-dev list.
+
+ .. __: http://lists.llvm.org/pipermail/llvm-bugs/
+
+`LLVM Announcements`__
+ If you just want project wide announcements such as releases, developers meetings, or blog posts, then you should check out the Announcement category on LLVM Discourse.
+
+ .. __: https://discourse.llvm.org/c/announce/46
+
+.. _online-sync-ups:
+
+Online Sync-Ups
+---------------
+
+A number of regular calls are organized on specific topics. It should be
+expected that the range of topics will change over time. At the time of
+writing, the following sync-ups are organized.
+The :doc:`CodeOfConduct` applies to all online sync-ups.
+
+If you'd like to organize a new sync-up, please add the info in the table
+below. Please also create a calendar event for it and invite calendar at llvm.org
+to the event, so that it'll show up on the :ref:`llvm-community-calendar`.
+Please see :ref:`llvm-community-calendar-host-guidance` for more guidance on
+what to add to your calendar invite.
+
+.. list-table:: LLVM regular sync-up calls
+ :widths: 25 25 25 25
+ :header-rows: 1
+
+ * - Topic
+ - Frequency
+ - Calendar link
+ - Minutes/docs link
+ * - Loop Optimization Working Group
+ - Every 2 weeks on Wednesday
+ - `ics <./_static/LoopOptWG_invite.ics>`__
+ - `Minutes/docs <https://docs.google.com/document/d/1sdzoyB11s0ccTZ3fobqctDpgJmRoFcz0sviKxqczs4g/edit>`__
+ * - RISC-V
+ - Every 2 weeks on Thursday
+ - `ics <https://calendar.google.com/calendar/ical/lowrisc.org_0n5pkesfjcnp0bh5hps1p0bd80%40group.calendar.google.com/public/basic.ics>`__
+ `gcal <https://calendar.google.com/calendar/b/1?cid=bG93cmlzYy5vcmdfMG41cGtlc2ZqY25wMGJoNWhwczFwMGJkODBAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ>`__
+ - `Minutes/docs <https://docs.google.com/document/d/1G3ocHm2zE6AYTS2N3_3w2UxFnSEyKkcF57siLWe-NVs>`__
+ * - Scalable Vectors and Arm SVE
+ - Monthly, every 3rd Tuesday
+ - `ics <https://calendar.google.com/calendar/ical/bjms39pe6k6bo5egtsp7don414%40group.calendar.google.com/public/basic.ics>`__
+ `gcal <https://calendar.google.com/calendar/u/0/embed?src=bjms39pe6k6bo5egtsp7don414@group.calendar.google.com>`__
+ - `Minutes/docs <https://docs.google.com/document/d/1UPH2Hzou5RgGT8XfO39OmVXKEibWPfdYLELSaHr3xzo/edit>`__
+ * - ML Guided Compiler Optimizations
+ - Monthly
+ -
+ - `Minutes/docs <https://docs.google.com/document/d/1JecbplF09l3swTjze-UVeLh4L48svJxGVy4mz_e9Rhs/edit?usp=gmail#heading=h.ts9cmcjbir1j>`__
+ * - `LLVM security group <https://llvm.org/docs/Security.html>`__
+ - Monthly, every 3rd Tuesday
+ - `ics <https://calendar.google.com/calendar/ical/eoh3m9k1l6vqbd1fkp94fv5q74%40group.calendar.google.com/public/basic.ics>`__
+ `gcal <https://calendar.google.com/calendar/embed?src=eoh3m9k1l6vqbd1fkp94fv5q74%40group.calendar.google.com>`__
+ - `Minutes/docs <https://discourse.llvm.org/t/llvm-security-group-public-sync-ups/62735>`__
+ * - `CIRCT <https://github.com/llvm/circt>`__
+ - Weekly, on Wednesday
+ -
+ - `Minutes/docs <https://docs.google.com/document/d/1fOSRdyZR2w75D87yU2Ma9h2-_lEPL4NxvhJGJd-s5pk/edit#heading=h.mulvhjtr8dk9>`__
+ * - `MLIR <https://mlir.llvm.org>`__ design meetings
+ - Weekly, on Thursdays
+ -
+ - `Minutes/docs <https://docs.google.com/document/d/1y_9f1AbfgcoVdJh4_aM6-BaSHvrHl8zuA5G4jv_94K8/edit#heading=h.cite1kolful9>`__
+ * - flang
+ - Multiple meeting series, `documented here <https://github.com/llvm/llvm-project/blob/main/flang/docs/GettingInvolved.md#calls>`__
+ -
+ -
+ * - OpenMP
+ - Multiple meeting series, `documented here <https://openmp.llvm.org/docs/SupportAndFAQ.html>`__
+ -
+ -
+ * - LLVM Alias Analysis
+ - Every 4 weeks on Tuesdays
+ - `ics <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201103/a3499a67/attachment-0001.ics>`__
+ - `Minutes/docs <https://docs.google.com/document/d/17U-WvX8qyKc3S36YUKr3xfF-GHunWyYowXbxEdpHscw>`__
+ * - Vector Predication
+ - Every 2 weeks on Tuesdays, 3pm UTC
+ -
+ - `Minutes/docs <https://docs.google.com/document/d/1q26ToudQjnqN5x31zk8zgq_s0lem1-BF8pQmciLa4k8/edit?usp=sharing>`__
+ * - LLVM Pointer Authentication
+ - Every month on Mondays
+ - `ics <https://calendar.google.com/calendar/ical/fr1qtmrmt2s9odufjvurkb6j70%40group.calendar.google.com/public/basic.ics>`__
+ - `Minutes/docs <https://discourse.llvm.org/t/llvm-pointer-authentication-sync-ups/62661>`__
+ * - MemorySSA in LLVM
+ - Every 8 weeks on Mondays
+ - `ics <https://calendar.google.com/calendar/ical/c_1mincouiltpa24ac14of14lhi4%40group.calendar.google.com/public/basic.ics>`__
+ `gcal <https://calendar.google.com/calendar/embed?src=c_1mincouiltpa24ac14of14lhi4%40group.calendar.google.com>`__
+ - `Minutes/docs <https://docs.google.com/document/d/1-uEEZfmRdPThZlctOq9eXlmUaSSAAi8oKxhrPY_lpjk/edit#>`__
+ * - LLVM Embedded Toolchains
+ - Every 4 weeks on Thursdays
+ - `ics <https://drive.google.com/file/d/1uNa-PFYkhAfT83kR2Nc4Fi706TAQFBEL/view?usp=sharing>`__
+ `gcal <https://calendar.google.com/calendar/u/0?cid=ZDQyc3ZlajJmbjIzNG1jaTUybjFsdjA2dWNAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ>`__
+ - `Minutes/docs <https://docs.google.com/document/d/1GahxppHJ7o1O_fn1Mbidu1DHEg7V2aOr92LXCtNV1_o/edit?usp=sharing>`__
+ * - Clang C and C++ Language Working Group
+ - 1st and 3rd Wednesday of the month
+ - `gcal <https://calendar.google.com/calendar/u/0?cid=cW1lZGg0ZXNpMnIyZDN2aTVydGVrdWF1YzRAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ>`__
+ - `Minutes/docs <https://docs.google.com/document/d/1x5-RbOC6-jnI_NcJ9Dp4pSmGhhNe7lUevuWUIB46TeM/edit?usp=sharing>`__
+ * - LLVM SPIR-V Backend Working Group
+ - Every week on Monday
+ -
+ - `Meeting details/agenda <https://docs.google.com/document/d/1UjX-LAwPjJ75Nmb8a5jz-Qrm-pPtKtQw0k1S1Lop9jU/edit?usp=sharing>`__
+ * - SYCL Upstream Working Group
+ - Every 2 weeks on Mondays
+ - `gcal <https://calendar.google.com/calendar/u/0?cid=c3ljbC5sbHZtLndnQGdtYWlsLmNvbQ>`__
+ - `Meeting details/agenda <https://docs.google.com/document/d/1ivYDSn_5ChTeiZ7TiO64WC_jYJnGwAUiT9Ngi9cAdFU/edit?usp=sharing>`__
+ * - GlobalISel
+ - Every 2nd Tuesday of the month
+ - `gcal <https://calendar.google.com/calendar/u/0?cid=ZDcyMjc0ZjZiZjNhMzFlYmE3NTNkMWM2MGM2NjM5ZWU3ZDE2MjM4MGFlZDc2ZjViY2UyYzMwNzVhZjk4MzQ4ZEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t>`__
+ - `Meeting details/agenda <https://docs.google.com/document/d/1Ry8O4-Tm5BFj9AMjr8qTQFU80z-ptiNQ62687NaIvLs/edit?usp=sharing>`__
+ * - Floating Point Working Group
+ - Every 3rd Wednesday of the month
+ - `ics <https://calendar.google.com/calendar/ical/02582507bac79d186900712566ec3fc69b33ac24d7de0a8c76c7b19976f190c0%40group.calendar.google.com/private-6e35506dbfe13812e92e9aa8cd5d761d/basic.ics>`__
+ `gcal <https://calendar.google.com/calendar/u/0?cid=MDI1ODI1MDdiYWM3OWQxODY5MDA3MTI1NjZlYzNmYzY5YjMzYWMyNGQ3ZGUwYThjNzZjN2IxOTk3NmYxOTBjMEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t>`__
+ - `Meeting details/agenda: <https://docs.google.com/document/d/1QcmUlWftPlBi-Wz6b6PipqJfvjpJ-OuRMRnN9Dm2t0c>`__
+
+.. _office-hours:
+
+Office hours
+------------
+
+A number of experienced LLVM contributors make themselves available for a chat
+on a regular schedule, to anyone who is looking for some guidance. Please find
+the list of who is available when, through which medium, and what their area of
+expertise is. Don't be too shy to dial in!
+
+Office hours are also listed on the :ref:`llvm-community-calendar`. Of course,
+people take time off from time to time, so if you dial in and you don't find
+anyone present, chances are they happen to be off that day.
+
+The :doc:`CodeOfConduct` applies to all office hours.
+
+.. list-table:: LLVM office hours
+ :widths: 15 40 15 15 15
+ :header-rows: 1
+
+ * - Name
+ - In-scope topics
+ - When?
+ - Where?
+ - Languages
+ * - Kristof Beyls
+ - General questions on how to contribute to LLVM; organizing meetups;
+ submitting talks; and other general LLVM-related topics. Arm/AArch64
+ codegen. LLVM security group. LLVM Office Hours.
+ - Every 2nd and 4th Wednesday of the month at 9.30am CET, for 30 minutes.
+ `ics <https://calendar.google.com/calendar/ical/co0h4ndpvtfe64opn7eraiq3ac%40group.calendar.google.com/public/basic.ics>`__
+ - `Jitsi <https://meet.jit.si/KristofBeylsLLVMOfficeHour>`__
+ - English, Flemish, Dutch
+ * - Alina Sbirlea
+ - General questions on how to contribute to LLVM; women in compilers;
+ MemorySSA, BatchAA, various loop passes, new pass manager.
+ - Monthly, 2nd Tuesdays, 10.00am PT/7:00pm CET, for 30 minutes.
+ `ics <https://calendar.google.com/calendar/ical/c_pm6e7160iq7n5fcm1s6m3rjhh4%40group.calendar.google.com/public/basic.ics>`__
+ `gcal <https://calendar.google.com/calendar/embed?src=c_pm6e7160iq7n5fcm1s6m3rjhh4%40group.calendar.google.com>`__
+ - `GoogleMeet <https://meet.google.com/hhk-xpdj-gvx>`__
+ - English, Romanian
+ * - Aaron Ballman (he/him)
+ - Clang internals; frontend attributes; clang-tidy; clang-query; AST matchers
+ - Monthly, 2nd Monday and 3rd Friday of the month at 10:00am Eastern and again at 2:00pm Eastern, for 60 minutes.
+ `ics <https://calendar.google.com/calendar/ical/npgke5dug0uliud0qapptmps58%40group.calendar.google.com/public/basic.ics>`__
+ `gcal <https://calendar.google.com/calendar/embed?src=npgke5dug0uliud0qapptmps58%40group.calendar.google.com>`__
+ - `GoogleMeet <https://meet.google.com/xok-iqne-gmi>`__
+ - English, Norwegian (not fluently)
+ * - Johannes Doerfert (he/him)
+ - OpenMP, LLVM-IR, interprocedural optimizations, Attributor, workshops, research, ...
+ - Every week, Wednesdays 9:30am (Pacific Time), for 1 hour.
+ `ics <https://drive.google.com/file/d/1E_QkRvirmdJzlXf2EKBUX-v8Xj7-eW3v/view?usp=sharing>`__
+ - `MS Teams <https://teams.microsoft.com/l/meetup-join/19%3ameeting_MTMxNzU4MWYtYzViNS00OTM2LWJmNWQtMjg5ZWFhNGVjNzgw%40thread.v2/0?context=%7b%22Tid%22%3a%22a722dec9-ae4e-4ae3-9d75-fd66e2680a63%22%2c%22Oid%22%3a%22885bda30-ce8e-46db-aa7e-15de0474831a%22%7d>`__
+ - English, German
+ * - Tobias Grosser
+ - General questions on how to contribute to LLVM/MLIR, Polly, Loop Optimization, FPL, Research in LLVM, PhD in CS, Summer of Code.
+ - Monthly, last Monday of the month at 18:00 London time (typically 9am PT), for 30 minutes.
+ - `Video Call <https://meet.grosser.science/LLVMOfficeHours>`__
+ - English, German, Spanish, French
+ * - Anastasia Stulova
+ - Clang internals for C/C++ language extensions and dialects, OpenCL, GPU, SPIR-V, how to contribute, women in compilers.
+ - Monthly, 1st Tuesday of the month at 17:00 BST - London time (9:00am PT except for 2 weeks in spring), 30 mins slot.
+ - `GoogleMeet <https://meet.google.com/kdy-fdbv-nuk>`__
+ - English, Russian, German (not fluently)
+ * - Alexey Bader
+ - SYCL compiler, offload tools, OpenCL and SPIR-V, how to contribute.
+ - Monthly, 2nd Monday of the month at 9:30am PT, for 30 minutes.
+ - `GoogleMeet <https://meet.google.com/pdz-xhns-uus>`__
+ - English, Russian
+ * - Maksim Panchenko
+ - BOLT internals, IR, new passes, proposals, etc.
+ - Monthly, 2nd Wednesday of the month at 11:00am PT, for 30 minutes.
+ - `Zoom <https://fb.zoom.us/j/97065697120?pwd=NTFaUWJjZW9uVkJuaVlPTE9qclE3dz09>`__
+ - English, Russian
+ * - Quentin Colombet (he/him)
+ - LLVM/MLIR; Codegen (Instruction selection (GlobalISel/SDISel), Machine IR,
+ Register allocation, etc.); Optimizations; MCA
+ - Monthly, 1st Wednesday of the month at 8.00am PT, for 30 minutes.
+ `ics <https://calendar.google.com/calendar/ical/48c4ad60290a4df218e51e1ceec1106fe317b0ebc76938d9273592053f38204e%40group.calendar.google.com/public/basic.ics>`__
+ `gcal <https://calendar.google.com/calendar/embed?src=48c4ad60290a4df218e51e1ceec1106fe317b0ebc76938d9273592053f38204e%40group.calendar.google.com>`__
+ - `Google meet <https://meet.google.com/cbz-grrp-obs>`__
+ - English, French
+ * - Phoebe Wang (she/her)
+ - X86 backend, General questions to X86, women in compilers.
+ - Monthly, 3rd Wednesday of the month at 8:30am Beijing time, for 30 minutes.
+ - `MS Teams <https://teams.microsoft.com/l/meetup-join/19%3ameeting_NWQ0MjU0NjYtZjUyMi00YTU3LThmM2EtY2Y2YTE4NGM3NmFi%40thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%227b309d9c-a9bb-44c8-a940-ab97eef42d4d%22%7d>`__
+ - English, Chinese
+ * - Amara Emerson
+ - GlobalISel questions.
+ - Monthly, 4th Wednesday of the month at 9:30am PT, for 30 minutes.
+ - `Google meet <https://meet.google.com/pdd-dibg-cwv>`__
+ - English
+ * - Maksim Levental and Jeremy Kun
+ - MLIR newcomers and general discussion (`livestreamed <https://www.youtube.com/playlist?list=PLhxO86S3jsX2k7kOhZaV-qKWm8tNsUdAE>`__)
+ - Every two weeks, Fridays at 3:00pm US Pacific, for 90 minutes.
+ - Livestream chat or `Google meet <https://meet.google.com/wit-tvzc-dwc>`__
+ - English
+ * - Rotating hosts
+ - Getting Started, beginner questions, new contributors.
+ - Every Tuesday at 2 PM ET (11 AM PT), for 30 minutes.
+ - `Google meet <https://meet.google.com/nga-uhpf-bbb>`__
+ - English
+
+
+Guidance for office hours hosts
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+* If you're interested in becoming an office hours host, please add your
+ information to the list above. Please create a calendar event for it and
+ invite calendar at llvm.org to the event so that it'll show up on the
+ :ref:`llvm-community-calendar`.
+ Please see :ref:`llvm-community-calendar-host-guidance` for more guidance on
+ what to add to your calendar invite.
+* When starting an office hours session, consider typing something like "*Hi,
+ I'm available for chats in the next half hour at* video chat URL. *I'm
+ looking forward to having conversations on the video chat or here.*" on the
+ LLVM chat channels that you are already on. These could include:
+
+ * the `#office-hours Discord channel
+ <https://discord.com/channels/636084430946959380/976196303681896538>`__.
+ * :ref:`IRC`
+
+ Doing this can help:
+ * overcome potential anxiety to call in for a first time,
+ * people who prefer to first exchange a few messages through text chat
+ before dialing in, and
+ * remind the wider community that office hours do exist.
+* If you decide to no longer host office hours, please do remove your entry
+ from the list above.
+
+
+.. _IRC:
+
+IRC
+---
+
+Users and developers of the LLVM project (including subprojects such as Clang)
+can be found in #llvm on `irc.oftc.net <irc://irc.oftc.net/llvm>`_. The channel
+is actively moderated.
+
+The #llvm-build channel has a bot for
+`LLVM buildbot <http://lab.llvm.org/buildbot/#/console>`_ status changes. The
+bot will post a message with a link to a build bot and a blamelist when a build
+goes from passing to failing and again (without the blamelist) when the build
+goes from failing back to passing. It is a good channel for actively monitoring
+build statuses, but it is a noisy channel due to the automated messages. The
+channel is not actively moderated.
+
+In addition to the traditional IRC there is a
+`Discord <https://discord.com/channels/636084430946959380/636725486533345280>`_
+chat server available. To sign up, please use this
+`invitation link <https://discord.com/invite/xS7Z362>`_.
+
+
+.. _meetups-social-events:
+
+Meetups and social events
+-------------------------
+
+.. toctree::
+ :hidden:
+
+ MeetupGuidelines
+
+Besides developer `meetings and conferences <https://llvm.org/devmtg/>`_,
+there are several user groups called
+`LLVM Socials <https://www.meetup.com/pro/llvm/>`_. We greatly encourage you to
+join one in your city. Or start a new one if there is none:
+
+:doc:`MeetupGuidelines`
+
+.. _community-proposals:
+
+Community wide proposals
+------------------------
+
+Proposals for massive changes in how the community behaves and how the work flow
+can be better.
+
+.. toctree::
+ :hidden:
+
+ Proposals/GitHubMove
+ BugpointRedesign
+ Proposals/TestSuite
+ Proposals/VariableNames
+ Proposals/VectorPredication
+
+:doc:`Proposals/GitHubMove`
+ Proposal to move from SVN/Git to GitHub.
+
+:doc:`BugpointRedesign`
+ Design doc for a redesign of the Bugpoint tool.
+
+:doc:`Proposals/TestSuite`
+ Proposals for additional benchmarks/programs for llvm's test-suite.
+
+:doc:`Proposals/VariableNames`
+ Proposal to change the variable names coding standard.
+
+:doc:`Proposals/VectorPredication`
+ Proposal for predicated vector instructions in LLVM.
+
+.. _llvm-community-calendar:
+
+LLVM community calendar
+-----------------------
+
+We aim to maintain a public calendar view of all events happening in the LLVM
+community such as :ref:`online-sync-ups` and :ref:`office-hours`. The calendar
+can be found at
+https://calendar.google.com/calendar/u/0/embed?src=calendar@llvm.org and can
+also be seen inline below:
+
+.. raw:: html
+
+ <iframe src="https://calendar.google.com/calendar/embed?height=600&wkst=1&bgcolor=%23ffffff&ctz=UTC&showCalendars=0&showDate=1&showNav=1&src=Y2FsZW5kYXJAbGx2bS5vcmc&color=%23039BE5" style="border:solid 1px #777" width="800" height="600" frameborder="0" scrolling="no"></iframe>
+
+Note that the web view of the LLVM community calendar shows events in
+Coordinated Universal Time (UTC). If you use Google Calendar, consider
+subscribing to it with the + button in the bottom-right corner to view all
+events in your local timezone alongside your other calendars.
+
+.. _llvm-community-calendar-host-guidance:
+
+Guidance on what to put into LLVM community calendar invites
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+To add your event, create a calendar event for it and invite calendar at llvm.org
+on it. Your event should then show up on the community calendar.
+
+Please put the following pieces of information in your calendar invite:
+
+* Write a single paragraph describing what the event is about. Include things
+ such as who the event is for and what sort of topics are discussed.
+* State explicitly that the :doc:`CodeOfConduct` applies to this event.
+* Make it clear who:
+
+ * the organizer is.
+
+ * the person to contact is in case of any code-of-conduct issues. Typically,
+ this would be the organizer.
+
+* If you have meeting minutes for your event, add a pointer to where those live.
+ A good place for meeting minutes could be as a post on LLVM Discourse.
+
+An example invite looks as follows
+
+.. code-block:: none
+
+ This event is a meetup for all developers of LLDB. Meeting agendas are posted
+ on discourse before the event.
+
+ Attendees are required to adhere to the LLVM Code of Conduct
+ (https://llvm.org/docs/CodeOfConduct.html). For any Code of Conduct reports,
+ please contact the organizers, and also email conduct at llvm.org.
+
+ Agenda/Meeting Minutes: Link to minutes
+
+ Organizer(s): First Surname (name at email.com)
+
diff --git a/llvm/docs/GettingStartedTutorials.rst b/llvm/docs/GettingStartedTutorials.rst
index a6541acf47ada5..55060343ba361f 100644
--- a/llvm/docs/GettingStartedTutorials.rst
+++ b/llvm/docs/GettingStartedTutorials.rst
@@ -1,43 +1,43 @@
-Getting Started/Tutorials
-=========================
-
-For those new to the LLVM system.
-
-.. toctree::
- :hidden:
-
- CompilerWriterInfo
- Frontend/PerformanceTips
- GettingStarted
- GettingStartedVS
- ProgrammersManual
- tutorial/index
- MyFirstTypoFix
-
-:doc:`GettingStarted`
- Discusses how to get up and running quickly with the LLVM infrastructure.
- Everything from unpacking and compilation of the distribution to execution
- of some tools.
-
-:doc:`tutorial/index`
- Tutorials about using LLVM. Includes a tutorial about making a custom
- language with LLVM.
-
-:doc:`ProgrammersManual`
- Introduction to the general layout of the LLVM sourcebase, important classes
- and APIs, and some tips & tricks.
-
-:doc:`Frontend/PerformanceTips`
- A collection of tips for frontend authors on how to generate IR
- which LLVM is able to effectively optimize.
-
-:doc:`GettingStartedVS`
- An addendum to the main Getting Started guide for those using Visual Studio
- on Windows.
-
-:doc:`CompilerWriterInfo`
- A list of helpful links for compiler writers.
-
-:doc:`MyFirstTypoFix`
- This tutorial will guide you through the process of making a change to
- LLVM, and contributing it back to the LLVM project.
+Getting Started/Tutorials
+=========================
+
+For those new to the LLVM system.
+
+.. toctree::
+ :hidden:
+
+ CompilerWriterInfo
+ Frontend/PerformanceTips
+ GettingStarted
+ GettingStartedVS
+ ProgrammersManual
+ tutorial/index
+ MyFirstTypoFix
+
+:doc:`GettingStarted`
+ Discusses how to get up and running quickly with the LLVM infrastructure.
+ Everything from unpacking and compilation of the distribution to execution
+ of some tools.
+
+:doc:`tutorial/index`
+ Tutorials about using LLVM. Includes a tutorial about making a custom
+ language with LLVM.
+
+:doc:`ProgrammersManual`
+ Introduction to the general layout of the LLVM sourcebase, important classes
+ and APIs, and some tips & tricks.
+
+:doc:`Frontend/PerformanceTips`
+ A collection of tips for frontend authors on how to generate IR
+ which LLVM is able to effectively optimize.
+
+:doc:`GettingStartedVS`
+ An addendum to the main Getting Started guide for those using Visual Studio
+ on Windows.
+
+:doc:`CompilerWriterInfo`
+ A list of helpful links for compiler writers.
+
+:doc:`MyFirstTypoFix`
+ This tutorial will guide you through the process of making a change to
+ LLVM, and contributing it back to the LLVM project.
diff --git a/llvm/docs/PDB/CodeViewSymbols.rst b/llvm/docs/PDB/CodeViewSymbols.rst
index b056b804e5ad37..0f218db412f33e 100644
--- a/llvm/docs/PDB/CodeViewSymbols.rst
+++ b/llvm/docs/PDB/CodeViewSymbols.rst
@@ -93,9 +93,9 @@ the compiler decided to emit is impractical. This differs from DWARF, where eve
though we don't necessarily have O(1) lookup by basename within a given scope (including
O(1) scope, we at least have O(n) access within a given scope).
-.. important::
- Program-wide lookup of names by anything other than an exact textually matching fully
- qualified name is not possible.
+.. important::
+ Program-wide lookup of names by anything other than an exact textually matching fully
+ qualified name is not possible.
S_GDATA32
diff --git a/llvm/docs/Reference.rst b/llvm/docs/Reference.rst
index 1661c8c533db1d..df61628b06c7db 100644
--- a/llvm/docs/Reference.rst
+++ b/llvm/docs/Reference.rst
@@ -1,234 +1,234 @@
-Reference
-=========
-
-LLVM and API reference documentation.
-
-.. contents::
- :local:
-
-.. toctree::
- :hidden:
-
- Atomics
- BitCodeFormat
- BlockFrequencyTerminology
- BranchWeightMetadata
- Bugpoint
- CommandGuide/index
- ConvergenceAndUniformity
- ConvergentOperations
- Coroutines
- DependenceGraphs/index
- ExceptionHandling
- Extensions
- FaultMaps
- FuzzingLLVM
- GarbageCollection
- GetElementPtr
- GlobalISel/index
- GwpAsan
- HowToSetUpLLVMStyleRTTI
- HowToUseAttributes
- InAlloca
- LangRef
- LibFuzzer
- MarkedUpDisassembly
- MIRLangRef
- OptBisect
- PCSectionsMetadata
- PDB/index
- PointerAuth
- ScudoHardenedAllocator
- MemoryModelRelaxationAnnotations
- MemTagSanitizer
- Security
- SecurityTransparencyReports
- SegmentedStacks
- StackMaps
- SpeculativeLoadHardening
- Statepoints
- SymbolizerMarkupFormat
- SystemLibrary
- TestingGuide
- TransformMetadata
- TypeMetadata
- XRay
- XRayExample
- XRayFDRFormat
- YamlIO
-
-API Reference
--------------
-
-`Doxygen generated documentation <https://llvm.org/doxygen/>`_
- (`classes <https://llvm.org/doxygen/inherits.html>`_)
-
-:doc:`HowToUseAttributes`
- Answers some questions about the new Attributes infrastructure.
-
-LLVM Reference
---------------
-
-======================
-Command Line Utilities
-======================
-
-:doc:`LLVM Command Guide <CommandGuide/index>`
- A reference manual for the LLVM command line utilities ("man" pages for LLVM
- tools).
-
-:doc:`Bugpoint`
- Automatic bug finder and test-case reducer description and usage
- information.
-
-:doc:`OptBisect`
- A command line option for debugging optimization-induced failures.
-
-:doc:`SymbolizerMarkupFormat`
- A reference for the log symbolizer markup accepted by ``llvm-symbolizer``.
-
-:doc:`The Microsoft PDB File Format <PDB/index>`
- A detailed description of the Microsoft PDB (Program Database) file format.
-
-==================
-Garbage Collection
-==================
-
-:doc:`GarbageCollection`
- The interfaces source-language compilers should use for compiling GC'd
- programs.
-
-:doc:`Statepoints`
- This describes a set of experimental extensions for garbage
- collection support.
-
-=========
-LibFuzzer
-=========
-
-:doc:`LibFuzzer`
- A library for writing in-process guided fuzzers.
-
-:doc:`FuzzingLLVM`
- Information on writing and using Fuzzers to find bugs in LLVM.
-
-========
-LLVM IR
-========
-
-:doc:`LLVM Language Reference Manual <LangRef>`
- Defines the LLVM intermediate representation and the assembly form of the
- different nodes.
-
-:doc:`InAlloca`
- Description of the ``inalloca`` argument attribute.
-
-:doc:`BitCodeFormat`
- This describes the file format and encoding used for LLVM "bc" files.
-
-:doc:`Machine IR (MIR) Format Reference Manual <MIRLangRef>`
- A reference manual for the MIR serialization format, which is used to test
- LLVM's code generation passes.
-
-:doc:`GlobalISel/index`
- This describes the prototype instruction selection replacement, GlobalISel.
-
-:doc:`ConvergentOperations`
- Description of ``convergent`` operation semantics and related intrinsics.
-
-=====================
-Testing and Debugging
-=====================
-
-:doc:`LLVM Testing Infrastructure Guide <TestingGuide>`
- A reference manual for using the LLVM testing infrastructure.
-
-:doc:`TestSuiteGuide`
- Describes how to compile and run the test-suite benchmarks.
-
-
-:doc:`GwpAsan`
- A sampled heap memory error detection toolkit designed for production use.
-
-====
-XRay
-====
-
-:doc:`XRay`
- High-level documentation of how to use XRay in LLVM.
-
-:doc:`XRayExample`
- An example of how to debug an application with XRay.
-
-=================
-Additional Topics
-=================
-
-:doc:`FaultMaps`
- LLVM support for folding control flow into faulting machine instructions.
-
-:doc:`Atomics`
- Information about LLVM's concurrency model.
-
-:doc:`ExceptionHandling`
- This document describes the design and implementation of exception handling
- in LLVM.
-
-:doc:`Extensions`
- LLVM-specific extensions to tools and formats LLVM seeks compatibility with.
-
-:doc:`HowToSetUpLLVMStyleRTTI`
- How to make ``isa<>``, ``dyn_cast<>``, etc. available for clients of your
- class hierarchy.
-
-:doc:`BlockFrequencyTerminology`
- Provides information about terminology used in the ``BlockFrequencyInfo``
- analysis pass.
-
-:doc:`BranchWeightMetadata`
- Provides information about Branch Prediction Information.
-
-:doc:`GetElementPtr`
- Answers to some very frequent questions about LLVM's most frequently
- misunderstood instruction.
-
-:doc:`ScudoHardenedAllocator`
- A library that implements a security-hardened `malloc()`.
-
-:doc:`MemoryModelRelaxationAnnotations`
- Target-defined relaxation to LLVM's concurrency model.
-
-:doc:`MemTagSanitizer`
- Security hardening for production code aiming to mitigate memory
- related vulnerabilities. Based on the Armv8.5-A Memory Tagging Extension.
-
-:doc:`Dependence Graphs <DependenceGraphs/index>`
- A description of the design of the various dependence graphs such as
- the DDG (Data Dependence Graph).
-
-:doc:`SpeculativeLoadHardening`
- A description of the Speculative Load Hardening mitigation for Spectre v1.
-
-:doc:`SegmentedStacks`
- This document describes segmented stacks and how they are used in LLVM.
-
-:doc:`MarkedUpDisassembly`
- This document describes the optional rich disassembly output syntax.
-
-:doc:`StackMaps`
- LLVM support for mapping instruction addresses to the location of
- values and allowing code to be patched.
-
-:doc:`Coroutines`
- LLVM support for coroutines.
-
-:doc:`PointerAuth`
- A description of pointer authentication, its LLVM IR representation, and its
- support in the backend.
-
-:doc:`YamlIO`
- A reference guide for using LLVM's YAML I/O library.
-
-:doc:`ConvergenceAndUniformity`
- A description of uniformity analysis in the presence of irreducible
- control flow, and its implementation.
+Reference
+=========
+
+LLVM and API reference documentation.
+
+.. contents::
+ :local:
+
+.. toctree::
+ :hidden:
+
+ Atomics
+ BitCodeFormat
+ BlockFrequencyTerminology
+ BranchWeightMetadata
+ Bugpoint
+ CommandGuide/index
+ ConvergenceAndUniformity
+ ConvergentOperations
+ Coroutines
+ DependenceGraphs/index
+ ExceptionHandling
+ Extensions
+ FaultMaps
+ FuzzingLLVM
+ GarbageCollection
+ GetElementPtr
+ GlobalISel/index
+ GwpAsan
+ HowToSetUpLLVMStyleRTTI
+ HowToUseAttributes
+ InAlloca
+ LangRef
+ LibFuzzer
+ MarkedUpDisassembly
+ MIRLangRef
+ OptBisect
+ PCSectionsMetadata
+ PDB/index
+ PointerAuth
+ ScudoHardenedAllocator
+ MemoryModelRelaxationAnnotations
+ MemTagSanitizer
+ Security
+ SecurityTransparencyReports
+ SegmentedStacks
+ StackMaps
+ SpeculativeLoadHardening
+ Statepoints
+ SymbolizerMarkupFormat
+ SystemLibrary
+ TestingGuide
+ TransformMetadata
+ TypeMetadata
+ XRay
+ XRayExample
+ XRayFDRFormat
+ YamlIO
+
+API Reference
+-------------
+
+`Doxygen generated documentation <https://llvm.org/doxygen/>`_
+ (`classes <https://llvm.org/doxygen/inherits.html>`_)
+
+:doc:`HowToUseAttributes`
+ Answers some questions about the new Attributes infrastructure.
+
+LLVM Reference
+--------------
+
+======================
+Command Line Utilities
+======================
+
+:doc:`LLVM Command Guide <CommandGuide/index>`
+ A reference manual for the LLVM command line utilities ("man" pages for LLVM
+ tools).
+
+:doc:`Bugpoint`
+ Automatic bug finder and test-case reducer description and usage
+ information.
+
+:doc:`OptBisect`
+ A command line option for debugging optimization-induced failures.
+
+:doc:`SymbolizerMarkupFormat`
+ A reference for the log symbolizer markup accepted by ``llvm-symbolizer``.
+
+:doc:`The Microsoft PDB File Format <PDB/index>`
+ A detailed description of the Microsoft PDB (Program Database) file format.
+
+==================
+Garbage Collection
+==================
+
+:doc:`GarbageCollection`
+ The interfaces source-language compilers should use for compiling GC'd
+ programs.
+
+:doc:`Statepoints`
+ This describes a set of experimental extensions for garbage
+ collection support.
+
+=========
+LibFuzzer
+=========
+
+:doc:`LibFuzzer`
+ A library for writing in-process guided fuzzers.
+
+:doc:`FuzzingLLVM`
+ Information on writing and using Fuzzers to find bugs in LLVM.
+
+========
+LLVM IR
+========
+
+:doc:`LLVM Language Reference Manual <LangRef>`
+ Defines the LLVM intermediate representation and the assembly form of the
+ different nodes.
+
+:doc:`InAlloca`
+ Description of the ``inalloca`` argument attribute.
+
+:doc:`BitCodeFormat`
+ This describes the file format and encoding used for LLVM "bc" files.
+
+:doc:`Machine IR (MIR) Format Reference Manual <MIRLangRef>`
+ A reference manual for the MIR serialization format, which is used to test
+ LLVM's code generation passes.
+
+:doc:`GlobalISel/index`
+ This describes the prototype instruction selection replacement, GlobalISel.
+
+:doc:`ConvergentOperations`
+ Description of ``convergent`` operation semantics and related intrinsics.
+
+=====================
+Testing and Debugging
+=====================
+
+:doc:`LLVM Testing Infrastructure Guide <TestingGuide>`
+ A reference manual for using the LLVM testing infrastructure.
+
+:doc:`TestSuiteGuide`
+ Describes how to compile and run the test-suite benchmarks.
+
+
+:doc:`GwpAsan`
+ A sampled heap memory error detection toolkit designed for production use.
+
+====
+XRay
+====
+
+:doc:`XRay`
+ High-level documentation of how to use XRay in LLVM.
+
+:doc:`XRayExample`
+ An example of how to debug an application with XRay.
+
+=================
+Additional Topics
+=================
+
+:doc:`FaultMaps`
+ LLVM support for folding control flow into faulting machine instructions.
+
+:doc:`Atomics`
+ Information about LLVM's concurrency model.
+
+:doc:`ExceptionHandling`
+ This document describes the design and implementation of exception handling
+ in LLVM.
+
+:doc:`Extensions`
+ LLVM-specific extensions to tools and formats LLVM seeks compatibility with.
+
+:doc:`HowToSetUpLLVMStyleRTTI`
+ How to make ``isa<>``, ``dyn_cast<>``, etc. available for clients of your
+ class hierarchy.
+
+:doc:`BlockFrequencyTerminology`
+ Provides information about terminology used in the ``BlockFrequencyInfo``
+ analysis pass.
+
+:doc:`BranchWeightMetadata`
+ Provides information about Branch Prediction Information.
+
+:doc:`GetElementPtr`
+ Answers to some very frequent questions about LLVM's most frequently
+ misunderstood instruction.
+
+:doc:`ScudoHardenedAllocator`
+ A library that implements a security-hardened `malloc()`.
+
+:doc:`MemoryModelRelaxationAnnotations`
+ Target-defined relaxation to LLVM's concurrency model.
+
+:doc:`MemTagSanitizer`
+ Security hardening for production code aiming to mitigate memory
+ related vulnerabilities. Based on the Armv8.5-A Memory Tagging Extension.
+
+:doc:`Dependence Graphs <DependenceGraphs/index>`
+ A description of the design of the various dependence graphs such as
+ the DDG (Data Dependence Graph).
+
+:doc:`SpeculativeLoadHardening`
+ A description of the Speculative Load Hardening mitigation for Spectre v1.
+
+:doc:`SegmentedStacks`
+ This document describes segmented stacks and how they are used in LLVM.
+
+:doc:`MarkedUpDisassembly`
+ This document describes the optional rich disassembly output syntax.
+
+:doc:`StackMaps`
+ LLVM support for mapping instruction addresses to the location of
+ values and allowing code to be patched.
+
+:doc:`Coroutines`
+ LLVM support for coroutines.
+
+:doc:`PointerAuth`
+ A description of pointer authentication, its LLVM IR representation, and its
+ support in the backend.
+
+:doc:`YamlIO`
+ A reference guide for using LLVM's YAML I/O library.
+
+:doc:`ConvergenceAndUniformity`
+ A description of uniformity analysis in the presence of irreducible
+ control flow, and its implementation.
diff --git a/llvm/docs/UserGuides.rst b/llvm/docs/UserGuides.rst
index f40a04d414a28c..18d273a51daf60 100644
--- a/llvm/docs/UserGuides.rst
+++ b/llvm/docs/UserGuides.rst
@@ -1,286 +1,286 @@
-User Guides
-===========
-
-NOTE: If you are a user who is only interested in using an LLVM-based compiler,
-you should look into `Clang <https://clang.llvm.org>`_ instead. The
-documentation here is intended for users who have a need to work with the
-intermediate LLVM representation.
-
-.. contents::
- :local:
-
-.. toctree::
- :hidden:
-
- AArch64SME
- AddingConstrainedIntrinsics
- AdvancedBuilds
- AliasAnalysis
- AMDGPUUsage
- Benchmarking
- BigEndianNEON
- BuildingADistribution
- CFIVerify
- CMake
- CMakePrimer
- CodeGenerator
- CodeOfConduct
- CommandLine
- CompileCudaWithLLVM
- CoverageMappingFormat
- CycleTerminology
- DebuggingJITedCode
- DirectXUsage
- Docker
- FatLTO
- ExtendingLLVM
- GitHub
- GoldPlugin
- GlobalISel/MIRPatterns
- HowToBuildOnARM
- HowToBuildWithPGO
- HowToBuildWindowsItaniumPrograms
- HowToCrossCompileBuiltinsOnArm
- HowToCrossCompileLLVM
- HowToUpdateDebugInfo
- InstCombineContributorGuide
- InstrProfileFormat
- InstrRefDebugInfo
- LinkTimeOptimization
- LoopTerminology
- MarkdownQuickstartTemplate
- MemorySSA
- MergeFunctions
- MCJITDesignAndImplementation
- MisExpect
- ORCv2
- OpaquePointers
- JITLink
- NewPassManager
- NVPTXUsage
- Passes
- ReportingGuide
- ResponseGuide
- Remarks
- RemoveDIsDebugInfo
- RISCVUsage
- SourceLevelDebugging
- SPIRVUsage
- StackSafetyAnalysis
- SupportLibrary
- TableGen/index
- TableGenFundamentals
- Vectorizers
- WritingAnLLVMPass
- WritingAnLLVMNewPMPass
- WritingAnLLVMBackend
- yaml2obj
-
-Clang
------
-
-:doc:`HowToBuildOnARM`
- Notes on building and testing LLVM/Clang on ARM.
-
-:doc:`HowToBuildWithPGO`
- Notes on building LLVM/Clang with PGO.
-
-:doc:`HowToCrossCompileLLVM`
- Notes on cross-building and testing LLVM/Clang.
-
-`How to build the C, C++, ObjC, and ObjC++ front end`__
- Instructions for building the clang front-end from source.
-
- .. __: https://clang.llvm.org/get_started.html
-
-:doc:`CoverageMappingFormat`
- This describes the format and encoding used for LLVM’s code coverage mapping.
-
-:doc:`CFIVerify`
- A description of the verification tool for Control Flow Integrity.
-
-LLVM Builds and Distributions
------------------------------
-
-:doc:`BuildingADistribution`
- A best-practices guide for using LLVM's CMake build system to package and
- distribute LLVM-based tools.
-
-:doc:`CMake`
- An addendum to the main Getting Started guide for those using the `CMake
- build system <http://www.cmake.org>`_.
-
-:doc:`Docker`
- A reference for using Dockerfiles provided with LLVM.
-
-:doc:`Support Library <SupportLibrary>`
- This document describes the LLVM Support Library (``lib/Support``) and
- how to keep LLVM source code portable.
-
-:doc:`AdvancedBuilds`
- This document describes more advanced build configurations.
-
-Optimizations
--------------
-
-:doc:`WritingAnLLVMNewPMPass`
- Information on how to write LLVM transformations under the new pass
- manager.
-
-:doc:`WritingAnLLVMPass`
- Information on how to write LLVM transformations and analyses under the
- legacy pass manager.
-
-:doc:`Passes`
- A list of optimizations and analyses implemented in LLVM.
-
-:doc:`StackSafetyAnalysis`
- This document describes the design of the stack safety analysis of local
- variables.
-
-:doc:`MergeFunctions`
- Describes functions merging optimization.
-
-:doc:`AliasAnalysis`
- Information on how to write a new alias analysis implementation or how to
- use existing analyses.
-
-:doc:`MemorySSA`
- Information about the MemorySSA utility in LLVM, as well as how to use it.
-
-:doc:`LoopTerminology`
- A document describing Loops and associated terms as used in LLVM.
-
-:doc:`CycleTerminology`
- A document describing cycles as a generalization of loops.
-
-:doc:`Vectorizers`
- This document describes the current status of vectorization in LLVM.
-
-:doc:`LinkTimeOptimization`
- This document describes the interface between LLVM intermodular optimizer
- and the linker and its design
-
-:doc:`GoldPlugin`
- How to build your programs with link-time optimization on Linux.
-
-:doc:`Remarks`
- A reference on the implementation of remarks in LLVM.
-
-:doc:`Source Level Debugging with LLVM <SourceLevelDebugging>`
- This document describes the design and philosophy behind the LLVM
- source-level debugger.
-
-:doc:`How to Update Debug Info <HowToUpdateDebugInfo>`
- This document specifies how to correctly update debug info in various kinds
- of code transformations.
-
-:doc:`InstrRefDebugInfo`
- This document explains how LLVM uses value tracking, or instruction
- referencing, to determine variable locations for debug info in the final
- stages of compilation.
-
-:doc:`RemoveDIsDebugInfo`
- This is a migration guide describing how to move from debug info using
- intrinsics such as dbg.value to using the non-instruction DbgRecord object.
-
-:doc:`InstrProfileFormat`
- This document explains two binary formats of instrumentation-based profiles.
-
-:doc:`InstCombineContributorGuide`
- This document specifies guidelines for contributions for InstCombine and
- related passes.
-
-Code Generation
----------------
-
-:doc:`WritingAnLLVMBackend`
- Information on how to write LLVM backends for machine targets.
-
-:doc:`CodeGenerator`
- The design and implementation of the LLVM code generator. Useful if you are
- working on retargetting LLVM to a new architecture, designing a new codegen
- pass, or enhancing existing components.
-
-:doc:`TableGen <TableGen/index>`
- Describes the TableGen tool, which is used heavily by the LLVM code
- generator.
-
-==========
-GlobalISel
-==========
-
-:doc:`MIRPatterns <GlobalISel/MIRPatterns>`
- Describes the design of MIR Patterns and how to use them.
-
-===
-JIT
-===
-
-:doc:`MCJITDesignAndImplementation`
- Describes the inner workings of MCJIT execution engine.
-
-:doc:`ORCv2`
- Describes the design and implementation of the ORC APIs, including some
- usage examples, and a guide for users transitioning from ORCv1 to ORCv2.
-
-:doc:`JITLink`
- Describes the design and APIs for the JITLink library, ORC's new JIT
- linker.
-
-:doc:`DebuggingJITedCode`
- How to debug JITed code with GDB.
-
-Additional Topics
------------------
-
-:doc:`CommandLine`
- Provides information on using the command line parsing library.
-
-:doc:`ExtendingLLVM`
- Look here to see how to add instructions and intrinsics to LLVM.
-
-:doc:`AddingConstrainedIntrinsics`
- Gives the steps necessary when adding a new constrained math intrinsic
- to LLVM.
-
-:doc:`HowToBuildWindowsItaniumPrograms`
- Notes on assembling a Windows Itanium environment.
-
-:doc:`HowToCrossCompileBuiltinsOnArm`
- Notes on cross-building and testing the compiler-rt builtins for Arm.
-
-:doc:`BigEndianNEON`
- LLVM's support for generating NEON instructions on big endian ARM targets is
- somewhat nonintuitive. This document explains the implementation and rationale.
-
-:doc:`AArch64SME`
- LLVM's support for AArch64 SME ACLE and ABI.
-
-:doc:`CompileCudaWithLLVM`
- LLVM support for CUDA.
-
-:doc:`NVPTXUsage`
- This document describes using the NVPTX backend to compile GPU kernels.
-
-:doc:`AMDGPUUsage`
- This document describes using the AMDGPU backend to compile GPU kernels.
-
-:doc:`AMDGPUDwarfExtensionsForHeterogeneousDebugging`
- This document describes DWARF extensions to support heterogeneous debugging
- for targets such as the AMDGPU backend.
-
-:doc:`AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack/AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack`
- This document describes a DWARF extension to allow location descriptions on
- the DWARF expression stack. It is part of
- :doc:`AMDGPUDwarfExtensionsForHeterogeneousDebugging`.
-
-:doc:`SPIRVUsage`
- This document describes using the SPIR-V target to compile GPU kernels.
-
-:doc:`DirectXUsage`
- This document describes using the DirectX target to compile GPU code for the
- DirectX runtime.
-
-:doc:`RISCVUsage`
- This document describes using the RISCV-V target.
+User Guides
+===========
+
+NOTE: If you are a user who is only interested in using an LLVM-based compiler,
+you should look into `Clang <https://clang.llvm.org>`_ instead. The
+documentation here is intended for users who have a need to work with the
+intermediate LLVM representation.
+
+.. contents::
+ :local:
+
+.. toctree::
+ :hidden:
+
+ AArch64SME
+ AddingConstrainedIntrinsics
+ AdvancedBuilds
+ AliasAnalysis
+ AMDGPUUsage
+ Benchmarking
+ BigEndianNEON
+ BuildingADistribution
+ CFIVerify
+ CMake
+ CMakePrimer
+ CodeGenerator
+ CodeOfConduct
+ CommandLine
+ CompileCudaWithLLVM
+ CoverageMappingFormat
+ CycleTerminology
+ DebuggingJITedCode
+ DirectXUsage
+ Docker
+ FatLTO
+ ExtendingLLVM
+ GitHub
+ GoldPlugin
+ GlobalISel/MIRPatterns
+ HowToBuildOnARM
+ HowToBuildWithPGO
+ HowToBuildWindowsItaniumPrograms
+ HowToCrossCompileBuiltinsOnArm
+ HowToCrossCompileLLVM
+ HowToUpdateDebugInfo
+ InstCombineContributorGuide
+ InstrProfileFormat
+ InstrRefDebugInfo
+ LinkTimeOptimization
+ LoopTerminology
+ MarkdownQuickstartTemplate
+ MemorySSA
+ MergeFunctions
+ MCJITDesignAndImplementation
+ MisExpect
+ ORCv2
+ OpaquePointers
+ JITLink
+ NewPassManager
+ NVPTXUsage
+ Passes
+ ReportingGuide
+ ResponseGuide
+ Remarks
+ RemoveDIsDebugInfo
+ RISCVUsage
+ SourceLevelDebugging
+ SPIRVUsage
+ StackSafetyAnalysis
+ SupportLibrary
+ TableGen/index
+ TableGenFundamentals
+ Vectorizers
+ WritingAnLLVMPass
+ WritingAnLLVMNewPMPass
+ WritingAnLLVMBackend
+ yaml2obj
+
+Clang
+-----
+
+:doc:`HowToBuildOnARM`
+ Notes on building and testing LLVM/Clang on ARM.
+
+:doc:`HowToBuildWithPGO`
+ Notes on building LLVM/Clang with PGO.
+
+:doc:`HowToCrossCompileLLVM`
+ Notes on cross-building and testing LLVM/Clang.
+
+`How to build the C, C++, ObjC, and ObjC++ front end`__
+ Instructions for building the clang front-end from source.
+
+ .. __: https://clang.llvm.org/get_started.html
+
+:doc:`CoverageMappingFormat`
+ This describes the format and encoding used for LLVM’s code coverage mapping.
+
+:doc:`CFIVerify`
+ A description of the verification tool for Control Flow Integrity.
+
+LLVM Builds and Distributions
+-----------------------------
+
+:doc:`BuildingADistribution`
+ A best-practices guide for using LLVM's CMake build system to package and
+ distribute LLVM-based tools.
+
+:doc:`CMake`
+ An addendum to the main Getting Started guide for those using the `CMake
+ build system <http://www.cmake.org>`_.
+
+:doc:`Docker`
+ A reference for using Dockerfiles provided with LLVM.
+
+:doc:`Support Library <SupportLibrary>`
+ This document describes the LLVM Support Library (``lib/Support``) and
+ how to keep LLVM source code portable.
+
+:doc:`AdvancedBuilds`
+ This document describes more advanced build configurations.
+
+Optimizations
+-------------
+
+:doc:`WritingAnLLVMNewPMPass`
+ Information on how to write LLVM transformations under the new pass
+ manager.
+
+:doc:`WritingAnLLVMPass`
+ Information on how to write LLVM transformations and analyses under the
+ legacy pass manager.
+
+:doc:`Passes`
+ A list of optimizations and analyses implemented in LLVM.
+
+:doc:`StackSafetyAnalysis`
+ This document describes the design of the stack safety analysis of local
+ variables.
+
+:doc:`MergeFunctions`
+ Describes functions merging optimization.
+
+:doc:`AliasAnalysis`
+ Information on how to write a new alias analysis implementation or how to
+ use existing analyses.
+
+:doc:`MemorySSA`
+ Information about the MemorySSA utility in LLVM, as well as how to use it.
+
+:doc:`LoopTerminology`
+ A document describing Loops and associated terms as used in LLVM.
+
+:doc:`CycleTerminology`
+ A document describing cycles as a generalization of loops.
+
+:doc:`Vectorizers`
+ This document describes the current status of vectorization in LLVM.
+
+:doc:`LinkTimeOptimization`
+ This document describes the interface between LLVM intermodular optimizer
+ and the linker and its design
+
+:doc:`GoldPlugin`
+ How to build your programs with link-time optimization on Linux.
+
+:doc:`Remarks`
+ A reference on the implementation of remarks in LLVM.
+
+:doc:`Source Level Debugging with LLVM <SourceLevelDebugging>`
+ This document describes the design and philosophy behind the LLVM
+ source-level debugger.
+
+:doc:`How to Update Debug Info <HowToUpdateDebugInfo>`
+ This document specifies how to correctly update debug info in various kinds
+ of code transformations.
+
+:doc:`InstrRefDebugInfo`
+ This document explains how LLVM uses value tracking, or instruction
+ referencing, to determine variable locations for debug info in the final
+ stages of compilation.
+
+:doc:`RemoveDIsDebugInfo`
+ This is a migration guide describing how to move from debug info using
+ intrinsics such as dbg.value to using the non-instruction DbgRecord object.
+
+:doc:`InstrProfileFormat`
+ This document explains two binary formats of instrumentation-based profiles.
+
+:doc:`InstCombineContributorGuide`
+ This document specifies guidelines for contributions for InstCombine and
+ related passes.
+
+Code Generation
+---------------
+
+:doc:`WritingAnLLVMBackend`
+ Information on how to write LLVM backends for machine targets.
+
+:doc:`CodeGenerator`
+ The design and implementation of the LLVM code generator. Useful if you are
+ working on retargetting LLVM to a new architecture, designing a new codegen
+ pass, or enhancing existing components.
+
+:doc:`TableGen <TableGen/index>`
+ Describes the TableGen tool, which is used heavily by the LLVM code
+ generator.
+
+==========
+GlobalISel
+==========
+
+:doc:`MIRPatterns <GlobalISel/MIRPatterns>`
+ Describes the design of MIR Patterns and how to use them.
+
+===
+JIT
+===
+
+:doc:`MCJITDesignAndImplementation`
+ Describes the inner workings of MCJIT execution engine.
+
+:doc:`ORCv2`
+ Describes the design and implementation of the ORC APIs, including some
+ usage examples, and a guide for users transitioning from ORCv1 to ORCv2.
+
+:doc:`JITLink`
+ Describes the design and APIs for the JITLink library, ORC's new JIT
+ linker.
+
+:doc:`DebuggingJITedCode`
+ How to debug JITed code with GDB.
+
+Additional Topics
+-----------------
+
+:doc:`CommandLine`
+ Provides information on using the command line parsing library.
+
+:doc:`ExtendingLLVM`
+ Look here to see how to add instructions and intrinsics to LLVM.
+
+:doc:`AddingConstrainedIntrinsics`
+ Gives the steps necessary when adding a new constrained math intrinsic
+ to LLVM.
+
+:doc:`HowToBuildWindowsItaniumPrograms`
+ Notes on assembling a Windows Itanium environment.
+
+:doc:`HowToCrossCompileBuiltinsOnArm`
+ Notes on cross-building and testing the compiler-rt builtins for Arm.
+
+:doc:`BigEndianNEON`
+ LLVM's support for generating NEON instructions on big endian ARM targets is
+ somewhat nonintuitive. This document explains the implementation and rationale.
+
+:doc:`AArch64SME`
+ LLVM's support for AArch64 SME ACLE and ABI.
+
+:doc:`CompileCudaWithLLVM`
+ LLVM support for CUDA.
+
+:doc:`NVPTXUsage`
+ This document describes using the NVPTX backend to compile GPU kernels.
+
+:doc:`AMDGPUUsage`
+ This document describes using the AMDGPU backend to compile GPU kernels.
+
+:doc:`AMDGPUDwarfExtensionsForHeterogeneousDebugging`
+ This document describes DWARF extensions to support heterogeneous debugging
+ for targets such as the AMDGPU backend.
+
+:doc:`AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack/AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack`
+ This document describes a DWARF extension to allow location descriptions on
+ the DWARF expression stack. It is part of
+ :doc:`AMDGPUDwarfExtensionsForHeterogeneousDebugging`.
+
+:doc:`SPIRVUsage`
+ This document describes using the SPIR-V target to compile GPU kernels.
+
+:doc:`DirectXUsage`
+ This document describes using the DirectX target to compile GPU code for the
+ DirectX runtime.
+
+:doc:`RISCVUsage`
+ This document describes using the RISCV-V target.
diff --git a/llvm/test/Analysis/MustExecute/const-cond.ll b/llvm/test/Analysis/MustExecute/const-cond.ll
index d36598cc63eef1..e829db349ca6e5 100644
--- a/llvm/test/Analysis/MustExecute/const-cond.ll
+++ b/llvm/test/Analysis/MustExecute/const-cond.ll
@@ -1,47 +1,47 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -disable-output -passes=print-mustexecute %s 2>&1 | FileCheck %s
-; RUN: opt -disable-output -passes=print-mustexecute %s 2>&1 | FileCheck %s
-
-; In general the CFG below is easily simplified but this is useful for
-; pass ordering issue elimination.
-define i1 @const_cond(i32 %high) {
-; CHECK-LABEL: @const_cond(
-; CHECK-NEXT: entry:
-; CHECK-NEXT: br label [[LOOP:%.*]]
-; CHECK: loop:
-; CHECK-NEXT: [[IV:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[IV_NEXT:%.*]], [[BACKEDGE:%.*]] ] ; (mustexec in: loop)
-; CHECK-NEXT: br i1 true, label [[NEXT:%.*]], label [[NEVER1:%.*]] ; (mustexec in: loop)
-; CHECK: next:
-; CHECK-NEXT: br i1 false, label [[NEVER2:%.*]], label [[BACKEDGE]] ; (mustexec in: loop)
-; CHECK: backedge:
-; CHECK-NEXT: [[IV_NEXT]] = add nuw nsw i32 [[IV]], 1 ; (mustexec in: loop)
-; CHECK-NEXT: [[EXIT_TEST:%.*]] = icmp slt i32 [[IV]], [[HIGH:%.*]] ; (mustexec in: loop)
-; CHECK-NEXT: br i1 [[EXIT_TEST]], label [[LOOP]], label [[EXIT:%.*]] ; (mustexec in: loop)
-; CHECK: exit:
-; CHECK-NEXT: ret i1 false
-; CHECK: never1:
-; CHECK-NEXT: unreachable
-; CHECK: never2:
-; CHECK-NEXT: unreachable
-;
-entry:
- br label %loop
-
-loop:
- %iv = phi i32 [0, %entry], [%iv.next, %backedge]
- br i1 true, label %next, label %never1
-next:
- br i1 false, label %never2, label %backedge
-backedge:
- %iv.next = add nsw nuw i32 %iv, 1
- %exit.test = icmp slt i32 %iv, %high
- br i1 %exit.test, label %loop, label %exit
-
-exit:
- ret i1 false
-never1:
- unreachable
-never2:
- unreachable
-}
-
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -disable-output -passes=print-mustexecute %s 2>&1 | FileCheck %s
+; RUN: opt -disable-output -passes=print-mustexecute %s 2>&1 | FileCheck %s
+
+; In general the CFG below is easily simplified but this is useful for
+; pass ordering issue elimination.
+define i1 @const_cond(i32 %high) {
+; CHECK-LABEL: @const_cond(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: br label [[LOOP:%.*]]
+; CHECK: loop:
+; CHECK-NEXT: [[IV:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[IV_NEXT:%.*]], [[BACKEDGE:%.*]] ] ; (mustexec in: loop)
+; CHECK-NEXT: br i1 true, label [[NEXT:%.*]], label [[NEVER1:%.*]] ; (mustexec in: loop)
+; CHECK: next:
+; CHECK-NEXT: br i1 false, label [[NEVER2:%.*]], label [[BACKEDGE]] ; (mustexec in: loop)
+; CHECK: backedge:
+; CHECK-NEXT: [[IV_NEXT]] = add nuw nsw i32 [[IV]], 1 ; (mustexec in: loop)
+; CHECK-NEXT: [[EXIT_TEST:%.*]] = icmp slt i32 [[IV]], [[HIGH:%.*]] ; (mustexec in: loop)
+; CHECK-NEXT: br i1 [[EXIT_TEST]], label [[LOOP]], label [[EXIT:%.*]] ; (mustexec in: loop)
+; CHECK: exit:
+; CHECK-NEXT: ret i1 false
+; CHECK: never1:
+; CHECK-NEXT: unreachable
+; CHECK: never2:
+; CHECK-NEXT: unreachable
+;
+entry:
+ br label %loop
+
+loop:
+ %iv = phi i32 [0, %entry], [%iv.next, %backedge]
+ br i1 true, label %next, label %never1
+next:
+ br i1 false, label %never2, label %backedge
+backedge:
+ %iv.next = add nsw nuw i32 %iv, 1
+ %exit.test = icmp slt i32 %iv, %high
+ br i1 %exit.test, label %loop, label %exit
+
+exit:
+ ret i1 false
+never1:
+ unreachable
+never2:
+ unreachable
+}
+
diff --git a/llvm/test/CodeGen/MIR/X86/dbg-value-list.mir b/llvm/test/CodeGen/MIR/X86/dbg-value-list.mir
index c419638be66974..527325f4df7d4a 100644
--- a/llvm/test/CodeGen/MIR/X86/dbg-value-list.mir
+++ b/llvm/test/CodeGen/MIR/X86/dbg-value-list.mir
@@ -1,64 +1,64 @@
-# RUN: llc -march=x86-64 -run-pass machineverifier -o - %s | FileCheck %s
-# Simple round-trip test for DBG_VALUE_LIST.
-# CHECK: [[VAR_C:![0-9]+]] = !DILocalVariable(name: "c"
-# CHECK: DBG_VALUE_LIST [[VAR_C]], !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus, DW_OP_stack_value), $edi, $esi, debug-location
---- |
- ; ModuleID = 'test.cpp'
- source_filename = "test.cpp"
- target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
- target triple = "x86_64-unknown-linux-gnu"
-
- ; Function Attrs: norecurse nounwind readnone uwtable
- define dso_local i32 @_Z3fooii(i32 %a, i32 %b) local_unnamed_addr !dbg !7 {
- entry:
- call void @llvm.dbg.value(metadata i32 %a, metadata !12, metadata !DIExpression()), !dbg !15
- call void @llvm.dbg.value(metadata i32 %b, metadata !13, metadata !DIExpression()), !dbg !15
- call void @llvm.dbg.value(metadata i32 undef, metadata !14, metadata !DIExpression()), !dbg !15
- %mul = mul nsw i32 %b, %a, !dbg !16
- ret i32 %mul, !dbg !17
- }
-
- ; Function Attrs: nounwind readnone speculatable willreturn
- declare void @llvm.dbg.value(metadata, metadata, metadata)
-
- !llvm.dbg.cu = !{!0}
- !llvm.module.flags = !{!3, !4, !5}
- !llvm.ident = !{!6}
-
- !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 11.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)
- !1 = !DIFile(filename: "test.cpp", directory: "/")
- !2 = !{}
- !3 = !{i32 7, !"Dwarf Version", i32 4}
- !4 = !{i32 2, !"Debug Info Version", i32 3}
- !5 = !{i32 1, !"wchar_size", i32 4}
- !6 = !{!"clang version 11.0.0"}
- !7 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooii", scope: !1, file: !1, line: 2, type: !8, scopeLine: 2, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !11)
- !8 = !DISubroutineType(types: !9)
- !9 = !{!10, !10, !10}
- !10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
- !11 = !{!12, !13, !14}
- !12 = !DILocalVariable(name: "a", arg: 1, scope: !7, file: !1, line: 2, type: !10)
- !13 = !DILocalVariable(name: "b", arg: 2, scope: !7, file: !1, line: 2, type: !10)
- !14 = !DILocalVariable(name: "c", scope: !7, file: !1, line: 3, type: !10)
- !15 = !DILocation(line: 0, scope: !7)
- !16 = !DILocation(line: 4, column: 12, scope: !7)
- !17 = !DILocation(line: 4, column: 3, scope: !7)
-
-...
----
-name: _Z3fooii
-body: |
- bb.0.entry:
- liveins: $edi, $esi
-
- DBG_VALUE $edi, $noreg, !12, !DIExpression(), debug-location !15
- DBG_VALUE $esi, $noreg, !13, !DIExpression(), debug-location !15
- $eax = MOV32rr $edi
- DBG_VALUE_LIST !14, !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus, DW_OP_stack_value), $edi, $esi, debug-location !15
- DBG_VALUE $esi, $noreg, !13, !DIExpression(), debug-location !15
- DBG_VALUE $eax, $noreg, !12, !DIExpression(), debug-location !15
- renamable $eax = nsw IMUL32rr killed renamable $eax, killed renamable $esi, implicit-def dead $eflags, debug-location !16
- RET64 $eax, debug-location !17
-
-...
-
+# RUN: llc -march=x86-64 -run-pass machineverifier -o - %s | FileCheck %s
+# Simple round-trip test for DBG_VALUE_LIST.
+# CHECK: [[VAR_C:![0-9]+]] = !DILocalVariable(name: "c"
+# CHECK: DBG_VALUE_LIST [[VAR_C]], !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus, DW_OP_stack_value), $edi, $esi, debug-location
+--- |
+ ; ModuleID = 'test.cpp'
+ source_filename = "test.cpp"
+ target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
+ target triple = "x86_64-unknown-linux-gnu"
+
+ ; Function Attrs: norecurse nounwind readnone uwtable
+ define dso_local i32 @_Z3fooii(i32 %a, i32 %b) local_unnamed_addr !dbg !7 {
+ entry:
+ call void @llvm.dbg.value(metadata i32 %a, metadata !12, metadata !DIExpression()), !dbg !15
+ call void @llvm.dbg.value(metadata i32 %b, metadata !13, metadata !DIExpression()), !dbg !15
+ call void @llvm.dbg.value(metadata i32 undef, metadata !14, metadata !DIExpression()), !dbg !15
+ %mul = mul nsw i32 %b, %a, !dbg !16
+ ret i32 %mul, !dbg !17
+ }
+
+ ; Function Attrs: nounwind readnone speculatable willreturn
+ declare void @llvm.dbg.value(metadata, metadata, metadata)
+
+ !llvm.dbg.cu = !{!0}
+ !llvm.module.flags = !{!3, !4, !5}
+ !llvm.ident = !{!6}
+
+ !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 11.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)
+ !1 = !DIFile(filename: "test.cpp", directory: "/")
+ !2 = !{}
+ !3 = !{i32 7, !"Dwarf Version", i32 4}
+ !4 = !{i32 2, !"Debug Info Version", i32 3}
+ !5 = !{i32 1, !"wchar_size", i32 4}
+ !6 = !{!"clang version 11.0.0"}
+ !7 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooii", scope: !1, file: !1, line: 2, type: !8, scopeLine: 2, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !11)
+ !8 = !DISubroutineType(types: !9)
+ !9 = !{!10, !10, !10}
+ !10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+ !11 = !{!12, !13, !14}
+ !12 = !DILocalVariable(name: "a", arg: 1, scope: !7, file: !1, line: 2, type: !10)
+ !13 = !DILocalVariable(name: "b", arg: 2, scope: !7, file: !1, line: 2, type: !10)
+ !14 = !DILocalVariable(name: "c", scope: !7, file: !1, line: 3, type: !10)
+ !15 = !DILocation(line: 0, scope: !7)
+ !16 = !DILocation(line: 4, column: 12, scope: !7)
+ !17 = !DILocation(line: 4, column: 3, scope: !7)
+
+...
+---
+name: _Z3fooii
+body: |
+ bb.0.entry:
+ liveins: $edi, $esi
+
+ DBG_VALUE $edi, $noreg, !12, !DIExpression(), debug-location !15
+ DBG_VALUE $esi, $noreg, !13, !DIExpression(), debug-location !15
+ $eax = MOV32rr $edi
+ DBG_VALUE_LIST !14, !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus, DW_OP_stack_value), $edi, $esi, debug-location !15
+ DBG_VALUE $esi, $noreg, !13, !DIExpression(), debug-location !15
+ DBG_VALUE $eax, $noreg, !12, !DIExpression(), debug-location !15
+ renamable $eax = nsw IMUL32rr killed renamable $eax, killed renamable $esi, implicit-def dead $eflags, debug-location !16
+ RET64 $eax, debug-location !17
+
+...
+
diff --git a/llvm/test/CodeGen/NVPTX/bf16x2-instructions-approx.ll b/llvm/test/CodeGen/NVPTX/bf16x2-instructions-approx.ll
index dde8555c35af4c..f61205eb88fc24 100644
--- a/llvm/test/CodeGen/NVPTX/bf16x2-instructions-approx.ll
+++ b/llvm/test/CodeGen/NVPTX/bf16x2-instructions-approx.ll
@@ -1,42 +1,42 @@
-; RUN: llc < %s -march=nvptx64 -mcpu=sm_80 -mattr=+ptx71 --enable-unsafe-fp-math | FileCheck --check-prefixes=CHECK %s
-; RUN: %if ptxas-11.8 %{ llc < %s -march=nvptx64 -mcpu=sm_80 -mattr=+ptx71 --enable-unsafe-fp-math | %ptxas-verify -arch=sm_80 %}
-
-target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-
-declare <2 x bfloat> @llvm.sin.f16(<2 x bfloat> %a) #0
-declare <2 x bfloat> @llvm.cos.f16(<2 x bfloat> %a) #0
-
-; CHECK-LABEL: test_sin(
-; CHECK: ld.param.b32 [[A:%r[0-9]+]], [test_sin_param_0];
-; CHECK: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]]
-; CHECK-DAG: cvt.f32.bf16 [[AF0:%f[0-9]+]], [[A0]];
-; CHECK-DAG: cvt.f32.bf16 [[AF1:%f[0-9]+]], [[A1]];
-; CHECK-DAG: sin.approx.f32 [[RF0:%f[0-9]+]], [[AF0]];
-; CHECK-DAG: sin.approx.f32 [[RF1:%f[0-9]+]], [[AF1]];
-; CHECK-DAG: cvt.rn.bf16.f32 [[R0:%rs[0-9]+]], [[RF0]];
-; CHECK-DAG: cvt.rn.bf16.f32 [[R1:%rs[0-9]+]], [[RF1]];
-; CHECK: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
-; CHECK: st.param.b32 [func_retval0+0], [[R]];
-; CHECK: ret;
-define <2 x bfloat> @test_sin(<2 x bfloat> %a) #0 #1 {
- %r = call <2 x bfloat> @llvm.sin.f16(<2 x bfloat> %a)
- ret <2 x bfloat> %r
-}
-
-; CHECK-LABEL: test_cos(
-; CHECK: ld.param.b32 [[A:%r[0-9]+]], [test_cos_param_0];
-; CHECK: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]]
-; CHECK-DAG: cvt.f32.bf16 [[AF0:%f[0-9]+]], [[A0]];
-; CHECK-DAG: cvt.f32.bf16 [[AF1:%f[0-9]+]], [[A1]];
-; CHECK-DAG: cos.approx.f32 [[RF0:%f[0-9]+]], [[AF0]];
-; CHECK-DAG: cos.approx.f32 [[RF1:%f[0-9]+]], [[AF1]];
-; CHECK-DAG: cvt.rn.bf16.f32 [[R0:%rs[0-9]+]], [[RF0]];
-; CHECK-DAG: cvt.rn.bf16.f32 [[R1:%rs[0-9]+]], [[RF1]];
-; CHECK: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
-; CHECK: st.param.b32 [func_retval0+0], [[R]];
-; CHECK: ret;
-define <2 x bfloat> @test_cos(<2 x bfloat> %a) #0 #1 {
- %r = call <2 x bfloat> @llvm.cos.f16(<2 x bfloat> %a)
- ret <2 x bfloat> %r
-}
-
+; RUN: llc < %s -march=nvptx64 -mcpu=sm_80 -mattr=+ptx71 --enable-unsafe-fp-math | FileCheck --check-prefixes=CHECK %s
+; RUN: %if ptxas-11.8 %{ llc < %s -march=nvptx64 -mcpu=sm_80 -mattr=+ptx71 --enable-unsafe-fp-math | %ptxas-verify -arch=sm_80 %}
+
+target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
+
+declare <2 x bfloat> @llvm.sin.f16(<2 x bfloat> %a) #0
+declare <2 x bfloat> @llvm.cos.f16(<2 x bfloat> %a) #0
+
+; CHECK-LABEL: test_sin(
+; CHECK: ld.param.b32 [[A:%r[0-9]+]], [test_sin_param_0];
+; CHECK: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]]
+; CHECK-DAG: cvt.f32.bf16 [[AF0:%f[0-9]+]], [[A0]];
+; CHECK-DAG: cvt.f32.bf16 [[AF1:%f[0-9]+]], [[A1]];
+; CHECK-DAG: sin.approx.f32 [[RF0:%f[0-9]+]], [[AF0]];
+; CHECK-DAG: sin.approx.f32 [[RF1:%f[0-9]+]], [[AF1]];
+; CHECK-DAG: cvt.rn.bf16.f32 [[R0:%rs[0-9]+]], [[RF0]];
+; CHECK-DAG: cvt.rn.bf16.f32 [[R1:%rs[0-9]+]], [[RF1]];
+; CHECK: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
+; CHECK: st.param.b32 [func_retval0+0], [[R]];
+; CHECK: ret;
+define <2 x bfloat> @test_sin(<2 x bfloat> %a) #0 #1 {
+ %r = call <2 x bfloat> @llvm.sin.f16(<2 x bfloat> %a)
+ ret <2 x bfloat> %r
+}
+
+; CHECK-LABEL: test_cos(
+; CHECK: ld.param.b32 [[A:%r[0-9]+]], [test_cos_param_0];
+; CHECK: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]]
+; CHECK-DAG: cvt.f32.bf16 [[AF0:%f[0-9]+]], [[A0]];
+; CHECK-DAG: cvt.f32.bf16 [[AF1:%f[0-9]+]], [[A1]];
+; CHECK-DAG: cos.approx.f32 [[RF0:%f[0-9]+]], [[AF0]];
+; CHECK-DAG: cos.approx.f32 [[RF1:%f[0-9]+]], [[AF1]];
+; CHECK-DAG: cvt.rn.bf16.f32 [[R0:%rs[0-9]+]], [[RF0]];
+; CHECK-DAG: cvt.rn.bf16.f32 [[R1:%rs[0-9]+]], [[RF1]];
+; CHECK: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
+; CHECK: st.param.b32 [func_retval0+0], [[R]];
+; CHECK: ret;
+define <2 x bfloat> @test_cos(<2 x bfloat> %a) #0 #1 {
+ %r = call <2 x bfloat> @llvm.cos.f16(<2 x bfloat> %a)
+ ret <2 x bfloat> %r
+}
+
diff --git a/llvm/test/CodeGen/NVPTX/bf16x2-instructions.ll b/llvm/test/CodeGen/NVPTX/bf16x2-instructions.ll
index 9bde89cdf044f8..7030e5435f723e 100644
--- a/llvm/test/CodeGen/NVPTX/bf16x2-instructions.ll
+++ b/llvm/test/CodeGen/NVPTX/bf16x2-instructions.ll
@@ -1,532 +1,532 @@
-; RUN: llc < %s -march=nvptx64 -mcpu=sm_80 -mattr=+ptx71 | FileCheck --check-prefixes=CHECK,SM80 %s
-; RUN: llc < %s -march=nvptx64 -mcpu=sm_90 -mattr=+ptx78 | FileCheck --check-prefixes=CHECK,SM90 %s
-; RUN: %if ptxas-11.8 %{ llc < %s -march=nvptx64 -mcpu=sm_80 -mattr=+ptx71 | %ptxas-verify -arch=sm_80 %}
-; RUN: %if ptxas-11.8 %{ llc < %s -march=nvptx64 -mcpu=sm_90 -mattr=+ptx78 | %ptxas-verify -arch=sm_90 %}
-
-target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
-
-; CHECK-LABEL: test_ret_const(
-; CHECK: mov.b32 [[T:%r[0-9+]]], 1073758080;
-; CHECK: st.param.b32 [func_retval0+0], [[T]];
-; CHECK-NEXT: ret;
-
-define <2 x bfloat> @test_ret_const() #0 {
- ret <2 x bfloat> <bfloat 1.0, bfloat 2.0>
-}
-
-; Check that we can lower fadd with immediate arguments.
-; CHECK-LABEL: test_fadd_imm_0(
-; CHECK-DAG: ld.param.b32 [[A:%r[0-9]+]], [test_fadd_imm_0_param_0];
-;
-; SM90-DAG: mov.b32 [[I:%r[0-9+]]], 1073758080;
-; SM90-DAG: add.rn.bf16x2 [[R:%r[0-9]+]], [[A]], [[I]];
-;
-; SM80-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]]
-; SM80-DAG: cvt.f32.bf16 [[FA0:%f[0-9]+]], [[A0]]
-; SM80-DAG: cvt.f32.bf16 [[FA1:%f[0-9]+]], [[A1]]
-; SM80-DAG: add.rn.f32 [[FR0:%f[0-9]+]], [[FA0]], 0f3F800000;
-; SM80-DAG: add.rn.f32 [[FR1:%f[0-9]+]], [[FA1]], 0f40000000;
-; SM80-DAG: cvt.rn.bf16.f32 [[R0:%rs[0-9]+]], [[FR0]]
-; SM80-DAG: cvt.rn.bf16.f32 [[R1:%rs[0-9]+]], [[FR1]]
-; SM80-DAG: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
-;
-; CHECK-NEXT: st.param.b32 [func_retval0+0], [[R]];
-; CHECK-NEXT: ret;
-
-define <2 x bfloat> @test_fadd_imm_0(<2 x bfloat> %a) #0 {
- %r = fadd <2 x bfloat> <bfloat 1.0, bfloat 2.0>, %a
- ret <2 x bfloat> %r
-}
-
-; CHECK-LABEL: test_fadd_imm_1(
-; CHECK: ld.param.b16 [[A:%rs[0-9]+]], [test_fadd_imm_1_param_0];
-; SM90: mov.b16 [[B:%rs[0-9]+]], 0x3F80;
-; SM90: add.rn.bf16 [[R:%rs[0-9]+]], [[A]], [[B]];
-
-; SM80-DAG: cvt.f32.bf16 [[FA:%f[0-9]+]], [[A]];
-; SM80: add.rn.f32 [[FR:%f[0-9]+]], [[FA]], 0f3F800000;
-; SM80: cvt.rn.bf16.f32 [[R:%rs[0-9]+]], [[FR]];
-
-; CHECK: st.param.b16 [func_retval0+0], [[R]];
-; CHECK-NEXT: ret;
-
-define bfloat @test_fadd_imm_1(bfloat %a) #0 {
- %r = fadd bfloat %a, 1.0
- ret bfloat %r
-}
-
-; CHECK-LABEL: test_fsubx2(
-; CHECK-DAG: ld.param.b32 [[A:%r[0-9]+]], [test_fsubx2_param_0];
-; CHECK-DAG: ld.param.b32 [[B:%r[0-9]+]], [test_fsubx2_param_1];
-; SM90: sub.rn.bf16x2 [[R:%r[0-9]+]], [[A]], [[B]];
-
-; SM80-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]];
-; SM80-DAG: mov.b32 {[[B0:%rs[0-9]+]], [[B1:%rs[0-9]+]]}, [[B]];
-; SM80-DAG: cvt.f32.bf16 [[FA1:%f[0-9]+]], [[A1]];
-; SM80-DAG: cvt.f32.bf16 [[FA0:%f[0-9]+]], [[A0]];
-; SM80-DAG: cvt.f32.bf16 [[FB0:%f[0-9]+]], [[B0]];
-; SM80-DAG: cvt.f32.bf16 [[FB1:%f[0-9]+]], [[B1]];
-; SM80-DAG: sub.rn.f32 [[FR0:%f[0-9]+]], [[FA0]], [[FB0]];
-; SM80-DAG: sub.rn.f32 [[FR1:%f[0-9]+]], [[FA1]], [[FB1]];
-; SM80-DAG: cvt.rn.bf16.f32 [[R0:%rs[0-9]+]], [[FR0]];
-; SM80-DAG: cvt.rn.bf16.f32 [[R1:%rs[0-9]+]], [[FR1]];
-; SM80: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]};
-
-; CHECK: st.param.b32 [func_retval0+0], [[R]];
-; CHECK: ret;
-
-define <2 x bfloat> @test_fsubx2(<2 x bfloat> %a, <2 x bfloat> %b) #0 {
- %r = fsub <2 x bfloat> %a, %b
- ret <2 x bfloat> %r
-}
-
-; CHECK-LABEL: test_fmulx2(
-; CHECK-DAG: ld.param.b32 [[A:%r[0-9]+]], [test_fmulx2_param_0];
-; CHECK-DAG: ld.param.b32 [[B:%r[0-9]+]], [test_fmulx2_param_1];
-; SM90: mul.rn.bf16x2 [[R:%r[0-9]+]], [[A]], [[B]];
-
-; SM80-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]];
-; SM80-DAG: mov.b32 {[[B0:%rs[0-9]+]], [[B1:%rs[0-9]+]]}, [[B]];
-; SM80-DAG: cvt.f32.bf16 [[FA1:%f[0-9]+]], [[A1]];
-; SM80-DAG: cvt.f32.bf16 [[FA0:%f[0-9]+]], [[A0]];
-; SM80-DAG: cvt.f32.bf16 [[FB0:%f[0-9]+]], [[B0]];
-; SM80-DAG: cvt.f32.bf16 [[FB1:%f[0-9]+]], [[B1]];
-; SM80-DAG: mul.rn.f32 [[FR0:%f[0-9]+]], [[FA0]], [[FB0]];
-; SM80-DAG: mul.rn.f32 [[FR1:%f[0-9]+]], [[FA1]], [[FB1]];
-; SM80-DAG: cvt.rn.bf16.f32 [[R0:%rs[0-9]+]], [[FR0]];
-; SM80-DAG: cvt.rn.bf16.f32 [[R1:%rs[0-9]+]], [[FR1]];
-; SM80: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]};
-
-; CHECK: st.param.b32 [func_retval0+0], [[R]];
-; CHECK: ret;
-
-define <2 x bfloat> @test_fmulx2(<2 x bfloat> %a, <2 x bfloat> %b) #0 {
- %r = fmul <2 x bfloat> %a, %b
- ret <2 x bfloat> %r
-}
-
-; CHECK-LABEL: test_fdiv(
-; CHECK-DAG: ld.param.b32 [[A:%r[0-9]+]], [test_fdiv_param_0];
-; CHECK-DAG: ld.param.b32 [[B:%r[0-9]+]], [test_fdiv_param_1];
-; CHECK-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]]
-; CHECK-DAG: mov.b32 {[[B0:%rs[0-9]+]], [[B1:%rs[0-9]+]]}, [[B]]
-; CHECK-DAG: cvt.f32.bf16 [[FA0:%f[0-9]+]], [[A0]];
-; CHECK-DAG: cvt.f32.bf16 [[FA1:%f[0-9]+]], [[A1]];
-; CHECK-DAG: cvt.f32.bf16 [[FB0:%f[0-9]+]], [[B0]];
-; CHECK-DAG: cvt.f32.bf16 [[FB1:%f[0-9]+]], [[B1]];
-; CHECK-DAG: div.rn.f32 [[FR0:%f[0-9]+]], [[FA0]], [[FB0]];
-; CHECK-DAG: div.rn.f32 [[FR1:%f[0-9]+]], [[FA1]], [[FB1]];
-; CHECK-DAG: cvt.rn.bf16.f32 [[R0:%rs[0-9]+]], [[FR0]];
-; CHECK-DAG: cvt.rn.bf16.f32 [[R1:%rs[0-9]+]], [[FR1]];
-; CHECK-NEXT: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
-; CHECK-NEXT: st.param.b32 [func_retval0+0], [[R]];
-; CHECK-NEXT: ret;
-
-define <2 x bfloat> @test_fdiv(<2 x bfloat> %a, <2 x bfloat> %b) #0 {
- %r = fdiv <2 x bfloat> %a, %b
- ret <2 x bfloat> %r
-}
-
-; CHECK-LABEL: test_fneg(
-; CHECK-DAG: ld.param.u32 [[A:%r[0-9]+]], [test_fneg_param_0];
-
-; CHECK-DAG: xor.b32 [[IHH0:%r[0-9]+]], [[A]], -2147450880;
-; CHECK-NEXT: st.param.b32 [func_retval0+0], [[IHH0]];
-; CHECK-NEXT: ret;
-define <2 x bfloat> @test_fneg(<2 x bfloat> %a) #0 {
- %r = fneg <2 x bfloat> %a
- ret <2 x bfloat> %r
-}
-
-; CHECK-LABEL: .func test_ldst_v2bf16(
-; CHECK-DAG: ld.param.u64 %[[A:rd[0-9]+]], [test_ldst_v2bf16_param_0];
-; CHECK-DAG: ld.param.u64 %[[B:rd[0-9]+]], [test_ldst_v2bf16_param_1];
-; CHECK-DAG: ld.b32 [[E:%r[0-9]+]], [%[[A]]]
-; CHECK-DAG: st.b32 [%[[B]]], [[E]];
-; CHECK: ret;
-define void @test_ldst_v2bf16(ptr %a, ptr %b) {
- %t1 = load <2 x bfloat>, ptr %a
- store <2 x bfloat> %t1, ptr %b, align 16
- ret void
-}
-
-; CHECK-LABEL: .func test_ldst_v3bf16(
-; CHECK-DAG: ld.param.u64 %[[A:rd[0-9]+]], [test_ldst_v3bf16_param_0];
-; CHECK-DAG: ld.param.u64 %[[B:rd[0-9]+]], [test_ldst_v3bf16_param_1];
-; -- v3 is inconvenient to capture as it's lowered as ld.b64 + fair
-; number of bitshifting instructions that may change at llvm's whim.
-; So we only verify that we only issue correct number of writes using
-; correct offset, but not the values we write.
-; CHECK-DAG: ld.u64
-; CHECK-DAG: st.u32 [%[[B]]],
-; CHECK-DAG: st.b16 [%[[B]]+4],
-; CHECK: ret;
-define void @test_ldst_v3bf16(ptr %a, ptr %b) {
- %t1 = load <3 x bfloat>, ptr %a
- store <3 x bfloat> %t1, ptr %b, align 16
- ret void
-}
-
-declare <2 x bfloat> @test_callee(<2 x bfloat> %a, <2 x bfloat> %b) #0
-
-; CHECK-LABEL: test_call(
-; CHECK-DAG: ld.param.b32 [[A:%r[0-9]+]], [test_call_param_0];
-; CHECK-DAG: ld.param.b32 [[B:%r[0-9]+]], [test_call_param_1];
-; CHECK: {
-; CHECK-DAG: .param .align 4 .b8 param0[4];
-; CHECK-DAG: .param .align 4 .b8 param1[4];
-; CHECK-DAG: st.param.b32 [param0+0], [[A]];
-; CHECK-DAG: st.param.b32 [param1+0], [[B]];
-; CHECK-DAG: .param .align 4 .b8 retval0[4];
-; CHECK: call.uni (retval0),
-; CHECK-NEXT: test_callee,
-; CHECK: );
-; CHECK-NEXT: ld.param.b32 [[R:%r[0-9]+]], [retval0+0];
-; CHECK-NEXT: }
-; CHECK-NEXT: st.param.b32 [func_retval0+0], [[R]];
-; CHECK-NEXT: ret;
-
-define <2 x bfloat> @test_call(<2 x bfloat> %a, <2 x bfloat> %b) #0 {
- %r = call <2 x bfloat> @test_callee(<2 x bfloat> %a, <2 x bfloat> %b)
- ret <2 x bfloat> %r
-}
-
-; CHECK-LABEL: test_select(
-; CHECK-DAG: ld.param.b32 [[A:%r[0-9]+]], [test_select_param_0];
-; CHECK-DAG: ld.param.b32 [[B:%r[0-9]+]], [test_select_param_1];
-; CHECK-DAG: ld.param.u8 [[C:%rs[0-9]+]], [test_select_param_2]
-; CHECK-DAG: setp.eq.b16 [[PRED:%p[0-9]+]], %rs{{.*}}, 1;
-; CHECK-NEXT: selp.b32 [[R:%r[0-9]+]], [[A]], [[B]], [[PRED]];
-; CHECK-NEXT: st.param.b32 [func_retval0+0], [[R]];
-; CHECK-NEXT: ret;
-
-define <2 x bfloat> @test_select(<2 x bfloat> %a, <2 x bfloat> %b, i1 zeroext %c) #0 {
- %r = select i1 %c, <2 x bfloat> %a, <2 x bfloat> %b
- ret <2 x bfloat> %r
-}
-
-; CHECK-LABEL: test_select_cc(
-; CHECK-DAG: ld.param.b32 [[A:%r[0-9]+]], [test_select_cc_param_0];
-; CHECK-DAG: ld.param.b32 [[B:%r[0-9]+]], [test_select_cc_param_1];
-; CHECK-DAG: ld.param.b32 [[C:%r[0-9]+]], [test_select_cc_param_2];
-; CHECK-DAG: ld.param.b32 [[D:%r[0-9]+]], [test_select_cc_param_3];
-;
-; SM90: setp.neu.bf16x2 [[P0:%p[0-9]+]]|[[P1:%p[0-9]+]], [[C]], [[D]]
-;
-; SM80-DAG: mov.b32 {[[C0:%rs[0-9]+]], [[C1:%rs[0-9]+]]}, [[C]]
-; SM80-DAG: mov.b32 {[[D0:%rs[0-9]+]], [[D1:%rs[0-9]+]]}, [[D]]
-; SM80-DAG: cvt.f32.bf16 [[DF0:%f[0-9]+]], [[D0]];
-; SM80-DAG: cvt.f32.bf16 [[CF0:%f[0-9]+]], [[C0]];
-; SM80-DAG: cvt.f32.bf16 [[DF1:%f[0-9]+]], [[D1]];
-; SM80-DAG: cvt.f32.bf16 [[CF1:%f[0-9]+]], [[C1]];
-; SM80-DAG: setp.neu.f32 [[P0:%p[0-9]+]], [[CF0]], [[DF0]]
-; SM80-DAG: setp.neu.f32 [[P1:%p[0-9]+]], [[CF1]], [[DF1]]
-;
-; CHECK-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]]
-; CHECK-DAG: mov.b32 {[[B0:%rs[0-9]+]], [[B1:%rs[0-9]+]]}, [[B]]
-; CHECK-DAG: selp.b16 [[R0:%rs[0-9]+]], [[A0]], [[B0]], [[P0]];
-; CHECK-DAG: selp.b16 [[R1:%rs[0-9]+]], [[A1]], [[B1]], [[P1]];
-; CHECK: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
-; CHECK-NEXT: st.param.b32 [func_retval0+0], [[R]];
-; CHECK-NEXT: ret;
-
-define <2 x bfloat> @test_select_cc(<2 x bfloat> %a, <2 x bfloat> %b, <2 x bfloat> %c, <2 x bfloat> %d) #0 {
- %cc = fcmp une <2 x bfloat> %c, %d
- %r = select <2 x i1> %cc, <2 x bfloat> %a, <2 x bfloat> %b
- ret <2 x bfloat> %r
-}
-
-
-; CHECK-LABEL: test_select_cc_f32_bf16(
-; CHECK-DAG: ld.param.v2.f32 {[[A0:%f[0-9]+]], [[A1:%f[0-9]+]]}, [test_select_cc_f32_bf16_param_0];
-; CHECK-DAG: ld.param.b32 [[C:%r[0-9]+]], [test_select_cc_f32_bf16_param_2];
-; CHECK-DAG: ld.param.b32 [[D:%r[0-9]+]], [test_select_cc_f32_bf16_param_3];
-; SM90: setp.neu.bf16x2 [[P0:%p[0-9]+]]|[[P1:%p[0-9]+]], [[C]], [[D]]
-; CHECK-DAG: ld.param.v2.f32 {[[B0:%f[0-9]+]], [[B1:%f[0-9]+]]}, [test_select_cc_f32_bf16_param_1];
-
-; SM80-DAG: mov.b32 {[[C0:%rs[0-9]+]], [[C1:%rs[0-9]+]]}, [[C]]
-; SM80-DAG: mov.b32 {[[D0:%rs[0-9]+]], [[D1:%rs[0-9]+]]}, [[D]]
-; SM80-DAG: cvt.f32.bf16 [[DF0:%f[0-9]+]], [[D0]];
-; SM80-DAG: cvt.f32.bf16 [[CF0:%f[0-9]+]], [[C0]];
-; SM80-DAG: cvt.f32.bf16 [[DF1:%f[0-9]+]], [[D1]];
-; SM80-DAG: cvt.f32.bf16 [[CF1:%f[0-9]+]], [[C1]];
-; SM80-DAG: setp.neu.f32 [[P0:%p[0-9]+]], [[CF0]], [[DF0]]
-; SM80-DAG: setp.neu.f32 [[P1:%p[0-9]+]], [[CF1]], [[DF1]]
-;
-; CHECK-DAG: selp.f32 [[R0:%f[0-9]+]], [[A0]], [[B0]], [[P0]];
-; CHECK-DAG: selp.f32 [[R1:%f[0-9]+]], [[A1]], [[B1]], [[P1]];
-; CHECK-NEXT: st.param.v2.f32 [func_retval0+0], {[[R0]], [[R1]]};
-; CHECK-NEXT: ret;
-define <2 x float> @test_select_cc_f32_bf16(<2 x float> %a, <2 x float> %b,
- <2 x bfloat> %c, <2 x bfloat> %d) #0 {
- %cc = fcmp une <2 x bfloat> %c, %d
- %r = select <2 x i1> %cc, <2 x float> %a, <2 x float> %b
- ret <2 x float> %r
-}
-
-; CHECK-LABEL: test_select_cc_bf16_f32(
-; CHECK-DAG: ld.param.b32 [[A:%r[0-9]+]], [test_select_cc_bf16_f32_param_0];
-; CHECK-DAG: ld.param.b32 [[B:%r[0-9]+]], [test_select_cc_bf16_f32_param_1];
-; CHECK-DAG: ld.param.v2.f32 {[[C0:%f[0-9]+]], [[C1:%f[0-9]+]]}, [test_select_cc_bf16_f32_param_2];
-; CHECK-DAG: ld.param.v2.f32 {[[D0:%f[0-9]+]], [[D1:%f[0-9]+]]}, [test_select_cc_bf16_f32_param_3];
-; CHECK-DAG: setp.neu.f32 [[P0:%p[0-9]+]], [[C0]], [[D0]]
-; CHECK-DAG: setp.neu.f32 [[P1:%p[0-9]+]], [[C1]], [[D1]]
-; CHECK-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]]
-; CHECK-DAG: mov.b32 {[[B0:%rs[0-9]+]], [[B1:%rs[0-9]+]]}, [[B]]
-; CHECK-DAG: selp.b16 [[R0:%rs[0-9]+]], [[A0]], [[B0]], [[P0]];
-; CHECK-DAG: selp.b16 [[R1:%rs[0-9]+]], [[A1]], [[B1]], [[P1]];
-; CHECK: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
-; CHECK-NEXT: st.param.b32 [func_retval0+0], [[R]];
-; CHECK-NEXT: ret;
-define <2 x bfloat> @test_select_cc_bf16_f32(<2 x bfloat> %a, <2 x bfloat> %b,
- <2 x float> %c, <2 x float> %d) #0 {
- %cc = fcmp une <2 x float> %c, %d
- %r = select <2 x i1> %cc, <2 x bfloat> %a, <2 x bfloat> %b
- ret <2 x bfloat> %r
-}
-
-; CHECK-LABEL: test_fptrunc_2xfloat(
-; CHECK: ld.param.v2.f32 {[[A0:%f[0-9]+]], [[A1:%f[0-9]+]]}, [test_fptrunc_2xfloat_param_0];
-; CHECK-DAG: cvt.rn.bf16.f32 [[R0:%rs[0-9]+]], [[A0]];
-; CHECK-DAG: cvt.rn.bf16.f32 [[R1:%rs[0-9]+]], [[A1]];
-; CHECK: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
-; CHECK: st.param.b32 [func_retval0+0], [[R]];
-; CHECK: ret;
-define <2 x bfloat> @test_fptrunc_2xfloat(<2 x float> %a) #0 {
- %r = fptrunc <2 x float> %a to <2 x bfloat>
- ret <2 x bfloat> %r
-}
-
-; CHECK-LABEL: test_fpext_2xfloat(
-; CHECK: ld.param.b32 [[A:%r[0-9]+]], [test_fpext_2xfloat_param_0];
-; CHECK: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]]
-; CHECK-DAG: cvt.f32.bf16 [[R0:%f[0-9]+]], [[A0]];
-; CHECK-DAG: cvt.f32.bf16 [[R1:%f[0-9]+]], [[A1]];
-; CHECK-NEXT: st.param.v2.f32 [func_retval0+0], {[[R0]], [[R1]]};
-; CHECK: ret;
-define <2 x float> @test_fpext_2xfloat(<2 x bfloat> %a) #0 {
- %r = fpext <2 x bfloat> %a to <2 x float>
- ret <2 x float> %r
-}
-
-; CHECK-LABEL: test_bitcast_2xbf16_to_2xi16(
-; CHECK: ld.param.u32 [[A:%r[0-9]+]], [test_bitcast_2xbf16_to_2xi16_param_0];
-; CHECK: st.param.b32 [func_retval0+0], [[A]]
-; CHECK: ret;
-define <2 x i16> @test_bitcast_2xbf16_to_2xi16(<2 x bfloat> %a) #0 {
- %r = bitcast <2 x bfloat> %a to <2 x i16>
- ret <2 x i16> %r
-}
-
-
-; CHECK-LABEL: test_bitcast_2xi16_to_2xbf16(
-; CHECK: ld.param.b32 [[R]], [test_bitcast_2xi16_to_2xbf16_param_0];
-; CHECK: st.param.b32 [func_retval0+0], [[R]];
-; CHECK: ret;
-define <2 x bfloat> @test_bitcast_2xi16_to_2xbf16(<2 x i16> %a) #0 {
- %r = bitcast <2 x i16> %a to <2 x bfloat>
- ret <2 x bfloat> %r
-}
-
-declare <2 x bfloat> @llvm.sqrt.f16(<2 x bfloat> %a) #0
-declare <2 x bfloat> @llvm.powi.f16(<2 x bfloat> %a, <2 x i32> %b) #0
-declare <2 x bfloat> @llvm.sin.f16(<2 x bfloat> %a) #0
-declare <2 x bfloat> @llvm.cos.f16(<2 x bfloat> %a) #0
-declare <2 x bfloat> @llvm.pow.f16(<2 x bfloat> %a, <2 x bfloat> %b) #0
-declare <2 x bfloat> @llvm.exp.f16(<2 x bfloat> %a) #0
-declare <2 x bfloat> @llvm.exp2.f16(<2 x bfloat> %a) #0
-declare <2 x bfloat> @llvm.log.f16(<2 x bfloat> %a) #0
-declare <2 x bfloat> @llvm.log10.f16(<2 x bfloat> %a) #0
-declare <2 x bfloat> @llvm.log2.f16(<2 x bfloat> %a) #0
-declare <2 x bfloat> @llvm.fma.f16(<2 x bfloat> %a, <2 x bfloat> %b, <2 x bfloat> %c) #0
-declare <2 x bfloat> @llvm.fabs.f16(<2 x bfloat> %a) #0
-declare <2 x bfloat> @llvm.minnum.f16(<2 x bfloat> %a, <2 x bfloat> %b) #0
-declare <2 x bfloat> @llvm.maxnum.f16(<2 x bfloat> %a, <2 x bfloat> %b) #0
-declare <2 x bfloat> @llvm.copysign.f16(<2 x bfloat> %a, <2 x bfloat> %b) #0
-declare <2 x bfloat> @llvm.floor.f16(<2 x bfloat> %a) #0
-declare <2 x bfloat> @llvm.ceil.f16(<2 x bfloat> %a) #0
-declare <2 x bfloat> @llvm.trunc.f16(<2 x bfloat> %a) #0
-declare <2 x bfloat> @llvm.rint.f16(<2 x bfloat> %a) #0
-declare <2 x bfloat> @llvm.nearbyint.f16(<2 x bfloat> %a) #0
-declare <2 x bfloat> @llvm.round.f16(<2 x bfloat> %a) #0
-declare <2 x bfloat> @llvm.fmuladd.f16(<2 x bfloat> %a, <2 x bfloat> %b, <2 x bfloat> %c) #0
-
-
-; CHECK-LABEL: test_sqrt(
-; CHECK: ld.param.b32 [[A:%r[0-9]+]], [test_sqrt_param_0];
-; CHECK: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]]
-; CHECK-DAG: cvt.f32.bf16 [[AF0:%f[0-9]+]], [[A0]];
-; CHECK-DAG: cvt.f32.bf16 [[AF1:%f[0-9]+]], [[A1]];
-; CHECK-DAG: sqrt.rn.f32 [[RF0:%f[0-9]+]], [[AF0]];
-; CHECK-DAG: sqrt.rn.f32 [[RF1:%f[0-9]+]], [[AF1]];
-; CHECK-DAG: cvt.rn.bf16.f32 [[R0:%rs[0-9]+]], [[RF0]];
-; CHECK-DAG: cvt.rn.bf16.f32 [[R1:%rs[0-9]+]], [[RF1]];
-; CHECK: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
-; CHECK: st.param.b32 [func_retval0+0], [[R]];
-; CHECK: ret;
-define <2 x bfloat> @test_sqrt(<2 x bfloat> %a) #0 {
- %r = call <2 x bfloat> @llvm.sqrt.f16(<2 x bfloat> %a)
- ret <2 x bfloat> %r
-}
-
-; CHECK-LABEL: test_fmuladd(
-; CHECK-DAG: ld.param.b32 [[A:%r[0-9]+]], [test_fmuladd_param_0];
-; CHECK-DAG: ld.param.b32 [[B:%r[0-9]+]], [test_fmuladd_param_1];
-; CHECK-DAG: ld.param.b32 [[C:%r[0-9]+]], [test_fmuladd_param_2];
-;
-; CHECK: fma.rn.bf16x2 [[RA:%r[0-9]+]], [[A]], [[B]], [[C]];
-; CHECK-NEXT: st.param.b32 [func_retval0+0], [[RA]];
-; CHECK: ret;
-define <2 x bfloat> @test_fmuladd(<2 x bfloat> %a, <2 x bfloat> %b, <2 x bfloat> %c) #0 {
- %r = call <2 x bfloat> @llvm.fmuladd.f16(<2 x bfloat> %a, <2 x bfloat> %b, <2 x bfloat> %c)
- ret <2 x bfloat> %r
-}
-
-; CHECK-LABEL: test_fabs(
-; CHECK: ld.param.u32 [[A:%r[0-9]+]], [test_fabs_param_0];
-; CHECK: and.b32 [[R:%r[0-9]+]], [[A]], 2147450879;
-; CHECK: st.param.b32 [func_retval0+0], [[R]];
-; CHECK: ret;
-define <2 x bfloat> @test_fabs(<2 x bfloat> %a) #0 {
- %r = call <2 x bfloat> @llvm.fabs.f16(<2 x bfloat> %a)
- ret <2 x bfloat> %r
-}
-
-; CHECK-LABEL: test_fabs_add(
-; CHECK: abs.bf16x2
-; CHECK: ret;
-define <2 x bfloat> @test_fabs_add(<2 x bfloat> %a, <2 x bfloat> %b) #0 {
- %s = fadd <2 x bfloat> %a, %a
- %r = call <2 x bfloat> @llvm.fabs.f16(<2 x bfloat> %s)
- %d = fadd <2 x bfloat> %r, %b
- ret <2 x bfloat> %d
-}
-
-
-; CHECK-LABEL: test_minnum(
-; CHECK-DAG: ld.param.b32 [[AF0:%r[0-9]+]], [test_minnum_param_0];
-; CHECK-DAG: ld.param.b32 [[BF0:%r[0-9]+]], [test_minnum_param_1];
-; CHECK-DAG: min.bf16x2 [[RF0:%r[0-9]+]], [[AF0]], [[BF0]];
-; CHECK: st.param.b32 [func_retval0+0], [[RF0]];
-; CHECK: ret;
-define <2 x bfloat> @test_minnum(<2 x bfloat> %a, <2 x bfloat> %b) #0 {
- %r = call <2 x bfloat> @llvm.minnum.f16(<2 x bfloat> %a, <2 x bfloat> %b)
- ret <2 x bfloat> %r
-}
-
-; CHECK-LABEL: test_maxnum(
-; CHECK-DAG: ld.param.b32 [[AF0:%r[0-9]+]], [test_maxnum_param_0];
-; CHECK-DAG: ld.param.b32 [[BF0:%r[0-9]+]], [test_maxnum_param_1];
-; CHECK-DAG: max.bf16x2 [[RF0:%r[0-9]+]], [[AF0]], [[BF0]];
-; CHECK: st.param.b32 [func_retval0+0], [[RF0]];
-; CHECK: ret;
-define <2 x bfloat> @test_maxnum(<2 x bfloat> %a, <2 x bfloat> %b) #0 {
- %r = call <2 x bfloat> @llvm.maxnum.f16(<2 x bfloat> %a, <2 x bfloat> %b)
- ret <2 x bfloat> %r
-}
-
-
-
-; CHECK-LABEL: test_floor(
-; CHECK: ld.param.b32 [[A:%r[0-9]+]], [test_floor_param_0];
-; CHECK-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]];
-; SM90: cvt.rmi.bf16.bf16 [[R1:%rs[0-9]+]], [[A1]];
-; SM90: cvt.rmi.bf16.bf16 [[R0:%rs[0-9]+]], [[A0]];
-; SM80-DAG: cvt.f32.bf16 [[FA0:%f[0-9]+]], [[A0]];
-; SM80-DAG: cvt.f32.bf16 [[FA1:%f[0-9]+]], [[A1]];
-; SM80-DAG: cvt.rmi.f32.f32 [[RF0:%f[0-9]+]], [[FA0]];
-; SM80-DAG: cvt.rmi.f32.f32 [[RF1:%f[0-9]+]], [[FA1]];
-; SM80-DAG: cvt.rn.bf16.f32 [[R0:%rs[0-9]+]], [[RF0]];
-; SM80-DAG: cvt.rn.bf16.f32 [[R1:%rs[0-9]+]], [[RF1]];
-; CHECK: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
-; CHECK: st.param.b32 [func_retval0+0], [[R]];
-; CHECK: ret;
-define <2 x bfloat> @test_floor(<2 x bfloat> %a) #0 {
- %r = call <2 x bfloat> @llvm.floor.f16(<2 x bfloat> %a)
- ret <2 x bfloat> %r
-}
-
-; CHECK-LABEL: test_ceil(
-; CHECK: ld.param.b32 [[A:%r[0-9]+]], [test_ceil_param_0];
-; CHECK-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]];
-; SM90: cvt.rpi.bf16.bf16 [[R1:%rs[0-9]+]], [[A1]];
-; SM90: cvt.rpi.bf16.bf16 [[R0:%rs[0-9]+]], [[A0]];
-; SM80-DAG: cvt.f32.bf16 [[FA0:%f[0-9]+]], [[A0]];
-; SM80-DAG: cvt.f32.bf16 [[FA1:%f[0-9]+]], [[A1]];
-; SM80-DAG: cvt.rpi.f32.f32 [[RF0:%f[0-9]+]], [[FA0]];
-; SM80-DAG: cvt.rpi.f32.f32 [[RF1:%f[0-9]+]], [[FA1]];
-; SM80-DAG: cvt.rn.bf16.f32 [[R0:%rs[0-9]+]], [[RF0]];
-; SM80-DAG: cvt.rn.bf16.f32 [[R1:%rs[0-9]+]], [[RF1]];
-; CHECK: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
-; CHECK: st.param.b32 [func_retval0+0], [[R]];
-; CHECK: ret;
-define <2 x bfloat> @test_ceil(<2 x bfloat> %a) #0 {
- %r = call <2 x bfloat> @llvm.ceil.f16(<2 x bfloat> %a)
- ret <2 x bfloat> %r
-}
-
-; CHECK-LABEL: test_trunc(
-; CHECK: ld.param.b32 [[A:%r[0-9]+]], [test_trunc_param_0];
-; CHECK-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]];
-; SM90: cvt.rzi.bf16.bf16 [[R1:%rs[0-9]+]], [[A1]];
-; SM90: cvt.rzi.bf16.bf16 [[R0:%rs[0-9]+]], [[A0]];
-; CHECK: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
-; CHECK: st.param.b32 [func_retval0+0], [[R]];
-; CHECK: ret;
-define <2 x bfloat> @test_trunc(<2 x bfloat> %a) #0 {
- %r = call <2 x bfloat> @llvm.trunc.f16(<2 x bfloat> %a)
- ret <2 x bfloat> %r
-}
-
-; CHECK-LABEL: test_rint(
-; CHECK: ld.param.b32 [[A:%r[0-9]+]], [test_rint_param_0];
-; CHECK-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]];
-; SM90: cvt.rni.bf16.bf16 [[R1:%rs[0-9]+]], [[A1]];
-; SM90: cvt.rni.bf16.bf16 [[R0:%rs[0-9]+]], [[A0]];
-; CHECK: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
-; CHECK: st.param.b32 [func_retval0+0], [[R]];
-; CHECK: ret;
-define <2 x bfloat> @test_rint(<2 x bfloat> %a) #0 {
- %r = call <2 x bfloat> @llvm.rint.f16(<2 x bfloat> %a)
- ret <2 x bfloat> %r
-}
-
-; CHECK-LABEL: test_round(
-; CHECK: ld.param.b32 {{.*}}, [test_round_param_0];
-; check the use of sign mask and 0.5 to implement round
-; CHECK: and.b32 [[R1:%r[0-9]+]], {{.*}}, -2147483648;
-; CHECK: or.b32 {{.*}}, [[R1]], 1056964608;
-; CHECK: and.b32 [[R2:%r[0-9]+]], {{.*}}, -2147483648;
-; CHECK: or.b32 {{.*}}, [[R2]], 1056964608;
-; CHECK: st.param.b32 [func_retval0+0], {{.*}};
-; CHECK: ret;
-define <2 x bfloat> @test_round(<2 x bfloat> %a) #0 {
- %r = call <2 x bfloat> @llvm.round.f16(<2 x bfloat> %a)
- ret <2 x bfloat> %r
-}
-
-; CHECK-LABEL: test_copysign(
-; CHECK-DAG: ld.param.b32 [[A:%r[0-9]+]], [test_copysign_param_0];
-; CHECK-DAG: ld.param.b32 [[B:%r[0-9]+]], [test_copysign_param_1];
-; CHECK-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]]
-; CHECK-DAG: mov.b32 {[[B0:%rs[0-9]+]], [[B1:%rs[0-9]+]]}, [[B]]
-; CHECK-DAG: abs.bf16 [[AW1:%rs[0-9]+]], [[A1]];
-; CHECK-DAG: neg.bf16 [[AY1:%rs[0-9]+]], [[AW1]];
-; CHECK-DAG: shr.u16 [[BS1:%rs[0-9]+]], [[B1]], 15;
-; CHECK-DAG: and.b16 [[BR1:%rs[0-9]+]], [[BS1]], 1;
-; CHECK-DAG: setp.eq.b16 [[P1:%p[0-9]+]], [[BR1]], 1;
-; CHECK-DAG: selp.b16 [[RS1:%rs[0-9]+]], [[AY1]], [[AW1]], [[P1]]
-; CHECK-DAG: abs.bf16 [[AW0:%rs[0-9]+]], [[A0]];
-; CHECK-DAG: neg.bf16 [[AY0:%rs[0-9]+]], [[AW0]];
-; CHECK-DAG: shr.u16 [[BS0:%rs[0-9]+]], [[B0]], 15;
-; CHECK-DAG: and.b16 [[BR0:%rs[0-9]+]], [[BS0]], 1;
-; CHECK-DAG: setp.eq.b16 [[P0:%p[0-9]+]], [[BR0]], 1;
-; CHECK-DAG: selp.b16 [[RS0:%rs[0-9]+]], [[AY0]], [[AW0]], [[P0]]
-; CHECK-DAG: mov.b32 [[R:%r[0-9]+]], {[[RS0]], [[RS1]]}
-; CHECK: st.param.b32 [func_retval0+0], [[R]];
-; CHECK: ret;
-define <2 x bfloat> @test_copysign(<2 x bfloat> %a, <2 x bfloat> %b) #0 {
- %r = call <2 x bfloat> @llvm.copysign.f16(<2 x bfloat> %a, <2 x bfloat> %b)
- ret <2 x bfloat> %r
-}
-
+; RUN: llc < %s -march=nvptx64 -mcpu=sm_80 -mattr=+ptx71 | FileCheck --check-prefixes=CHECK,SM80 %s
+; RUN: llc < %s -march=nvptx64 -mcpu=sm_90 -mattr=+ptx78 | FileCheck --check-prefixes=CHECK,SM90 %s
+; RUN: %if ptxas-11.8 %{ llc < %s -march=nvptx64 -mcpu=sm_80 -mattr=+ptx71 | %ptxas-verify -arch=sm_80 %}
+; RUN: %if ptxas-11.8 %{ llc < %s -march=nvptx64 -mcpu=sm_90 -mattr=+ptx78 | %ptxas-verify -arch=sm_90 %}
+
+target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
+
+; CHECK-LABEL: test_ret_const(
+; CHECK: mov.b32 [[T:%r[0-9+]]], 1073758080;
+; CHECK: st.param.b32 [func_retval0+0], [[T]];
+; CHECK-NEXT: ret;
+
+define <2 x bfloat> @test_ret_const() #0 {
+ ret <2 x bfloat> <bfloat 1.0, bfloat 2.0>
+}
+
+; Check that we can lower fadd with immediate arguments.
+; CHECK-LABEL: test_fadd_imm_0(
+; CHECK-DAG: ld.param.b32 [[A:%r[0-9]+]], [test_fadd_imm_0_param_0];
+;
+; SM90-DAG: mov.b32 [[I:%r[0-9+]]], 1073758080;
+; SM90-DAG: add.rn.bf16x2 [[R:%r[0-9]+]], [[A]], [[I]];
+;
+; SM80-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]]
+; SM80-DAG: cvt.f32.bf16 [[FA0:%f[0-9]+]], [[A0]]
+; SM80-DAG: cvt.f32.bf16 [[FA1:%f[0-9]+]], [[A1]]
+; SM80-DAG: add.rn.f32 [[FR0:%f[0-9]+]], [[FA0]], 0f3F800000;
+; SM80-DAG: add.rn.f32 [[FR1:%f[0-9]+]], [[FA1]], 0f40000000;
+; SM80-DAG: cvt.rn.bf16.f32 [[R0:%rs[0-9]+]], [[FR0]]
+; SM80-DAG: cvt.rn.bf16.f32 [[R1:%rs[0-9]+]], [[FR1]]
+; SM80-DAG: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
+;
+; CHECK-NEXT: st.param.b32 [func_retval0+0], [[R]];
+; CHECK-NEXT: ret;
+
+define <2 x bfloat> @test_fadd_imm_0(<2 x bfloat> %a) #0 {
+ %r = fadd <2 x bfloat> <bfloat 1.0, bfloat 2.0>, %a
+ ret <2 x bfloat> %r
+}
+
+; CHECK-LABEL: test_fadd_imm_1(
+; CHECK: ld.param.b16 [[A:%rs[0-9]+]], [test_fadd_imm_1_param_0];
+; SM90: mov.b16 [[B:%rs[0-9]+]], 0x3F80;
+; SM90: add.rn.bf16 [[R:%rs[0-9]+]], [[A]], [[B]];
+
+; SM80-DAG: cvt.f32.bf16 [[FA:%f[0-9]+]], [[A]];
+; SM80: add.rn.f32 [[FR:%f[0-9]+]], [[FA]], 0f3F800000;
+; SM80: cvt.rn.bf16.f32 [[R:%rs[0-9]+]], [[FR]];
+
+; CHECK: st.param.b16 [func_retval0+0], [[R]];
+; CHECK-NEXT: ret;
+
+define bfloat @test_fadd_imm_1(bfloat %a) #0 {
+ %r = fadd bfloat %a, 1.0
+ ret bfloat %r
+}
+
+; CHECK-LABEL: test_fsubx2(
+; CHECK-DAG: ld.param.b32 [[A:%r[0-9]+]], [test_fsubx2_param_0];
+; CHECK-DAG: ld.param.b32 [[B:%r[0-9]+]], [test_fsubx2_param_1];
+; SM90: sub.rn.bf16x2 [[R:%r[0-9]+]], [[A]], [[B]];
+
+; SM80-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]];
+; SM80-DAG: mov.b32 {[[B0:%rs[0-9]+]], [[B1:%rs[0-9]+]]}, [[B]];
+; SM80-DAG: cvt.f32.bf16 [[FA1:%f[0-9]+]], [[A1]];
+; SM80-DAG: cvt.f32.bf16 [[FA0:%f[0-9]+]], [[A0]];
+; SM80-DAG: cvt.f32.bf16 [[FB0:%f[0-9]+]], [[B0]];
+; SM80-DAG: cvt.f32.bf16 [[FB1:%f[0-9]+]], [[B1]];
+; SM80-DAG: sub.rn.f32 [[FR0:%f[0-9]+]], [[FA0]], [[FB0]];
+; SM80-DAG: sub.rn.f32 [[FR1:%f[0-9]+]], [[FA1]], [[FB1]];
+; SM80-DAG: cvt.rn.bf16.f32 [[R0:%rs[0-9]+]], [[FR0]];
+; SM80-DAG: cvt.rn.bf16.f32 [[R1:%rs[0-9]+]], [[FR1]];
+; SM80: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]};
+
+; CHECK: st.param.b32 [func_retval0+0], [[R]];
+; CHECK: ret;
+
+define <2 x bfloat> @test_fsubx2(<2 x bfloat> %a, <2 x bfloat> %b) #0 {
+ %r = fsub <2 x bfloat> %a, %b
+ ret <2 x bfloat> %r
+}
+
+; CHECK-LABEL: test_fmulx2(
+; CHECK-DAG: ld.param.b32 [[A:%r[0-9]+]], [test_fmulx2_param_0];
+; CHECK-DAG: ld.param.b32 [[B:%r[0-9]+]], [test_fmulx2_param_1];
+; SM90: mul.rn.bf16x2 [[R:%r[0-9]+]], [[A]], [[B]];
+
+; SM80-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]];
+; SM80-DAG: mov.b32 {[[B0:%rs[0-9]+]], [[B1:%rs[0-9]+]]}, [[B]];
+; SM80-DAG: cvt.f32.bf16 [[FA1:%f[0-9]+]], [[A1]];
+; SM80-DAG: cvt.f32.bf16 [[FA0:%f[0-9]+]], [[A0]];
+; SM80-DAG: cvt.f32.bf16 [[FB0:%f[0-9]+]], [[B0]];
+; SM80-DAG: cvt.f32.bf16 [[FB1:%f[0-9]+]], [[B1]];
+; SM80-DAG: mul.rn.f32 [[FR0:%f[0-9]+]], [[FA0]], [[FB0]];
+; SM80-DAG: mul.rn.f32 [[FR1:%f[0-9]+]], [[FA1]], [[FB1]];
+; SM80-DAG: cvt.rn.bf16.f32 [[R0:%rs[0-9]+]], [[FR0]];
+; SM80-DAG: cvt.rn.bf16.f32 [[R1:%rs[0-9]+]], [[FR1]];
+; SM80: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]};
+
+; CHECK: st.param.b32 [func_retval0+0], [[R]];
+; CHECK: ret;
+
+define <2 x bfloat> @test_fmulx2(<2 x bfloat> %a, <2 x bfloat> %b) #0 {
+ %r = fmul <2 x bfloat> %a, %b
+ ret <2 x bfloat> %r
+}
+
+; CHECK-LABEL: test_fdiv(
+; CHECK-DAG: ld.param.b32 [[A:%r[0-9]+]], [test_fdiv_param_0];
+; CHECK-DAG: ld.param.b32 [[B:%r[0-9]+]], [test_fdiv_param_1];
+; CHECK-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]]
+; CHECK-DAG: mov.b32 {[[B0:%rs[0-9]+]], [[B1:%rs[0-9]+]]}, [[B]]
+; CHECK-DAG: cvt.f32.bf16 [[FA0:%f[0-9]+]], [[A0]];
+; CHECK-DAG: cvt.f32.bf16 [[FA1:%f[0-9]+]], [[A1]];
+; CHECK-DAG: cvt.f32.bf16 [[FB0:%f[0-9]+]], [[B0]];
+; CHECK-DAG: cvt.f32.bf16 [[FB1:%f[0-9]+]], [[B1]];
+; CHECK-DAG: div.rn.f32 [[FR0:%f[0-9]+]], [[FA0]], [[FB0]];
+; CHECK-DAG: div.rn.f32 [[FR1:%f[0-9]+]], [[FA1]], [[FB1]];
+; CHECK-DAG: cvt.rn.bf16.f32 [[R0:%rs[0-9]+]], [[FR0]];
+; CHECK-DAG: cvt.rn.bf16.f32 [[R1:%rs[0-9]+]], [[FR1]];
+; CHECK-NEXT: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
+; CHECK-NEXT: st.param.b32 [func_retval0+0], [[R]];
+; CHECK-NEXT: ret;
+
+define <2 x bfloat> @test_fdiv(<2 x bfloat> %a, <2 x bfloat> %b) #0 {
+ %r = fdiv <2 x bfloat> %a, %b
+ ret <2 x bfloat> %r
+}
+
+; CHECK-LABEL: test_fneg(
+; CHECK-DAG: ld.param.u32 [[A:%r[0-9]+]], [test_fneg_param_0];
+
+; CHECK-DAG: xor.b32 [[IHH0:%r[0-9]+]], [[A]], -2147450880;
+; CHECK-NEXT: st.param.b32 [func_retval0+0], [[IHH0]];
+; CHECK-NEXT: ret;
+define <2 x bfloat> @test_fneg(<2 x bfloat> %a) #0 {
+ %r = fneg <2 x bfloat> %a
+ ret <2 x bfloat> %r
+}
+
+; CHECK-LABEL: .func test_ldst_v2bf16(
+; CHECK-DAG: ld.param.u64 %[[A:rd[0-9]+]], [test_ldst_v2bf16_param_0];
+; CHECK-DAG: ld.param.u64 %[[B:rd[0-9]+]], [test_ldst_v2bf16_param_1];
+; CHECK-DAG: ld.b32 [[E:%r[0-9]+]], [%[[A]]]
+; CHECK-DAG: st.b32 [%[[B]]], [[E]];
+; CHECK: ret;
+define void @test_ldst_v2bf16(ptr %a, ptr %b) {
+ %t1 = load <2 x bfloat>, ptr %a
+ store <2 x bfloat> %t1, ptr %b, align 16
+ ret void
+}
+
+; CHECK-LABEL: .func test_ldst_v3bf16(
+; CHECK-DAG: ld.param.u64 %[[A:rd[0-9]+]], [test_ldst_v3bf16_param_0];
+; CHECK-DAG: ld.param.u64 %[[B:rd[0-9]+]], [test_ldst_v3bf16_param_1];
+; -- v3 is inconvenient to capture as it's lowered as ld.b64 + fair
+; number of bitshifting instructions that may change at llvm's whim.
+; So we only verify that we only issue correct number of writes using
+; correct offset, but not the values we write.
+; CHECK-DAG: ld.u64
+; CHECK-DAG: st.u32 [%[[B]]],
+; CHECK-DAG: st.b16 [%[[B]]+4],
+; CHECK: ret;
+define void @test_ldst_v3bf16(ptr %a, ptr %b) {
+ %t1 = load <3 x bfloat>, ptr %a
+ store <3 x bfloat> %t1, ptr %b, align 16
+ ret void
+}
+
+declare <2 x bfloat> @test_callee(<2 x bfloat> %a, <2 x bfloat> %b) #0
+
+; CHECK-LABEL: test_call(
+; CHECK-DAG: ld.param.b32 [[A:%r[0-9]+]], [test_call_param_0];
+; CHECK-DAG: ld.param.b32 [[B:%r[0-9]+]], [test_call_param_1];
+; CHECK: {
+; CHECK-DAG: .param .align 4 .b8 param0[4];
+; CHECK-DAG: .param .align 4 .b8 param1[4];
+; CHECK-DAG: st.param.b32 [param0+0], [[A]];
+; CHECK-DAG: st.param.b32 [param1+0], [[B]];
+; CHECK-DAG: .param .align 4 .b8 retval0[4];
+; CHECK: call.uni (retval0),
+; CHECK-NEXT: test_callee,
+; CHECK: );
+; CHECK-NEXT: ld.param.b32 [[R:%r[0-9]+]], [retval0+0];
+; CHECK-NEXT: }
+; CHECK-NEXT: st.param.b32 [func_retval0+0], [[R]];
+; CHECK-NEXT: ret;
+
+define <2 x bfloat> @test_call(<2 x bfloat> %a, <2 x bfloat> %b) #0 {
+ %r = call <2 x bfloat> @test_callee(<2 x bfloat> %a, <2 x bfloat> %b)
+ ret <2 x bfloat> %r
+}
+
+; CHECK-LABEL: test_select(
+; CHECK-DAG: ld.param.b32 [[A:%r[0-9]+]], [test_select_param_0];
+; CHECK-DAG: ld.param.b32 [[B:%r[0-9]+]], [test_select_param_1];
+; CHECK-DAG: ld.param.u8 [[C:%rs[0-9]+]], [test_select_param_2]
+; CHECK-DAG: setp.eq.b16 [[PRED:%p[0-9]+]], %rs{{.*}}, 1;
+; CHECK-NEXT: selp.b32 [[R:%r[0-9]+]], [[A]], [[B]], [[PRED]];
+; CHECK-NEXT: st.param.b32 [func_retval0+0], [[R]];
+; CHECK-NEXT: ret;
+
+define <2 x bfloat> @test_select(<2 x bfloat> %a, <2 x bfloat> %b, i1 zeroext %c) #0 {
+ %r = select i1 %c, <2 x bfloat> %a, <2 x bfloat> %b
+ ret <2 x bfloat> %r
+}
+
+; CHECK-LABEL: test_select_cc(
+; CHECK-DAG: ld.param.b32 [[A:%r[0-9]+]], [test_select_cc_param_0];
+; CHECK-DAG: ld.param.b32 [[B:%r[0-9]+]], [test_select_cc_param_1];
+; CHECK-DAG: ld.param.b32 [[C:%r[0-9]+]], [test_select_cc_param_2];
+; CHECK-DAG: ld.param.b32 [[D:%r[0-9]+]], [test_select_cc_param_3];
+;
+; SM90: setp.neu.bf16x2 [[P0:%p[0-9]+]]|[[P1:%p[0-9]+]], [[C]], [[D]]
+;
+; SM80-DAG: mov.b32 {[[C0:%rs[0-9]+]], [[C1:%rs[0-9]+]]}, [[C]]
+; SM80-DAG: mov.b32 {[[D0:%rs[0-9]+]], [[D1:%rs[0-9]+]]}, [[D]]
+; SM80-DAG: cvt.f32.bf16 [[DF0:%f[0-9]+]], [[D0]];
+; SM80-DAG: cvt.f32.bf16 [[CF0:%f[0-9]+]], [[C0]];
+; SM80-DAG: cvt.f32.bf16 [[DF1:%f[0-9]+]], [[D1]];
+; SM80-DAG: cvt.f32.bf16 [[CF1:%f[0-9]+]], [[C1]];
+; SM80-DAG: setp.neu.f32 [[P0:%p[0-9]+]], [[CF0]], [[DF0]]
+; SM80-DAG: setp.neu.f32 [[P1:%p[0-9]+]], [[CF1]], [[DF1]]
+;
+; CHECK-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]]
+; CHECK-DAG: mov.b32 {[[B0:%rs[0-9]+]], [[B1:%rs[0-9]+]]}, [[B]]
+; CHECK-DAG: selp.b16 [[R0:%rs[0-9]+]], [[A0]], [[B0]], [[P0]];
+; CHECK-DAG: selp.b16 [[R1:%rs[0-9]+]], [[A1]], [[B1]], [[P1]];
+; CHECK: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
+; CHECK-NEXT: st.param.b32 [func_retval0+0], [[R]];
+; CHECK-NEXT: ret;
+
+define <2 x bfloat> @test_select_cc(<2 x bfloat> %a, <2 x bfloat> %b, <2 x bfloat> %c, <2 x bfloat> %d) #0 {
+ %cc = fcmp une <2 x bfloat> %c, %d
+ %r = select <2 x i1> %cc, <2 x bfloat> %a, <2 x bfloat> %b
+ ret <2 x bfloat> %r
+}
+
+
+; CHECK-LABEL: test_select_cc_f32_bf16(
+; CHECK-DAG: ld.param.v2.f32 {[[A0:%f[0-9]+]], [[A1:%f[0-9]+]]}, [test_select_cc_f32_bf16_param_0];
+; CHECK-DAG: ld.param.b32 [[C:%r[0-9]+]], [test_select_cc_f32_bf16_param_2];
+; CHECK-DAG: ld.param.b32 [[D:%r[0-9]+]], [test_select_cc_f32_bf16_param_3];
+; SM90: setp.neu.bf16x2 [[P0:%p[0-9]+]]|[[P1:%p[0-9]+]], [[C]], [[D]]
+; CHECK-DAG: ld.param.v2.f32 {[[B0:%f[0-9]+]], [[B1:%f[0-9]+]]}, [test_select_cc_f32_bf16_param_1];
+
+; SM80-DAG: mov.b32 {[[C0:%rs[0-9]+]], [[C1:%rs[0-9]+]]}, [[C]]
+; SM80-DAG: mov.b32 {[[D0:%rs[0-9]+]], [[D1:%rs[0-9]+]]}, [[D]]
+; SM80-DAG: cvt.f32.bf16 [[DF0:%f[0-9]+]], [[D0]];
+; SM80-DAG: cvt.f32.bf16 [[CF0:%f[0-9]+]], [[C0]];
+; SM80-DAG: cvt.f32.bf16 [[DF1:%f[0-9]+]], [[D1]];
+; SM80-DAG: cvt.f32.bf16 [[CF1:%f[0-9]+]], [[C1]];
+; SM80-DAG: setp.neu.f32 [[P0:%p[0-9]+]], [[CF0]], [[DF0]]
+; SM80-DAG: setp.neu.f32 [[P1:%p[0-9]+]], [[CF1]], [[DF1]]
+;
+; CHECK-DAG: selp.f32 [[R0:%f[0-9]+]], [[A0]], [[B0]], [[P0]];
+; CHECK-DAG: selp.f32 [[R1:%f[0-9]+]], [[A1]], [[B1]], [[P1]];
+; CHECK-NEXT: st.param.v2.f32 [func_retval0+0], {[[R0]], [[R1]]};
+; CHECK-NEXT: ret;
+define <2 x float> @test_select_cc_f32_bf16(<2 x float> %a, <2 x float> %b,
+ <2 x bfloat> %c, <2 x bfloat> %d) #0 {
+ %cc = fcmp une <2 x bfloat> %c, %d
+ %r = select <2 x i1> %cc, <2 x float> %a, <2 x float> %b
+ ret <2 x float> %r
+}
+
+; CHECK-LABEL: test_select_cc_bf16_f32(
+; CHECK-DAG: ld.param.b32 [[A:%r[0-9]+]], [test_select_cc_bf16_f32_param_0];
+; CHECK-DAG: ld.param.b32 [[B:%r[0-9]+]], [test_select_cc_bf16_f32_param_1];
+; CHECK-DAG: ld.param.v2.f32 {[[C0:%f[0-9]+]], [[C1:%f[0-9]+]]}, [test_select_cc_bf16_f32_param_2];
+; CHECK-DAG: ld.param.v2.f32 {[[D0:%f[0-9]+]], [[D1:%f[0-9]+]]}, [test_select_cc_bf16_f32_param_3];
+; CHECK-DAG: setp.neu.f32 [[P0:%p[0-9]+]], [[C0]], [[D0]]
+; CHECK-DAG: setp.neu.f32 [[P1:%p[0-9]+]], [[C1]], [[D1]]
+; CHECK-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]]
+; CHECK-DAG: mov.b32 {[[B0:%rs[0-9]+]], [[B1:%rs[0-9]+]]}, [[B]]
+; CHECK-DAG: selp.b16 [[R0:%rs[0-9]+]], [[A0]], [[B0]], [[P0]];
+; CHECK-DAG: selp.b16 [[R1:%rs[0-9]+]], [[A1]], [[B1]], [[P1]];
+; CHECK: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
+; CHECK-NEXT: st.param.b32 [func_retval0+0], [[R]];
+; CHECK-NEXT: ret;
+define <2 x bfloat> @test_select_cc_bf16_f32(<2 x bfloat> %a, <2 x bfloat> %b,
+ <2 x float> %c, <2 x float> %d) #0 {
+ %cc = fcmp une <2 x float> %c, %d
+ %r = select <2 x i1> %cc, <2 x bfloat> %a, <2 x bfloat> %b
+ ret <2 x bfloat> %r
+}
+
+; CHECK-LABEL: test_fptrunc_2xfloat(
+; CHECK: ld.param.v2.f32 {[[A0:%f[0-9]+]], [[A1:%f[0-9]+]]}, [test_fptrunc_2xfloat_param_0];
+; CHECK-DAG: cvt.rn.bf16.f32 [[R0:%rs[0-9]+]], [[A0]];
+; CHECK-DAG: cvt.rn.bf16.f32 [[R1:%rs[0-9]+]], [[A1]];
+; CHECK: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
+; CHECK: st.param.b32 [func_retval0+0], [[R]];
+; CHECK: ret;
+define <2 x bfloat> @test_fptrunc_2xfloat(<2 x float> %a) #0 {
+ %r = fptrunc <2 x float> %a to <2 x bfloat>
+ ret <2 x bfloat> %r
+}
+
+; CHECK-LABEL: test_fpext_2xfloat(
+; CHECK: ld.param.b32 [[A:%r[0-9]+]], [test_fpext_2xfloat_param_0];
+; CHECK: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]]
+; CHECK-DAG: cvt.f32.bf16 [[R0:%f[0-9]+]], [[A0]];
+; CHECK-DAG: cvt.f32.bf16 [[R1:%f[0-9]+]], [[A1]];
+; CHECK-NEXT: st.param.v2.f32 [func_retval0+0], {[[R0]], [[R1]]};
+; CHECK: ret;
+define <2 x float> @test_fpext_2xfloat(<2 x bfloat> %a) #0 {
+ %r = fpext <2 x bfloat> %a to <2 x float>
+ ret <2 x float> %r
+}
+
+; CHECK-LABEL: test_bitcast_2xbf16_to_2xi16(
+; CHECK: ld.param.u32 [[A:%r[0-9]+]], [test_bitcast_2xbf16_to_2xi16_param_0];
+; CHECK: st.param.b32 [func_retval0+0], [[A]]
+; CHECK: ret;
+define <2 x i16> @test_bitcast_2xbf16_to_2xi16(<2 x bfloat> %a) #0 {
+ %r = bitcast <2 x bfloat> %a to <2 x i16>
+ ret <2 x i16> %r
+}
+
+
+; CHECK-LABEL: test_bitcast_2xi16_to_2xbf16(
+; CHECK: ld.param.b32 [[R]], [test_bitcast_2xi16_to_2xbf16_param_0];
+; CHECK: st.param.b32 [func_retval0+0], [[R]];
+; CHECK: ret;
+define <2 x bfloat> @test_bitcast_2xi16_to_2xbf16(<2 x i16> %a) #0 {
+ %r = bitcast <2 x i16> %a to <2 x bfloat>
+ ret <2 x bfloat> %r
+}
+
+declare <2 x bfloat> @llvm.sqrt.f16(<2 x bfloat> %a) #0
+declare <2 x bfloat> @llvm.powi.f16(<2 x bfloat> %a, <2 x i32> %b) #0
+declare <2 x bfloat> @llvm.sin.f16(<2 x bfloat> %a) #0
+declare <2 x bfloat> @llvm.cos.f16(<2 x bfloat> %a) #0
+declare <2 x bfloat> @llvm.pow.f16(<2 x bfloat> %a, <2 x bfloat> %b) #0
+declare <2 x bfloat> @llvm.exp.f16(<2 x bfloat> %a) #0
+declare <2 x bfloat> @llvm.exp2.f16(<2 x bfloat> %a) #0
+declare <2 x bfloat> @llvm.log.f16(<2 x bfloat> %a) #0
+declare <2 x bfloat> @llvm.log10.f16(<2 x bfloat> %a) #0
+declare <2 x bfloat> @llvm.log2.f16(<2 x bfloat> %a) #0
+declare <2 x bfloat> @llvm.fma.f16(<2 x bfloat> %a, <2 x bfloat> %b, <2 x bfloat> %c) #0
+declare <2 x bfloat> @llvm.fabs.f16(<2 x bfloat> %a) #0
+declare <2 x bfloat> @llvm.minnum.f16(<2 x bfloat> %a, <2 x bfloat> %b) #0
+declare <2 x bfloat> @llvm.maxnum.f16(<2 x bfloat> %a, <2 x bfloat> %b) #0
+declare <2 x bfloat> @llvm.copysign.f16(<2 x bfloat> %a, <2 x bfloat> %b) #0
+declare <2 x bfloat> @llvm.floor.f16(<2 x bfloat> %a) #0
+declare <2 x bfloat> @llvm.ceil.f16(<2 x bfloat> %a) #0
+declare <2 x bfloat> @llvm.trunc.f16(<2 x bfloat> %a) #0
+declare <2 x bfloat> @llvm.rint.f16(<2 x bfloat> %a) #0
+declare <2 x bfloat> @llvm.nearbyint.f16(<2 x bfloat> %a) #0
+declare <2 x bfloat> @llvm.round.f16(<2 x bfloat> %a) #0
+declare <2 x bfloat> @llvm.fmuladd.f16(<2 x bfloat> %a, <2 x bfloat> %b, <2 x bfloat> %c) #0
+
+
+; CHECK-LABEL: test_sqrt(
+; CHECK: ld.param.b32 [[A:%r[0-9]+]], [test_sqrt_param_0];
+; CHECK: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]]
+; CHECK-DAG: cvt.f32.bf16 [[AF0:%f[0-9]+]], [[A0]];
+; CHECK-DAG: cvt.f32.bf16 [[AF1:%f[0-9]+]], [[A1]];
+; CHECK-DAG: sqrt.rn.f32 [[RF0:%f[0-9]+]], [[AF0]];
+; CHECK-DAG: sqrt.rn.f32 [[RF1:%f[0-9]+]], [[AF1]];
+; CHECK-DAG: cvt.rn.bf16.f32 [[R0:%rs[0-9]+]], [[RF0]];
+; CHECK-DAG: cvt.rn.bf16.f32 [[R1:%rs[0-9]+]], [[RF1]];
+; CHECK: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
+; CHECK: st.param.b32 [func_retval0+0], [[R]];
+; CHECK: ret;
+define <2 x bfloat> @test_sqrt(<2 x bfloat> %a) #0 {
+ %r = call <2 x bfloat> @llvm.sqrt.f16(<2 x bfloat> %a)
+ ret <2 x bfloat> %r
+}
+
+; CHECK-LABEL: test_fmuladd(
+; CHECK-DAG: ld.param.b32 [[A:%r[0-9]+]], [test_fmuladd_param_0];
+; CHECK-DAG: ld.param.b32 [[B:%r[0-9]+]], [test_fmuladd_param_1];
+; CHECK-DAG: ld.param.b32 [[C:%r[0-9]+]], [test_fmuladd_param_2];
+;
+; CHECK: fma.rn.bf16x2 [[RA:%r[0-9]+]], [[A]], [[B]], [[C]];
+; CHECK-NEXT: st.param.b32 [func_retval0+0], [[RA]];
+; CHECK: ret;
+define <2 x bfloat> @test_fmuladd(<2 x bfloat> %a, <2 x bfloat> %b, <2 x bfloat> %c) #0 {
+ %r = call <2 x bfloat> @llvm.fmuladd.f16(<2 x bfloat> %a, <2 x bfloat> %b, <2 x bfloat> %c)
+ ret <2 x bfloat> %r
+}
+
+; CHECK-LABEL: test_fabs(
+; CHECK: ld.param.u32 [[A:%r[0-9]+]], [test_fabs_param_0];
+; CHECK: and.b32 [[R:%r[0-9]+]], [[A]], 2147450879;
+; CHECK: st.param.b32 [func_retval0+0], [[R]];
+; CHECK: ret;
+define <2 x bfloat> @test_fabs(<2 x bfloat> %a) #0 {
+ %r = call <2 x bfloat> @llvm.fabs.f16(<2 x bfloat> %a)
+ ret <2 x bfloat> %r
+}
+
+; CHECK-LABEL: test_fabs_add(
+; CHECK: abs.bf16x2
+; CHECK: ret;
+define <2 x bfloat> @test_fabs_add(<2 x bfloat> %a, <2 x bfloat> %b) #0 {
+ %s = fadd <2 x bfloat> %a, %a
+ %r = call <2 x bfloat> @llvm.fabs.f16(<2 x bfloat> %s)
+ %d = fadd <2 x bfloat> %r, %b
+ ret <2 x bfloat> %d
+}
+
+
+; CHECK-LABEL: test_minnum(
+; CHECK-DAG: ld.param.b32 [[AF0:%r[0-9]+]], [test_minnum_param_0];
+; CHECK-DAG: ld.param.b32 [[BF0:%r[0-9]+]], [test_minnum_param_1];
+; CHECK-DAG: min.bf16x2 [[RF0:%r[0-9]+]], [[AF0]], [[BF0]];
+; CHECK: st.param.b32 [func_retval0+0], [[RF0]];
+; CHECK: ret;
+define <2 x bfloat> @test_minnum(<2 x bfloat> %a, <2 x bfloat> %b) #0 {
+ %r = call <2 x bfloat> @llvm.minnum.f16(<2 x bfloat> %a, <2 x bfloat> %b)
+ ret <2 x bfloat> %r
+}
+
+; CHECK-LABEL: test_maxnum(
+; CHECK-DAG: ld.param.b32 [[AF0:%r[0-9]+]], [test_maxnum_param_0];
+; CHECK-DAG: ld.param.b32 [[BF0:%r[0-9]+]], [test_maxnum_param_1];
+; CHECK-DAG: max.bf16x2 [[RF0:%r[0-9]+]], [[AF0]], [[BF0]];
+; CHECK: st.param.b32 [func_retval0+0], [[RF0]];
+; CHECK: ret;
+define <2 x bfloat> @test_maxnum(<2 x bfloat> %a, <2 x bfloat> %b) #0 {
+ %r = call <2 x bfloat> @llvm.maxnum.f16(<2 x bfloat> %a, <2 x bfloat> %b)
+ ret <2 x bfloat> %r
+}
+
+
+
+; CHECK-LABEL: test_floor(
+; CHECK: ld.param.b32 [[A:%r[0-9]+]], [test_floor_param_0];
+; CHECK-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]];
+; SM90: cvt.rmi.bf16.bf16 [[R1:%rs[0-9]+]], [[A1]];
+; SM90: cvt.rmi.bf16.bf16 [[R0:%rs[0-9]+]], [[A0]];
+; SM80-DAG: cvt.f32.bf16 [[FA0:%f[0-9]+]], [[A0]];
+; SM80-DAG: cvt.f32.bf16 [[FA1:%f[0-9]+]], [[A1]];
+; SM80-DAG: cvt.rmi.f32.f32 [[RF0:%f[0-9]+]], [[FA0]];
+; SM80-DAG: cvt.rmi.f32.f32 [[RF1:%f[0-9]+]], [[FA1]];
+; SM80-DAG: cvt.rn.bf16.f32 [[R0:%rs[0-9]+]], [[RF0]];
+; SM80-DAG: cvt.rn.bf16.f32 [[R1:%rs[0-9]+]], [[RF1]];
+; CHECK: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
+; CHECK: st.param.b32 [func_retval0+0], [[R]];
+; CHECK: ret;
+define <2 x bfloat> @test_floor(<2 x bfloat> %a) #0 {
+ %r = call <2 x bfloat> @llvm.floor.f16(<2 x bfloat> %a)
+ ret <2 x bfloat> %r
+}
+
+; CHECK-LABEL: test_ceil(
+; CHECK: ld.param.b32 [[A:%r[0-9]+]], [test_ceil_param_0];
+; CHECK-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]];
+; SM90: cvt.rpi.bf16.bf16 [[R1:%rs[0-9]+]], [[A1]];
+; SM90: cvt.rpi.bf16.bf16 [[R0:%rs[0-9]+]], [[A0]];
+; SM80-DAG: cvt.f32.bf16 [[FA0:%f[0-9]+]], [[A0]];
+; SM80-DAG: cvt.f32.bf16 [[FA1:%f[0-9]+]], [[A1]];
+; SM80-DAG: cvt.rpi.f32.f32 [[RF0:%f[0-9]+]], [[FA0]];
+; SM80-DAG: cvt.rpi.f32.f32 [[RF1:%f[0-9]+]], [[FA1]];
+; SM80-DAG: cvt.rn.bf16.f32 [[R0:%rs[0-9]+]], [[RF0]];
+; SM80-DAG: cvt.rn.bf16.f32 [[R1:%rs[0-9]+]], [[RF1]];
+; CHECK: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
+; CHECK: st.param.b32 [func_retval0+0], [[R]];
+; CHECK: ret;
+define <2 x bfloat> @test_ceil(<2 x bfloat> %a) #0 {
+ %r = call <2 x bfloat> @llvm.ceil.f16(<2 x bfloat> %a)
+ ret <2 x bfloat> %r
+}
+
+; CHECK-LABEL: test_trunc(
+; CHECK: ld.param.b32 [[A:%r[0-9]+]], [test_trunc_param_0];
+; CHECK-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]];
+; SM90: cvt.rzi.bf16.bf16 [[R1:%rs[0-9]+]], [[A1]];
+; SM90: cvt.rzi.bf16.bf16 [[R0:%rs[0-9]+]], [[A0]];
+; CHECK: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
+; CHECK: st.param.b32 [func_retval0+0], [[R]];
+; CHECK: ret;
+define <2 x bfloat> @test_trunc(<2 x bfloat> %a) #0 {
+ %r = call <2 x bfloat> @llvm.trunc.f16(<2 x bfloat> %a)
+ ret <2 x bfloat> %r
+}
+
+; CHECK-LABEL: test_rint(
+; CHECK: ld.param.b32 [[A:%r[0-9]+]], [test_rint_param_0];
+; CHECK-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]];
+; SM90: cvt.rni.bf16.bf16 [[R1:%rs[0-9]+]], [[A1]];
+; SM90: cvt.rni.bf16.bf16 [[R0:%rs[0-9]+]], [[A0]];
+; CHECK: mov.b32 [[R:%r[0-9]+]], {[[R0]], [[R1]]}
+; CHECK: st.param.b32 [func_retval0+0], [[R]];
+; CHECK: ret;
+define <2 x bfloat> @test_rint(<2 x bfloat> %a) #0 {
+ %r = call <2 x bfloat> @llvm.rint.f16(<2 x bfloat> %a)
+ ret <2 x bfloat> %r
+}
+
+; CHECK-LABEL: test_round(
+; CHECK: ld.param.b32 {{.*}}, [test_round_param_0];
+; check the use of sign mask and 0.5 to implement round
+; CHECK: and.b32 [[R1:%r[0-9]+]], {{.*}}, -2147483648;
+; CHECK: or.b32 {{.*}}, [[R1]], 1056964608;
+; CHECK: and.b32 [[R2:%r[0-9]+]], {{.*}}, -2147483648;
+; CHECK: or.b32 {{.*}}, [[R2]], 1056964608;
+; CHECK: st.param.b32 [func_retval0+0], {{.*}};
+; CHECK: ret;
+define <2 x bfloat> @test_round(<2 x bfloat> %a) #0 {
+ %r = call <2 x bfloat> @llvm.round.f16(<2 x bfloat> %a)
+ ret <2 x bfloat> %r
+}
+
+; CHECK-LABEL: test_copysign(
+; CHECK-DAG: ld.param.b32 [[A:%r[0-9]+]], [test_copysign_param_0];
+; CHECK-DAG: ld.param.b32 [[B:%r[0-9]+]], [test_copysign_param_1];
+; CHECK-DAG: mov.b32 {[[A0:%rs[0-9]+]], [[A1:%rs[0-9]+]]}, [[A]]
+; CHECK-DAG: mov.b32 {[[B0:%rs[0-9]+]], [[B1:%rs[0-9]+]]}, [[B]]
+; CHECK-DAG: abs.bf16 [[AW1:%rs[0-9]+]], [[A1]];
+; CHECK-DAG: neg.bf16 [[AY1:%rs[0-9]+]], [[AW1]];
+; CHECK-DAG: shr.u16 [[BS1:%rs[0-9]+]], [[B1]], 15;
+; CHECK-DAG: and.b16 [[BR1:%rs[0-9]+]], [[BS1]], 1;
+; CHECK-DAG: setp.eq.b16 [[P1:%p[0-9]+]], [[BR1]], 1;
+; CHECK-DAG: selp.b16 [[RS1:%rs[0-9]+]], [[AY1]], [[AW1]], [[P1]]
+; CHECK-DAG: abs.bf16 [[AW0:%rs[0-9]+]], [[A0]];
+; CHECK-DAG: neg.bf16 [[AY0:%rs[0-9]+]], [[AW0]];
+; CHECK-DAG: shr.u16 [[BS0:%rs[0-9]+]], [[B0]], 15;
+; CHECK-DAG: and.b16 [[BR0:%rs[0-9]+]], [[BS0]], 1;
+; CHECK-DAG: setp.eq.b16 [[P0:%p[0-9]+]], [[BR0]], 1;
+; CHECK-DAG: selp.b16 [[RS0:%rs[0-9]+]], [[AY0]], [[AW0]], [[P0]]
+; CHECK-DAG: mov.b32 [[R:%r[0-9]+]], {[[RS0]], [[RS1]]}
+; CHECK: st.param.b32 [func_retval0+0], [[R]];
+; CHECK: ret;
+define <2 x bfloat> @test_copysign(<2 x bfloat> %a, <2 x bfloat> %b) #0 {
+ %r = call <2 x bfloat> @llvm.copysign.f16(<2 x bfloat> %a, <2 x bfloat> %b)
+ ret <2 x bfloat> %r
+}
+
diff --git a/llvm/test/CodeGen/NVPTX/zeroext-32bit.ll b/llvm/test/CodeGen/NVPTX/zeroext-32bit.ll
index 371543e3059110..03a6626b9af2aa 100644
--- a/llvm/test/CodeGen/NVPTX/zeroext-32bit.ll
+++ b/llvm/test/CodeGen/NVPTX/zeroext-32bit.ll
@@ -1,27 +1,27 @@
-; RUN: llc < %s -march=nvptx64 -mcpu=sm_30 -verify-machineinstrs | FileCheck %s
-; RUN: %if ptxas %{ llc < %s -march=nvptx64 -mcpu=sm_30 -verify-machineinstrs | %ptxas-verify %}
-
-; The zeroext attribute below should be silently ignored because
-; we can pass a 32-bit integer across a function call without
-; needing to extend it.
-
-target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v32:32:32-v64:64:64-v128:128:128-n16:32:64"
-target triple = "nvptx64-unknown-cuda"
-
-; CHECK-LABEL: .visible .func zeroext_test
-; CHECK-NOT: cvt.u32.u16
-define void @zeroext_test() {
- tail call void @call1(i32 zeroext 0)
- ret void
-}
-
-declare void @call1(i32 zeroext)
-
-; CHECK-LABEL: .visible .func signext_test
-; CHECK-NOT: cvt.s32.s16
-define void @signext_test() {
- tail call void @call2(i32 zeroext 0)
- ret void
-}
-
-declare void @call2(i32 zeroext)
+; RUN: llc < %s -march=nvptx64 -mcpu=sm_30 -verify-machineinstrs | FileCheck %s
+; RUN: %if ptxas %{ llc < %s -march=nvptx64 -mcpu=sm_30 -verify-machineinstrs | %ptxas-verify %}
+
+; The zeroext attribute below should be silently ignored because
+; we can pass a 32-bit integer across a function call without
+; needing to extend it.
+
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v32:32:32-v64:64:64-v128:128:128-n16:32:64"
+target triple = "nvptx64-unknown-cuda"
+
+; CHECK-LABEL: .visible .func zeroext_test
+; CHECK-NOT: cvt.u32.u16
+define void @zeroext_test() {
+ tail call void @call1(i32 zeroext 0)
+ ret void
+}
+
+declare void @call1(i32 zeroext)
+
+; CHECK-LABEL: .visible .func signext_test
+; CHECK-NOT: cvt.s32.s16
+define void @signext_test() {
+ tail call void @call2(i32 zeroext 0)
+ ret void
+}
+
+declare void @call2(i32 zeroext)
diff --git a/llvm/test/CodeGen/SPARC/LeonSMACUMACInstructionUT.ll b/llvm/test/CodeGen/SPARC/LeonSMACUMACInstructionUT.ll
index 109fa8bd2bd9ee..1d960ee53a8678 100644
--- a/llvm/test/CodeGen/SPARC/LeonSMACUMACInstructionUT.ll
+++ b/llvm/test/CodeGen/SPARC/LeonSMACUMACInstructionUT.ll
@@ -1,20 +1,20 @@
-; RUN: llc %s -O0 -march=sparc -mcpu=leon2 -o - | FileCheck %s
-; RUN: llc %s -O0 -march=sparc -mcpu=leon3 -o - | FileCheck %s
-; RUN: llc %s -O0 -march=sparc -mcpu=leon4 -o - | FileCheck %s
-
-; CHECK-LABEL: smac_test:
-; CHECK: smac %i1, %i0, %i0
-define i32 @smac_test(ptr %a, ptr %b) {
-entry:
-; %0 = tail call i32 asm sideeffect "smac $2, $1, $0", "={r2},{r3},{r4}"(i16* %a, i16* %b)
- %0 = tail call i32 asm sideeffect "smac $2, $1, $0", "=r,rI,r"(ptr %a, ptr %b)
- ret i32 %0
-}
-
-; CHECK-LABEL: umac_test:
-; CHECK: umac %i1, %i0, %i0
-define i32 @umac_test(ptr %a, ptr %b) {
-entry:
- %0 = tail call i32 asm sideeffect "umac $2, $1, $0", "=r,rI,r"(ptr %a, ptr %b)
- ret i32 %0
-}
+; RUN: llc %s -O0 -march=sparc -mcpu=leon2 -o - | FileCheck %s
+; RUN: llc %s -O0 -march=sparc -mcpu=leon3 -o - | FileCheck %s
+; RUN: llc %s -O0 -march=sparc -mcpu=leon4 -o - | FileCheck %s
+
+; CHECK-LABEL: smac_test:
+; CHECK: smac %i1, %i0, %i0
+define i32 @smac_test(ptr %a, ptr %b) {
+entry:
+; %0 = tail call i32 asm sideeffect "smac $2, $1, $0", "={r2},{r3},{r4}"(i16* %a, i16* %b)
+ %0 = tail call i32 asm sideeffect "smac $2, $1, $0", "=r,rI,r"(ptr %a, ptr %b)
+ ret i32 %0
+}
+
+; CHECK-LABEL: umac_test:
+; CHECK: umac %i1, %i0, %i0
+define i32 @umac_test(ptr %a, ptr %b) {
+entry:
+ %0 = tail call i32 asm sideeffect "umac $2, $1, $0", "=r,rI,r"(ptr %a, ptr %b)
+ ret i32 %0
+}
diff --git a/llvm/test/CodeGen/X86/dbg-value-superreg-copy2.mir b/llvm/test/CodeGen/X86/dbg-value-superreg-copy2.mir
index 86319da8db0187..e29d00afcd413d 100644
--- a/llvm/test/CodeGen/X86/dbg-value-superreg-copy2.mir
+++ b/llvm/test/CodeGen/X86/dbg-value-superreg-copy2.mir
@@ -40,7 +40,7 @@ body: |
%0:gr16_abcd = MOV16ri 1, debug-instr-number 1, debug-location !9
bb.1:
- DBG_INSTR_REF !7, !DIExpression(DW_OP_LLVM_arg, 0), dbg-instr-ref(2, 0), debug-location !9
+ DBG_INSTR_REF !7, !DIExpression(DW_OP_LLVM_arg, 0), dbg-instr-ref(2, 0), debug-location !9
%1:gr16 = COPY %0, debug-location !9
%2:gr16 = COPY %0
diff --git a/llvm/test/CodeGen/X86/non-value-mem-operand.mir b/llvm/test/CodeGen/X86/non-value-mem-operand.mir
index f188e821c2dad3..8ee8222f9e3ce9 100644
--- a/llvm/test/CodeGen/X86/non-value-mem-operand.mir
+++ b/llvm/test/CodeGen/X86/non-value-mem-operand.mir
@@ -1,293 +1,293 @@
-# RUN: llc -run-pass implicit-null-checks -mtriple=x86_64-apple-macosx -o - %s | FileCheck %s
-
-# CHECK-NOT: FAULTING_OP
-
---- |
- target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
- target triple = "x86_64-unknown-linux-gnu"
-
- @global = external global i8*
- @global.1 = external global i8*
-
- declare i8* @ham(i8*, i8**)
-
- define void @eggs(i8* %arg) gc "statepoint-example" {
- bb:
- %tmp = call i8* undef(i8* undef, i8** undef)
- %tmp1 = icmp eq i8* %tmp, null
- br i1 %tmp1, label %bb2, label %bb3, !make.implicit !0
-
- bb2: ; preds = %bb
- br i1 undef, label %bb51, label %bb59
-
- bb3: ; preds = %bb
- %tmp4 = getelementptr inbounds i8, i8* %tmp, i64 16
- %tmp5 = bitcast i8* %tmp4 to i64*
- br label %bb7
-
- bb7: ; preds = %bb37, %bb3
- %tmp8 = phi i64* [ %tmp5, %bb3 ], [ %tmp18, %bb37 ]
- %tmp10 = phi i32 [ undef, %bb3 ], [ %tmp48, %bb37 ]
- %tmp12 = phi i32 [ 0, %bb3 ], [ 6, %bb37 ]
- %tmp13 = phi double [ 0.000000e+00, %bb3 ], [ 2.000000e+00, %bb37 ]
- %tmp14 = zext i32 %tmp10 to i64
- br i1 undef, label %bb26, label %bb15
-
- bb15: ; preds = %bb7
- %tmp16 = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 2882400000, i32 0, void ()* nonnull elementtype(void ()) @wibble, i32 0, i32 0, i32 0, i32 0) ["deopt" (i32 1, i32 0, i32 99, i32 0, i32 12, i32 0, i32 10, i32 %tmp10, i32 10, i32 0, i32 10, i32 %tmp12, i32 10, i32 undef, i32 6, float undef, i32 7, double %tmp13, i32 99, i8* null, i32 7, double undef, i32 99, i8* null, i32 13, i8* %tmp, i32 7, double undef, i32 99, i8* null, i8* undef)]
- br label %bb26
-
- bb26: ; preds = %bb15, %bb7
- %tmp18 = phi i64* [ %tmp8, %bb7 ], [ undef, %bb15 ]
- %tmp20 = sub i32 0, 0
- %tmp21 = select i1 undef, i32 0, i32 %tmp20
- %tmp22 = sext i32 %tmp21 to i64
- %tmp23 = load i8*, i8** @global.1, align 8
- %tmp24 = icmp eq i8* %tmp23, null
- %tmp25 = select i1 %tmp24, i8* null, i8* undef
- %tmp27 = load i32, i32* undef, align 4
- %sunkaddr = mul i64 %tmp14, 8
- %tmp2 = bitcast i64* %tmp18 to i8*
- %sunkaddr1 = getelementptr i8, i8* %tmp2, i64 %sunkaddr
- %tmp3 = bitcast i8* %sunkaddr1 to i64*
- %tmp28 = load i64, i64* %tmp3, align 8
- %tmp29 = add i64 %tmp28, 1
- store i64 %tmp29, i64* %tmp3, align 8
- %tmp30 = trunc i64 %tmp28 to i32
- %tmp31 = sub i32 %tmp27, %tmp30
- store i32 %tmp31, i32* undef, align 4
- %tmp32 = getelementptr inbounds i8, i8* %tmp25, i64 768
- %tmp33 = bitcast i8* %tmp32 to i64*
- %tmp34 = load i64, i64* %tmp33, align 8
- br i1 undef, label %bb37, label %bb35
-
- bb35: ; preds = %bb26
- %tmp36 = call i8* @ham(i8* undef, i8** nonnull @global)
- br label %bb37
-
- bb37: ; preds = %bb35, %bb26
- %tmp38 = phi i8* [ %tmp36, %bb35 ], [ undef, %bb26 ]
- %tmp39 = getelementptr inbounds i8, i8* %tmp38, i64 760
- %tmp40 = bitcast i8* %tmp39 to i64*
- %tmp41 = load i64, i64* %tmp40, align 8
- %tmp42 = icmp slt i64 %tmp34, %tmp41
- %tmp43 = select i1 %tmp42, i64 %tmp41, i64 %tmp34
- %tmp44 = and i64 %tmp43, 63
- %tmp45 = ashr i64 %tmp29, %tmp44
- %sunkaddr2 = mul i64 %tmp14, 8
- %tmp6 = bitcast i64* %tmp18 to i8*
- %sunkaddr3 = getelementptr i8, i8* %tmp6, i64 %sunkaddr2
- %tmp7 = bitcast i8* %sunkaddr3 to i64*
- store i64 %tmp45, i64* %tmp7, align 8
- %tmp46 = sub i64 0, %tmp22
- store i64 %tmp46, i64* undef, align 8
- %tmp47 = add nsw i32 %tmp12, 1
- %tmp48 = add i32 %tmp10, 1
- %tmp49 = icmp sgt i32 %tmp48, 15140
- br i1 %tmp49, label %bb51.loopexit, label %bb7
-
- bb51.loopexit: ; preds = %bb37
- %tmp9 = add i32 %tmp10, 1
- br label %bb51
-
- bb51: ; preds = %bb51.loopexit, %bb2
- %tmp52 = phi i32 [ %tmp47, %bb51.loopexit ], [ 0, %bb2 ]
- %tmp53 = phi double [ 2.000000e+00, %bb51.loopexit ], [ 0.000000e+00, %bb2 ]
- %tmp54 = phi i32 [ %tmp9, %bb51.loopexit ], [ undef, %bb2 ]
- %tmp56 = add i32 %tmp54, 0
- %tmp57 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull elementtype(void (i32)) @wobble, i32 1, i32 0, i32 -121, i32 0, i32 0) ["deopt" (i32 1, i32 0, i32 270, i32 4, i32 12, i32 0, i32 11, i64 undef, i32 99, i8* null, i32 10, i32 %tmp56, i32 6, float undef, i32 99, i8* null, i32 99, i8* null, i32 10, i32 %tmp52, i32 10, i32 undef, i32 99, i8* null, i32 7, double %tmp53, i32 99, i8* null, i32 7, double undef, i32 99, i8* null, i32 13, i8* undef, i32 99, i8* null, i32 99, i8* null, i8* undef)]
- unreachable
-
- bb59: ; preds = %bb2
- %tmp61 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull elementtype(void (i32)) @wobble, i32 1, i32 0, i32 8, i32 0, i32 0) ["deopt" (i32 1, i32 0, i32 123, i32 4, i32 12, i32 0, i32 13, i8* null, i32 99, i32 undef, i32 13, i8* null, i32 10, i32 undef, i32 99, i32 undef, i32 99, i32 undef, i32 99, i32 undef, i32 99, i8* null, i32 99, float undef, i32 99, double undef, i32 99, i8* null, i32 99, double undef, i32 99, i8* null, i32 13, i8* null, i32 99, double undef, i32 99, i8* null)]
- unreachable
- }
-
- declare void @wibble()
-
- declare void @wobble(i32)
-
- declare token @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64, i32, void (i32)*, i32, i32, ...)
-
- declare token @llvm.experimental.gc.statepoint.p0f_isVoidf(i64, i32, void ()*, i32, i32, ...)
-
- ; Function Attrs: nounwind
- declare void @llvm.stackprotector(i8*, i8**) #0
-
- attributes #0 = { nounwind }
-
- !0 = !{}
-...
----
-name: eggs
-alignment: 16
-tracksRegLiveness: true
-fixedStack:
- - { id: 0, type: spill-slot, offset: -56, size: 8, alignment: 8, callee-saved-register: '$rbx' }
- - { id: 1, type: spill-slot, offset: -48, size: 8, alignment: 16, callee-saved-register: '$r12' }
- - { id: 2, type: spill-slot, offset: -40, size: 8, alignment: 8, callee-saved-register: '$r13' }
- - { id: 3, type: spill-slot, offset: -32, size: 8, alignment: 16, callee-saved-register: '$r14' }
- - { id: 4, type: spill-slot, offset: -24, size: 8, alignment: 8, callee-saved-register: '$r15' }
- - { id: 5, type: spill-slot, offset: -16, size: 8, alignment: 16, callee-saved-register: '$rbp' }
-stack:
- - { id: 0, offset: -88, size: 8, alignment: 8 }
- - { id: 1, offset: -96, size: 8, alignment: 8 }
- - { id: 2, offset: -104, size: 8, alignment: 8 }
- - { id: 3, offset: -64, size: 8, alignment: 8 }
- - { id: 4, type: spill-slot, offset: -72, size: 8, alignment: 8 }
- - { id: 5, type: spill-slot, offset: -80, size: 8, alignment: 8 }
-constants:
- - id: 0
- value: 'double 2.000000e+00'
- alignment: 8
-body: |
- bb.0.bb:
- successors: %bb.1.bb2(0x00000800), %bb.3.bb3(0x7ffff800)
- liveins: $rbp, $r15, $r14, $r13, $r12, $rbx
-
- frame-setup PUSH64r killed $rbp, implicit-def $rsp, implicit $rsp
- frame-setup PUSH64r killed $r15, implicit-def $rsp, implicit $rsp
- frame-setup PUSH64r killed $r14, implicit-def $rsp, implicit $rsp
- frame-setup PUSH64r killed $r13, implicit-def $rsp, implicit $rsp
- frame-setup PUSH64r killed $r12, implicit-def $rsp, implicit $rsp
- frame-setup PUSH64r killed $rbx, implicit-def $rsp, implicit $rsp
- $rsp = frame-setup SUB64ri8 $rsp, 56, implicit-def dead $eflags
- CALL64r undef $rax, csr_64, implicit $rsp, implicit undef $rdi, implicit undef $rsi, implicit-def $rsp, implicit-def $rax
- TEST64rr $rax, $rax, implicit-def $eflags
- JCC_1 %bb.3.bb3, 5, implicit killed $eflags
-
- bb.1.bb2:
- successors: %bb.2(0x40000000), %bb.13.bb59(0x40000000)
-
- $ebp = XOR32rr undef $ebp, undef $ebp, implicit-def dead $eflags
- TEST8rr $bpl, $bpl, implicit-def $eflags
- JCC_1 %bb.13.bb59, 4, implicit killed $eflags
-
- bb.2:
- successors: %bb.12.bb51(0x80000000)
- liveins: $ebp
-
- $xmm0 = XORPSrr undef $xmm0, undef $xmm0
- $ebx = IMPLICIT_DEF implicit-def $rbx
- JMP_1 %bb.12.bb51
-
- bb.3.bb3:
- successors: %bb.4.bb7(0x80000000)
- liveins: $rax
-
- MOV64mr $rsp, 1, $noreg, 32, $noreg, $rax :: (store (s64) into %stack.5)
- $r12 = MOV64rr killed $rax
- $r12 = ADD64ri8 killed $r12, 16, implicit-def dead $eflags
- $xmm0 = XORPSrr undef $xmm0, undef $xmm0
- $esi = XOR32rr undef $esi, undef $esi, implicit-def dead $eflags
- $rax = MOV64ri %const.0
- $xmm1 = MOVSDrm_alt killed $rax, 1, $noreg, 0, $noreg :: (load (s64) from constant-pool)
- MOVSDmr $rsp, 1, $noreg, 40, $noreg, killed $xmm1 :: (store (s64) into %stack.4)
- $eax = IMPLICIT_DEF
- $ecx = XOR32rr undef $ecx, undef $ecx, implicit-def dead $eflags
-
- bb.4.bb7:
- successors: %bb.6.bb26(0x40000000), %bb.5.bb15(0x40000000)
- liveins: $eax, $ecx, $esi, $r12, $xmm0
-
- $ebp = MOV32rr killed $ecx
- $ebx = MOV32rr killed $eax, implicit-def $rbx
- $r14d = MOV32rr $ebx, implicit-def $r14
- TEST8rr $sil, $sil, implicit-def $eflags
- JCC_1 %bb.6.bb26, 5, implicit $eflags
-
- bb.5.bb15:
- successors: %bb.6.bb26(0x80000000)
- liveins: $ebp, $rbx, $r14, $xmm0
-
- MOV32mr $rsp, 1, $noreg, 24, $noreg, $ebx :: (store (s32) into %stack.0, align 8)
- MOV32mr $rsp, 1, $noreg, 16, $noreg, $ebp :: (store (s32) into %stack.1, align 8)
- MOVSDmr $rsp, 1, $noreg, 8, $noreg, killed $xmm0 :: (store (s64) into %stack.2)
- $rax = MOV64rm $rsp, 1, $noreg, 32, $noreg :: (load (s64) from %stack.5)
- MOV64mr $rsp, 1, $noreg, 48, $noreg, killed $rax :: (store (s64) into %stack.3)
- $rax = MOV64ri @wibble
- STATEPOINT 2882400000, 0, 0, killed $rax, 2, 0, 2, 0, 2, 30, 2, 1, 2, 0, 2, 99, 2, 0, 2, 12, 2, 0, 2, 10, 1, 8, $rsp, 24, 2, 10, 2, 0, 2, 10, 1, 8, $rsp, 16, 2, 10, 2, 4278124286, 2, 6, 2, 4278124286, 2, 7, 1, 8, $rsp, 8, 2, 99, 2, 0, 2, 7, 2, 4278124286, 2, 99, 2, 0, 2, 13, 1, 8, $rsp, 48, 2, 7, 2, 4278124286, 2, 99, 2, 0, 2, 0, 2, 0, 2, 0, csr_64, implicit-def $rsp :: (volatile load (s64) from %stack.0), (volatile load (s64) from %stack.1), (volatile load (s64) from %stack.2), (volatile load (s64) from %stack.3)
- $esi = XOR32rr undef $esi, undef $esi, implicit-def dead $eflags
- $r12 = IMPLICIT_DEF
-
- bb.6.bb26:
- successors: %bb.8.bb37(0x40000000), %bb.7.bb35(0x40000000)
- liveins: $ebp, $esi, $rbx, $r12, $r14
-
- $rax = MOV64ri @global.1
- $rax = MOV64rm killed $rax, 1, $noreg, 0, $noreg :: (dereferenceable load (s64) from @global.1)
- TEST64rr $rax, $rax, implicit-def $eflags
- $rax = CMOV64rr undef $rax, killed $rax, 4, implicit killed $eflags
- $ecx = MOV32rm undef $rax, 1, $noreg, 0, $noreg :: (load (s32) from `i32* undef`)
- $rdx = MOV64rm $r12, 8, $r14, 0, $noreg :: (load (s64) from %ir.tmp3)
- $r15 = LEA64r $rdx, 1, $noreg, 1, _
- MOV64mr $r12, 8, $r14, 0, $noreg, $r15 :: (store (s64) into %ir.tmp3)
- $ecx = SUB32rr killed $ecx, $edx, implicit-def dead $eflags, implicit killed $rdx
- MOV32mr undef $rax, 1, $noreg, 0, $noreg, killed $ecx :: (store (s32) into `i32* undef`)
- $r13 = MOV64rm killed $rax, 1, $noreg, 768, $noreg :: (load (s64) from %ir.tmp33)
- TEST8rr $sil, $sil, implicit-def $eflags
- $rax = IMPLICIT_DEF
- JCC_1 %bb.8.bb37, 5, implicit $eflags
-
- bb.7.bb35:
- successors: %bb.8.bb37(0x80000000)
- liveins: $ebp, $rbx, $r12, $r13, $r14, $r15
-
- $rsi = MOV64ri @global
- $rax = MOV64ri @ham
- CALL64r killed $rax, csr_64, implicit $rsp, implicit undef $rdi, implicit $rsi, implicit-def $rsp, implicit-def $rax
- $esi = XOR32rr undef $esi, undef $esi, implicit-def dead $eflags
-
- bb.8.bb37:
- successors: %bb.9.bb37(0x40000000), %bb.10.bb37(0x40000000)
- liveins: $ebp, $esi, $rax, $rbx, $r12, $r13, $r14, $r15
-
- $rcx = MOV64rm killed $rax, 1, $noreg, 760, $noreg :: (load (s64) from %ir.tmp40)
- CMP64rr $r13, $rcx, implicit-def $eflags
- JCC_1 %bb.10.bb37, 12, implicit $eflags
-
- bb.9.bb37:
- successors: %bb.10.bb37(0x80000000)
- liveins: $ebp, $esi, $rbx, $r12, $r13, $r14, $r15
-
- $cl = MOV8rr $r13b, implicit killed $r13, implicit-def $rcx
-
- bb.10.bb37:
- successors: %bb.11.bb51.loopexit(0x00000800), %bb.4.bb7(0x7ffff800)
- liveins: $ebp, $esi, $rbx, $rcx, $r12, $r14, $r15
-
- $cl = KILL $cl, implicit killed $rcx
- $r15 = SAR64rCL killed $r15, implicit-def dead $eflags, implicit $cl
- MOV64mr $r12, 8, killed $r14, 0, $noreg, killed $r15 :: (store (s64) into %ir.tmp7)
- MOV64mi32 undef $rax, 1, $noreg, 0, $noreg, 0 :: (store (s64) into `i64* undef`)
- $eax = LEA64_32r $rbx, 1, $noreg, 1, _
- $ecx = MOV32ri 6
- CMP32ri $eax, 15141, implicit-def $eflags
- $xmm0 = MOVSDrm_alt $rsp, 1, $noreg, 40, $noreg :: (load (s64) from %stack.4)
- JCC_1 %bb.4.bb7, 12, implicit $eflags
-
- bb.11.bb51.loopexit:
- successors: %bb.12.bb51(0x80000000)
- liveins: $ebp, $rbx
-
- $ebp = INC32r killed $ebp, implicit-def dead $eflags
- $ebx = INC32r $ebx, implicit-def dead $eflags, implicit killed $rbx, implicit-def $rbx
- $rax = MOV64ri %const.0
- $xmm0 = MOVSDrm_alt killed $rax, 1, $noreg, 0, $noreg :: (load (s64) from constant-pool)
-
- bb.12.bb51:
- liveins: $ebp, $rbx, $xmm0
-
- MOV32mr $rsp, 1, $noreg, 24, $noreg, $ebx, implicit killed $rbx :: (store (s32) into %stack.0, align 8)
- MOV32mr $rsp, 1, $noreg, 16, $noreg, killed $ebp :: (store (s32) into %stack.1, align 8)
- MOVSDmr $rsp, 1, $noreg, 8, $noreg, killed $xmm0 :: (store (s64) into %stack.2)
- $rax = MOV64ri @wobble
- $edi = MOV32ri -121
- STATEPOINT 2882400000, 0, 1, killed $rax, $edi, 2, 0, 2, 0, 2, 38, 2, 1, 2, 0, 2, 270, 2, 4, 2, 12, 2, 0, 2, 11, 2, 4278124286, 2, 99, 2, 0, 2, 10, 1, 8, $rsp, 24, 2, 6, 2, 4278124286, 2, 99, 2, 0, 2, 99, 2, 0, 2, 10, 1, 8, $rsp, 16, 2, 10, 2, 4278124286, 2, 99, 2, 0, 2, 7, 1, 8, $rsp, 8, 2, 99, 2, 0, 2, 7, 2, 4278124286, 2, 99, 2, 0, 2, 13, 2, 4278124286, 2, 99, 2, 0, 2, 99, 2, 0, 2, 0, 2, 0, 2, 0, csr_64, implicit-def $rsp :: (volatile load (s64) from %stack.0), (volatile load (s64) from %stack.1), (volatile load (s64) from %stack.2)
-
- bb.13.bb59:
- $rax = MOV64ri @wobble
- $edi = MOV32ri 8
- STATEPOINT 2882400000, 0, 1, killed $rax, $edi, 2, 0, 2, 0, 2, 38, 2, 1, 2, 0, 2, 123, 2, 4, 2, 12, 2, 0, 2, 13, 2, 0, 2, 99, 2, 4278124286, 2, 13, 2, 0, 2, 10, 2, 4278124286, 2, 99, 2, 4278124286, 2, 99, 2, 4278124286, 2, 99, 2, 4278124286, 2, 99, 2, 0, 2, 99, 2, 4278124286, 2, 99, 2, 4278124286, 2, 99, 2, 0, 2, 99, 2, 4278124286, 2, 99, 2, 0, 2, 13, 2, 0, 2, 99, 2, 4278124286, 2, 99, 2, 0, 2, 0, 2, 0, 2, 0, csr_64, implicit-def $rsp
-
-...
+# RUN: llc -run-pass implicit-null-checks -mtriple=x86_64-apple-macosx -o - %s | FileCheck %s
+
+# CHECK-NOT: FAULTING_OP
+
+--- |
+ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+ target triple = "x86_64-unknown-linux-gnu"
+
+ @global = external global i8*
+ @global.1 = external global i8*
+
+ declare i8* @ham(i8*, i8**)
+
+ define void @eggs(i8* %arg) gc "statepoint-example" {
+ bb:
+ %tmp = call i8* undef(i8* undef, i8** undef)
+ %tmp1 = icmp eq i8* %tmp, null
+ br i1 %tmp1, label %bb2, label %bb3, !make.implicit !0
+
+ bb2: ; preds = %bb
+ br i1 undef, label %bb51, label %bb59
+
+ bb3: ; preds = %bb
+ %tmp4 = getelementptr inbounds i8, i8* %tmp, i64 16
+ %tmp5 = bitcast i8* %tmp4 to i64*
+ br label %bb7
+
+ bb7: ; preds = %bb37, %bb3
+ %tmp8 = phi i64* [ %tmp5, %bb3 ], [ %tmp18, %bb37 ]
+ %tmp10 = phi i32 [ undef, %bb3 ], [ %tmp48, %bb37 ]
+ %tmp12 = phi i32 [ 0, %bb3 ], [ 6, %bb37 ]
+ %tmp13 = phi double [ 0.000000e+00, %bb3 ], [ 2.000000e+00, %bb37 ]
+ %tmp14 = zext i32 %tmp10 to i64
+ br i1 undef, label %bb26, label %bb15
+
+ bb15: ; preds = %bb7
+ %tmp16 = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 2882400000, i32 0, void ()* nonnull elementtype(void ()) @wibble, i32 0, i32 0, i32 0, i32 0) ["deopt" (i32 1, i32 0, i32 99, i32 0, i32 12, i32 0, i32 10, i32 %tmp10, i32 10, i32 0, i32 10, i32 %tmp12, i32 10, i32 undef, i32 6, float undef, i32 7, double %tmp13, i32 99, i8* null, i32 7, double undef, i32 99, i8* null, i32 13, i8* %tmp, i32 7, double undef, i32 99, i8* null, i8* undef)]
+ br label %bb26
+
+ bb26: ; preds = %bb15, %bb7
+ %tmp18 = phi i64* [ %tmp8, %bb7 ], [ undef, %bb15 ]
+ %tmp20 = sub i32 0, 0
+ %tmp21 = select i1 undef, i32 0, i32 %tmp20
+ %tmp22 = sext i32 %tmp21 to i64
+ %tmp23 = load i8*, i8** @global.1, align 8
+ %tmp24 = icmp eq i8* %tmp23, null
+ %tmp25 = select i1 %tmp24, i8* null, i8* undef
+ %tmp27 = load i32, i32* undef, align 4
+ %sunkaddr = mul i64 %tmp14, 8
+ %tmp2 = bitcast i64* %tmp18 to i8*
+ %sunkaddr1 = getelementptr i8, i8* %tmp2, i64 %sunkaddr
+ %tmp3 = bitcast i8* %sunkaddr1 to i64*
+ %tmp28 = load i64, i64* %tmp3, align 8
+ %tmp29 = add i64 %tmp28, 1
+ store i64 %tmp29, i64* %tmp3, align 8
+ %tmp30 = trunc i64 %tmp28 to i32
+ %tmp31 = sub i32 %tmp27, %tmp30
+ store i32 %tmp31, i32* undef, align 4
+ %tmp32 = getelementptr inbounds i8, i8* %tmp25, i64 768
+ %tmp33 = bitcast i8* %tmp32 to i64*
+ %tmp34 = load i64, i64* %tmp33, align 8
+ br i1 undef, label %bb37, label %bb35
+
+ bb35: ; preds = %bb26
+ %tmp36 = call i8* @ham(i8* undef, i8** nonnull @global)
+ br label %bb37
+
+ bb37: ; preds = %bb35, %bb26
+ %tmp38 = phi i8* [ %tmp36, %bb35 ], [ undef, %bb26 ]
+ %tmp39 = getelementptr inbounds i8, i8* %tmp38, i64 760
+ %tmp40 = bitcast i8* %tmp39 to i64*
+ %tmp41 = load i64, i64* %tmp40, align 8
+ %tmp42 = icmp slt i64 %tmp34, %tmp41
+ %tmp43 = select i1 %tmp42, i64 %tmp41, i64 %tmp34
+ %tmp44 = and i64 %tmp43, 63
+ %tmp45 = ashr i64 %tmp29, %tmp44
+ %sunkaddr2 = mul i64 %tmp14, 8
+ %tmp6 = bitcast i64* %tmp18 to i8*
+ %sunkaddr3 = getelementptr i8, i8* %tmp6, i64 %sunkaddr2
+ %tmp7 = bitcast i8* %sunkaddr3 to i64*
+ store i64 %tmp45, i64* %tmp7, align 8
+ %tmp46 = sub i64 0, %tmp22
+ store i64 %tmp46, i64* undef, align 8
+ %tmp47 = add nsw i32 %tmp12, 1
+ %tmp48 = add i32 %tmp10, 1
+ %tmp49 = icmp sgt i32 %tmp48, 15140
+ br i1 %tmp49, label %bb51.loopexit, label %bb7
+
+ bb51.loopexit: ; preds = %bb37
+ %tmp9 = add i32 %tmp10, 1
+ br label %bb51
+
+ bb51: ; preds = %bb51.loopexit, %bb2
+ %tmp52 = phi i32 [ %tmp47, %bb51.loopexit ], [ 0, %bb2 ]
+ %tmp53 = phi double [ 2.000000e+00, %bb51.loopexit ], [ 0.000000e+00, %bb2 ]
+ %tmp54 = phi i32 [ %tmp9, %bb51.loopexit ], [ undef, %bb2 ]
+ %tmp56 = add i32 %tmp54, 0
+ %tmp57 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull elementtype(void (i32)) @wobble, i32 1, i32 0, i32 -121, i32 0, i32 0) ["deopt" (i32 1, i32 0, i32 270, i32 4, i32 12, i32 0, i32 11, i64 undef, i32 99, i8* null, i32 10, i32 %tmp56, i32 6, float undef, i32 99, i8* null, i32 99, i8* null, i32 10, i32 %tmp52, i32 10, i32 undef, i32 99, i8* null, i32 7, double %tmp53, i32 99, i8* null, i32 7, double undef, i32 99, i8* null, i32 13, i8* undef, i32 99, i8* null, i32 99, i8* null, i8* undef)]
+ unreachable
+
+ bb59: ; preds = %bb2
+ %tmp61 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull elementtype(void (i32)) @wobble, i32 1, i32 0, i32 8, i32 0, i32 0) ["deopt" (i32 1, i32 0, i32 123, i32 4, i32 12, i32 0, i32 13, i8* null, i32 99, i32 undef, i32 13, i8* null, i32 10, i32 undef, i32 99, i32 undef, i32 99, i32 undef, i32 99, i32 undef, i32 99, i8* null, i32 99, float undef, i32 99, double undef, i32 99, i8* null, i32 99, double undef, i32 99, i8* null, i32 13, i8* null, i32 99, double undef, i32 99, i8* null)]
+ unreachable
+ }
+
+ declare void @wibble()
+
+ declare void @wobble(i32)
+
+ declare token @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64, i32, void (i32)*, i32, i32, ...)
+
+ declare token @llvm.experimental.gc.statepoint.p0f_isVoidf(i64, i32, void ()*, i32, i32, ...)
+
+ ; Function Attrs: nounwind
+ declare void @llvm.stackprotector(i8*, i8**) #0
+
+ attributes #0 = { nounwind }
+
+ !0 = !{}
+...
+---
+name: eggs
+alignment: 16
+tracksRegLiveness: true
+fixedStack:
+ - { id: 0, type: spill-slot, offset: -56, size: 8, alignment: 8, callee-saved-register: '$rbx' }
+ - { id: 1, type: spill-slot, offset: -48, size: 8, alignment: 16, callee-saved-register: '$r12' }
+ - { id: 2, type: spill-slot, offset: -40, size: 8, alignment: 8, callee-saved-register: '$r13' }
+ - { id: 3, type: spill-slot, offset: -32, size: 8, alignment: 16, callee-saved-register: '$r14' }
+ - { id: 4, type: spill-slot, offset: -24, size: 8, alignment: 8, callee-saved-register: '$r15' }
+ - { id: 5, type: spill-slot, offset: -16, size: 8, alignment: 16, callee-saved-register: '$rbp' }
+stack:
+ - { id: 0, offset: -88, size: 8, alignment: 8 }
+ - { id: 1, offset: -96, size: 8, alignment: 8 }
+ - { id: 2, offset: -104, size: 8, alignment: 8 }
+ - { id: 3, offset: -64, size: 8, alignment: 8 }
+ - { id: 4, type: spill-slot, offset: -72, size: 8, alignment: 8 }
+ - { id: 5, type: spill-slot, offset: -80, size: 8, alignment: 8 }
+constants:
+ - id: 0
+ value: 'double 2.000000e+00'
+ alignment: 8
+body: |
+ bb.0.bb:
+ successors: %bb.1.bb2(0x00000800), %bb.3.bb3(0x7ffff800)
+ liveins: $rbp, $r15, $r14, $r13, $r12, $rbx
+
+ frame-setup PUSH64r killed $rbp, implicit-def $rsp, implicit $rsp
+ frame-setup PUSH64r killed $r15, implicit-def $rsp, implicit $rsp
+ frame-setup PUSH64r killed $r14, implicit-def $rsp, implicit $rsp
+ frame-setup PUSH64r killed $r13, implicit-def $rsp, implicit $rsp
+ frame-setup PUSH64r killed $r12, implicit-def $rsp, implicit $rsp
+ frame-setup PUSH64r killed $rbx, implicit-def $rsp, implicit $rsp
+ $rsp = frame-setup SUB64ri8 $rsp, 56, implicit-def dead $eflags
+ CALL64r undef $rax, csr_64, implicit $rsp, implicit undef $rdi, implicit undef $rsi, implicit-def $rsp, implicit-def $rax
+ TEST64rr $rax, $rax, implicit-def $eflags
+ JCC_1 %bb.3.bb3, 5, implicit killed $eflags
+
+ bb.1.bb2:
+ successors: %bb.2(0x40000000), %bb.13.bb59(0x40000000)
+
+ $ebp = XOR32rr undef $ebp, undef $ebp, implicit-def dead $eflags
+ TEST8rr $bpl, $bpl, implicit-def $eflags
+ JCC_1 %bb.13.bb59, 4, implicit killed $eflags
+
+ bb.2:
+ successors: %bb.12.bb51(0x80000000)
+ liveins: $ebp
+
+ $xmm0 = XORPSrr undef $xmm0, undef $xmm0
+ $ebx = IMPLICIT_DEF implicit-def $rbx
+ JMP_1 %bb.12.bb51
+
+ bb.3.bb3:
+ successors: %bb.4.bb7(0x80000000)
+ liveins: $rax
+
+ MOV64mr $rsp, 1, $noreg, 32, $noreg, $rax :: (store (s64) into %stack.5)
+ $r12 = MOV64rr killed $rax
+ $r12 = ADD64ri8 killed $r12, 16, implicit-def dead $eflags
+ $xmm0 = XORPSrr undef $xmm0, undef $xmm0
+ $esi = XOR32rr undef $esi, undef $esi, implicit-def dead $eflags
+ $rax = MOV64ri %const.0
+ $xmm1 = MOVSDrm_alt killed $rax, 1, $noreg, 0, $noreg :: (load (s64) from constant-pool)
+ MOVSDmr $rsp, 1, $noreg, 40, $noreg, killed $xmm1 :: (store (s64) into %stack.4)
+ $eax = IMPLICIT_DEF
+ $ecx = XOR32rr undef $ecx, undef $ecx, implicit-def dead $eflags
+
+ bb.4.bb7:
+ successors: %bb.6.bb26(0x40000000), %bb.5.bb15(0x40000000)
+ liveins: $eax, $ecx, $esi, $r12, $xmm0
+
+ $ebp = MOV32rr killed $ecx
+ $ebx = MOV32rr killed $eax, implicit-def $rbx
+ $r14d = MOV32rr $ebx, implicit-def $r14
+ TEST8rr $sil, $sil, implicit-def $eflags
+ JCC_1 %bb.6.bb26, 5, implicit $eflags
+
+ bb.5.bb15:
+ successors: %bb.6.bb26(0x80000000)
+ liveins: $ebp, $rbx, $r14, $xmm0
+
+ MOV32mr $rsp, 1, $noreg, 24, $noreg, $ebx :: (store (s32) into %stack.0, align 8)
+ MOV32mr $rsp, 1, $noreg, 16, $noreg, $ebp :: (store (s32) into %stack.1, align 8)
+ MOVSDmr $rsp, 1, $noreg, 8, $noreg, killed $xmm0 :: (store (s64) into %stack.2)
+ $rax = MOV64rm $rsp, 1, $noreg, 32, $noreg :: (load (s64) from %stack.5)
+ MOV64mr $rsp, 1, $noreg, 48, $noreg, killed $rax :: (store (s64) into %stack.3)
+ $rax = MOV64ri @wibble
+ STATEPOINT 2882400000, 0, 0, killed $rax, 2, 0, 2, 0, 2, 30, 2, 1, 2, 0, 2, 99, 2, 0, 2, 12, 2, 0, 2, 10, 1, 8, $rsp, 24, 2, 10, 2, 0, 2, 10, 1, 8, $rsp, 16, 2, 10, 2, 4278124286, 2, 6, 2, 4278124286, 2, 7, 1, 8, $rsp, 8, 2, 99, 2, 0, 2, 7, 2, 4278124286, 2, 99, 2, 0, 2, 13, 1, 8, $rsp, 48, 2, 7, 2, 4278124286, 2, 99, 2, 0, 2, 0, 2, 0, 2, 0, csr_64, implicit-def $rsp :: (volatile load (s64) from %stack.0), (volatile load (s64) from %stack.1), (volatile load (s64) from %stack.2), (volatile load (s64) from %stack.3)
+ $esi = XOR32rr undef $esi, undef $esi, implicit-def dead $eflags
+ $r12 = IMPLICIT_DEF
+
+ bb.6.bb26:
+ successors: %bb.8.bb37(0x40000000), %bb.7.bb35(0x40000000)
+ liveins: $ebp, $esi, $rbx, $r12, $r14
+
+ $rax = MOV64ri @global.1
+ $rax = MOV64rm killed $rax, 1, $noreg, 0, $noreg :: (dereferenceable load (s64) from @global.1)
+ TEST64rr $rax, $rax, implicit-def $eflags
+ $rax = CMOV64rr undef $rax, killed $rax, 4, implicit killed $eflags
+ $ecx = MOV32rm undef $rax, 1, $noreg, 0, $noreg :: (load (s32) from `i32* undef`)
+ $rdx = MOV64rm $r12, 8, $r14, 0, $noreg :: (load (s64) from %ir.tmp3)
+ $r15 = LEA64r $rdx, 1, $noreg, 1, _
+ MOV64mr $r12, 8, $r14, 0, $noreg, $r15 :: (store (s64) into %ir.tmp3)
+ $ecx = SUB32rr killed $ecx, $edx, implicit-def dead $eflags, implicit killed $rdx
+ MOV32mr undef $rax, 1, $noreg, 0, $noreg, killed $ecx :: (store (s32) into `i32* undef`)
+ $r13 = MOV64rm killed $rax, 1, $noreg, 768, $noreg :: (load (s64) from %ir.tmp33)
+ TEST8rr $sil, $sil, implicit-def $eflags
+ $rax = IMPLICIT_DEF
+ JCC_1 %bb.8.bb37, 5, implicit $eflags
+
+ bb.7.bb35:
+ successors: %bb.8.bb37(0x80000000)
+ liveins: $ebp, $rbx, $r12, $r13, $r14, $r15
+
+ $rsi = MOV64ri @global
+ $rax = MOV64ri @ham
+ CALL64r killed $rax, csr_64, implicit $rsp, implicit undef $rdi, implicit $rsi, implicit-def $rsp, implicit-def $rax
+ $esi = XOR32rr undef $esi, undef $esi, implicit-def dead $eflags
+
+ bb.8.bb37:
+ successors: %bb.9.bb37(0x40000000), %bb.10.bb37(0x40000000)
+ liveins: $ebp, $esi, $rax, $rbx, $r12, $r13, $r14, $r15
+
+ $rcx = MOV64rm killed $rax, 1, $noreg, 760, $noreg :: (load (s64) from %ir.tmp40)
+ CMP64rr $r13, $rcx, implicit-def $eflags
+ JCC_1 %bb.10.bb37, 12, implicit $eflags
+
+ bb.9.bb37:
+ successors: %bb.10.bb37(0x80000000)
+ liveins: $ebp, $esi, $rbx, $r12, $r13, $r14, $r15
+
+ $cl = MOV8rr $r13b, implicit killed $r13, implicit-def $rcx
+
+ bb.10.bb37:
+ successors: %bb.11.bb51.loopexit(0x00000800), %bb.4.bb7(0x7ffff800)
+ liveins: $ebp, $esi, $rbx, $rcx, $r12, $r14, $r15
+
+ $cl = KILL $cl, implicit killed $rcx
+ $r15 = SAR64rCL killed $r15, implicit-def dead $eflags, implicit $cl
+ MOV64mr $r12, 8, killed $r14, 0, $noreg, killed $r15 :: (store (s64) into %ir.tmp7)
+ MOV64mi32 undef $rax, 1, $noreg, 0, $noreg, 0 :: (store (s64) into `i64* undef`)
+ $eax = LEA64_32r $rbx, 1, $noreg, 1, _
+ $ecx = MOV32ri 6
+ CMP32ri $eax, 15141, implicit-def $eflags
+ $xmm0 = MOVSDrm_alt $rsp, 1, $noreg, 40, $noreg :: (load (s64) from %stack.4)
+ JCC_1 %bb.4.bb7, 12, implicit $eflags
+
+ bb.11.bb51.loopexit:
+ successors: %bb.12.bb51(0x80000000)
+ liveins: $ebp, $rbx
+
+ $ebp = INC32r killed $ebp, implicit-def dead $eflags
+ $ebx = INC32r $ebx, implicit-def dead $eflags, implicit killed $rbx, implicit-def $rbx
+ $rax = MOV64ri %const.0
+ $xmm0 = MOVSDrm_alt killed $rax, 1, $noreg, 0, $noreg :: (load (s64) from constant-pool)
+
+ bb.12.bb51:
+ liveins: $ebp, $rbx, $xmm0
+
+ MOV32mr $rsp, 1, $noreg, 24, $noreg, $ebx, implicit killed $rbx :: (store (s32) into %stack.0, align 8)
+ MOV32mr $rsp, 1, $noreg, 16, $noreg, killed $ebp :: (store (s32) into %stack.1, align 8)
+ MOVSDmr $rsp, 1, $noreg, 8, $noreg, killed $xmm0 :: (store (s64) into %stack.2)
+ $rax = MOV64ri @wobble
+ $edi = MOV32ri -121
+ STATEPOINT 2882400000, 0, 1, killed $rax, $edi, 2, 0, 2, 0, 2, 38, 2, 1, 2, 0, 2, 270, 2, 4, 2, 12, 2, 0, 2, 11, 2, 4278124286, 2, 99, 2, 0, 2, 10, 1, 8, $rsp, 24, 2, 6, 2, 4278124286, 2, 99, 2, 0, 2, 99, 2, 0, 2, 10, 1, 8, $rsp, 16, 2, 10, 2, 4278124286, 2, 99, 2, 0, 2, 7, 1, 8, $rsp, 8, 2, 99, 2, 0, 2, 7, 2, 4278124286, 2, 99, 2, 0, 2, 13, 2, 4278124286, 2, 99, 2, 0, 2, 99, 2, 0, 2, 0, 2, 0, 2, 0, csr_64, implicit-def $rsp :: (volatile load (s64) from %stack.0), (volatile load (s64) from %stack.1), (volatile load (s64) from %stack.2)
+
+ bb.13.bb59:
+ $rax = MOV64ri @wobble
+ $edi = MOV32ri 8
+ STATEPOINT 2882400000, 0, 1, killed $rax, $edi, 2, 0, 2, 0, 2, 38, 2, 1, 2, 0, 2, 123, 2, 4, 2, 12, 2, 0, 2, 13, 2, 0, 2, 99, 2, 4278124286, 2, 13, 2, 0, 2, 10, 2, 4278124286, 2, 99, 2, 4278124286, 2, 99, 2, 4278124286, 2, 99, 2, 4278124286, 2, 99, 2, 0, 2, 99, 2, 4278124286, 2, 99, 2, 4278124286, 2, 99, 2, 0, 2, 99, 2, 4278124286, 2, 99, 2, 0, 2, 13, 2, 0, 2, 99, 2, 4278124286, 2, 99, 2, 0, 2, 0, 2, 0, 2, 0, csr_64, implicit-def $rsp
+
+...
diff --git a/llvm/test/CodeGen/X86/patchable-prologue-debuginfo.ll b/llvm/test/CodeGen/X86/patchable-prologue-debuginfo.ll
index e713418c8d8ed9..8802f97d958fa2 100644
--- a/llvm/test/CodeGen/X86/patchable-prologue-debuginfo.ll
+++ b/llvm/test/CodeGen/X86/patchable-prologue-debuginfo.ll
@@ -1,56 +1,56 @@
-; RUN: llc -verify-machineinstrs < %s | FileCheck %s --check-prefix=CHECK
-
-; Regression test for function patching asserting in some cases when debug info activated.
-; The code below reproduces this crash.
-
-; Compilation flag: clang -target x86_64-none-linux-gnu -c -O2 -g -fms-hotpatch patchable-prologue-debuginfo.c
-; int func( int val ) {
-; int neg = -val;
-; return neg + 1;
-; }
-
-; CHECK: # -- Begin function func
-
-; ModuleID = 'patchable-prologue-debuginfo.c'
-source_filename = "patchable-prologue-debuginfo.c"
-target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-none-linux-gnu"
-
-; Function Attrs: mustprogress nofree norecurse nosync nounwind readnone willreturn uwtable
-define dso_local i32 @func(i32 noundef %val) local_unnamed_addr #0 !dbg !9 {
-entry:
- call void @llvm.dbg.value(metadata i32 %val, metadata !14, metadata !DIExpression()), !dbg !16
- call void @llvm.dbg.value(metadata !DIArgList(i32 0, i32 %val), metadata !15, metadata !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_minus, DW_OP_stack_value)), !dbg !16
- %add = sub i32 1, %val, !dbg !17
- ret i32 %add, !dbg !18
-}
-
-; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn
-declare void @llvm.dbg.value(metadata, metadata, metadata) #1
-
-attributes #0 = { mustprogress nofree norecurse nosync nounwind readnone willreturn uwtable "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "patchable-function"="prologue-short-redirect" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
-attributes #1 = { nocallback nofree nosync nounwind readnone speculatable willreturn }
-
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!2, !3, !4, !5, !6, !7}
-!llvm.ident = !{!8}
-
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 15.0.4 (git at gitlab-ncsa.ubisoft.org:LLVM/llvm-project.git 17850fb41c5bddcd80a9c2714f7e293f49fa8bb2)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)
-!1 = !DIFile(filename: "patchable-prologue-debuginfo.c", directory: "D:\\saudi\\bugrepro-llvm-hotpatch-crash")
-!2 = !{i32 7, !"Dwarf Version", i32 4}
-!3 = !{i32 2, !"Debug Info Version", i32 3}
-!4 = !{i32 1, !"wchar_size", i32 4}
-!5 = !{i32 7, !"PIC Level", i32 2}
-!6 = !{i32 7, !"PIE Level", i32 2}
-!7 = !{i32 7, !"uwtable", i32 2}
-!8 = !{!"clang version 15.0.4 (git at gitlab-ncsa.ubisoft.org:LLVM/llvm-project.git 17850fb41c5bddcd80a9c2714f7e293f49fa8bb2)"}
-!9 = distinct !DISubprogram(name: "func", scope: !1, file: !1, line: 1, type: !10, scopeLine: 2, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !13)
-!10 = !DISubroutineType(types: !11)
-!11 = !{!12, !12}
-!12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-!13 = !{!14, !15}
-!14 = !DILocalVariable(name: "val", arg: 1, scope: !9, file: !1, line: 1, type: !12)
-!15 = !DILocalVariable(name: "neg", scope: !9, file: !1, line: 3, type: !12)
-!16 = !DILocation(line: 0, scope: !9)
-!17 = !DILocation(line: 4, column: 16, scope: !9)
-!18 = !DILocation(line: 4, column: 5, scope: !9)
+; RUN: llc -verify-machineinstrs < %s | FileCheck %s --check-prefix=CHECK
+
+; Regression test for function patching asserting in some cases when debug info activated.
+; The code below reproduces this crash.
+
+; Compilation flag: clang -target x86_64-none-linux-gnu -c -O2 -g -fms-hotpatch patchable-prologue-debuginfo.c
+; int func( int val ) {
+; int neg = -val;
+; return neg + 1;
+; }
+
+; CHECK: # -- Begin function func
+
+; ModuleID = 'patchable-prologue-debuginfo.c'
+source_filename = "patchable-prologue-debuginfo.c"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-none-linux-gnu"
+
+; Function Attrs: mustprogress nofree norecurse nosync nounwind readnone willreturn uwtable
+define dso_local i32 @func(i32 noundef %val) local_unnamed_addr #0 !dbg !9 {
+entry:
+ call void @llvm.dbg.value(metadata i32 %val, metadata !14, metadata !DIExpression()), !dbg !16
+ call void @llvm.dbg.value(metadata !DIArgList(i32 0, i32 %val), metadata !15, metadata !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_minus, DW_OP_stack_value)), !dbg !16
+ %add = sub i32 1, %val, !dbg !17
+ ret i32 %add, !dbg !18
+}
+
+; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn
+declare void @llvm.dbg.value(metadata, metadata, metadata) #1
+
+attributes #0 = { mustprogress nofree norecurse nosync nounwind readnone willreturn uwtable "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "patchable-function"="prologue-short-redirect" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
+attributes #1 = { nocallback nofree nosync nounwind readnone speculatable willreturn }
+
+!llvm.dbg.cu = !{!0}
+!llvm.module.flags = !{!2, !3, !4, !5, !6, !7}
+!llvm.ident = !{!8}
+
+!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 15.0.4 (git at gitlab-ncsa.ubisoft.org:LLVM/llvm-project.git 17850fb41c5bddcd80a9c2714f7e293f49fa8bb2)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)
+!1 = !DIFile(filename: "patchable-prologue-debuginfo.c", directory: "D:\\saudi\\bugrepro-llvm-hotpatch-crash")
+!2 = !{i32 7, !"Dwarf Version", i32 4}
+!3 = !{i32 2, !"Debug Info Version", i32 3}
+!4 = !{i32 1, !"wchar_size", i32 4}
+!5 = !{i32 7, !"PIC Level", i32 2}
+!6 = !{i32 7, !"PIE Level", i32 2}
+!7 = !{i32 7, !"uwtable", i32 2}
+!8 = !{!"clang version 15.0.4 (git at gitlab-ncsa.ubisoft.org:LLVM/llvm-project.git 17850fb41c5bddcd80a9c2714f7e293f49fa8bb2)"}
+!9 = distinct !DISubprogram(name: "func", scope: !1, file: !1, line: 1, type: !10, scopeLine: 2, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !13)
+!10 = !DISubroutineType(types: !11)
+!11 = !{!12, !12}
+!12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+!13 = !{!14, !15}
+!14 = !DILocalVariable(name: "val", arg: 1, scope: !9, file: !1, line: 1, type: !12)
+!15 = !DILocalVariable(name: "neg", scope: !9, file: !1, line: 3, type: !12)
+!16 = !DILocation(line: 0, scope: !9)
+!17 = !DILocation(line: 4, column: 16, scope: !9)
+!18 = !DILocation(line: 4, column: 5, scope: !9)
diff --git a/llvm/test/CodeGen/X86/post-ra-sched-with-debug.mir b/llvm/test/CodeGen/X86/post-ra-sched-with-debug.mir
index 523940e2d67555..65675ced011fd2 100644
--- a/llvm/test/CodeGen/X86/post-ra-sched-with-debug.mir
+++ b/llvm/test/CodeGen/X86/post-ra-sched-with-debug.mir
@@ -298,8 +298,8 @@ body: |
$rcx = CMOV64rr killed $rcx, killed $rdx, 5, implicit killed $eflags
$rcx = OR64rr killed $rcx, killed $rsi, implicit-def dead $eflags
$rdx = MOVSX64rm32 $rbx, 1, $noreg, 0, $noreg :: (load (s32), align 8)
- DBG_INSTR_REF !46, !17, dbg-instr-ref(1, 0), debug-location !48
- DBG_INSTR_REF !39, !17, dbg-instr-ref(2, 0), debug-location !44
+ DBG_INSTR_REF !46, !17, dbg-instr-ref(1, 0), debug-location !48
+ DBG_INSTR_REF !39, !17, dbg-instr-ref(2, 0), debug-location !44
TEST32mr killed $rcx, 4, killed $rdx, 0, $noreg, killed $eax, implicit-def $eflags :: (load (s32))
JCC_1 %bb.2, 5, implicit $eflags
JMP_1 %bb.3
diff --git a/llvm/test/CodeGen/X86/windows-seh-EHa-CppCatchDotDotDot.ll b/llvm/test/CodeGen/X86/windows-seh-EHa-CppCatchDotDotDot.ll
index 25d92033cc6bc1..57ade639829548 100644
--- a/llvm/test/CodeGen/X86/windows-seh-EHa-CppCatchDotDotDot.ll
+++ b/llvm/test/CodeGen/X86/windows-seh-EHa-CppCatchDotDotDot.ll
@@ -1,290 +1,290 @@
-; RUN: llc -verify-machineinstrs < %s | FileCheck %s
-
-; CHECK-LABEL: "$cppxdata$?crash@@YAXH at Z":
-; CHECK: .long ("$stateUnwindMap$?crash@@YAXH at Z")
-; CHECK: .long ("$tryMap$?crash@@YAXH at Z")@IMGREL # TryBlockMap
-; CHECK-NEXT: .long 6 # IPMapEntries
-; CHECK-NEXT: .long ("$ip2state$?crash@@YAXH at Z")
-
-; CHECK-LABEL: "$stateUnwindMap$?crash@@YAXH at Z":
-; CHECK-NEXT: .long -1
-; CHECK-NEXT: .long 0
-; CHECK-NEXT: .long 0
-; CHECK-NEXT: .long "?dtor$
-; CHECK-NEXT: .long -1
-; CHECK-NEXT: .long 0
-
-; CHECK-LABEL: "$tryMap$?crash@@YAXH at Z":
-; CHECK-NEXT: .long 0
-; CHECK-NEXT: .long 1
-; CHECK-NEXT: .long 2
-; CHECK-NEXT: .long 1
-; CHECK-NEXT: .long ("$handlerMap$
-
-; CHECK: "$handlerMap$0$?crash@@YAXH at Z"
-; CHECK-NEXT: .long 0
-; CHECK-NEXT: .long 0
-; CHECK-NEXT: .long 0
-; CHECK-NEXT: .long "?catch$
-
-; CHECK-LABEL: "$ip2state$?crash@@YAXH at Z":
-; CHECK-NEXT: .long .Lfunc_begin0 at IMGREL
-; CHECK-NEXT: .long -1
-; CHECK-NEXT: .long .Ltmp
-; CHECK-NEXT: .long 0
-; CHECK-NEXT: .long .Ltmp
-; CHECK-NEXT: .long 1
-; CHECK-NEXT: .long .Ltmp
-; CHECK-NEXT: .long 0
-; CHECK-NEXT: .long .Ltmp
-; CHECK-NEXT: .long -1
-; CHECK-NEXT: .long "?catch$
-; CHECK-NEXT: .long 2
-
-; ModuleID = 'windows-seh-EHa-CppCatchDotDotDot.cpp'
-source_filename = "windows-seh-EHa-CppCatchDotDotDot.cpp"
-target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-windows-msvc"
-
-%rtti.TypeDescriptor2 = type { ptr, ptr, [3 x i8] }
-%eh.CatchableType = type { i32, i32, i32, i32, i32, i32, i32 }
-%eh.CatchableTypeArray.1 = type { i32, [1 x i32] }
-%eh.ThrowInfo = type { i32, i32, i32, i32 }
-%struct.A = type { i8 }
-
-$"??_C at _0BJ@EIKFKKLB@?5in?5catch?$CI?4?4?4?$CJ?5funclet?5?6?$AA@" = comdat any
-
-$"??_R0H at 8" = comdat any
-
-$"_CT??_R0H at 84" = comdat any
-
-$_CTA1H = comdat any
-
-$_TI1H = comdat any
-
-$"??_C at _0CN@MKCAOFNA@?5Test?5CPP?5unwind?3?5in?5except?5hand@" = comdat any
-
-$"??_C at _0N@LJHFFAKD@?5in?5A?5ctor?5?6?$AA@" = comdat any
-
-$"??_C at _0N@HMNCGOCN@?5in?5A?5dtor?5?6?$AA@" = comdat any
-
-@"?pt1@@3PEAHEA" = dso_local global ptr null, align 8
-@"?pt2@@3PEAHEA" = dso_local global ptr null, align 8
-@"?pt3@@3PEAHEA" = dso_local global ptr null, align 8
-@"?g@@3HA" = dso_local global i32 0, align 4
-@"??_C at _0BJ@EIKFKKLB@?5in?5catch?$CI?4?4?4?$CJ?5funclet?5?6?$AA@" = linkonce_odr dso_local unnamed_addr constant [25 x i8] c" in catch(...) funclet \0A\00", comdat, align 1
-@"??_7type_info@@6B@" = external constant ptr
-@"??_R0H at 8" = linkonce_odr global %rtti.TypeDescriptor2 { ptr @"??_7type_info@@6B@", ptr null, [3 x i8] c".H\00" }, comdat
- at __ImageBase = external dso_local constant i8
-@"_CT??_R0H at 84" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0H at 8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 -1, i32 0, i32 4, i32 0 }, section ".xdata", comdat
- at _CTA1H = linkonce_odr unnamed_addr constant %eh.CatchableTypeArray.1 { i32 1, [1 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"_CT??_R0H at 84" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32)] }, section ".xdata", comdat
- at _TI1H = linkonce_odr unnamed_addr constant %eh.ThrowInfo { i32 0, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @_CTA1H to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, section ".xdata", comdat
-@"??_C at _0CN@MKCAOFNA@?5Test?5CPP?5unwind?3?5in?5except?5hand@" = linkonce_odr dso_local unnamed_addr constant [45 x i8] c" Test CPP unwind: in except handler i = %d \0A\00", comdat, align 1
-@"??_C at _0N@LJHFFAKD@?5in?5A?5ctor?5?6?$AA@" = linkonce_odr dso_local unnamed_addr constant [13 x i8] c" in A ctor \0A\00", comdat, align 1
-@"??_C at _0N@HMNCGOCN@?5in?5A?5dtor?5?6?$AA@" = linkonce_odr dso_local unnamed_addr constant [13 x i8] c" in A dtor \0A\00", comdat, align 1
-
-; Function Attrs: noinline nounwind optnone
-define dso_local void @"?foo@@YAXXZ"() #0 {
-entry:
- store volatile i32 0, ptr inttoptr (i64 17 to ptr), align 4
- ret void
-}
-
-; Function Attrs: noinline optnone
-define dso_local void @"?crash@@YAXH at Z"(i32 %i) #1 personality ptr @__CxxFrameHandler3 {
-entry:
- %i.addr = alloca i32, align 4
- %ObjA = alloca %struct.A, align 1
- %tmp = alloca i32, align 4
- store i32 %i, ptr %i.addr, align 4
- %0 = load i32, ptr %i.addr, align 4
- store i32 %0, ptr @"?g@@3HA", align 4
- invoke void @llvm.seh.try.begin()
- to label %invoke.cont unwind label %catch.dispatch
-
-invoke.cont: ; preds = %entry
- %call = invoke ptr @"??0A@?1??crash@@YAXH at Z@QEAA at XZ"(ptr %ObjA)
- to label %invoke.cont1 unwind label %catch.dispatch
-
-invoke.cont1: ; preds = %invoke.cont
- invoke void @llvm.seh.scope.begin()
- to label %invoke.cont2 unwind label %ehcleanup
-
-invoke.cont2: ; preds = %invoke.cont1
- %1 = load i32, ptr %i.addr, align 4
- %cmp = icmp eq i32 %1, 1
- br i1 %cmp, label %if.then, label %if.end
-
-if.then: ; preds = %invoke.cont2
- store volatile i32 0, ptr inttoptr (i64 17 to ptr), align 4
- br label %if.end
-
-if.end: ; preds = %if.then, %invoke.cont2
- invoke void @llvm.seh.scope.end()
- to label %invoke.cont3 unwind label %ehcleanup
-
-invoke.cont3: ; preds = %if.end
- call void @"??1A@?1??crash@@YAXH at Z@QEAA at XZ"(ptr %ObjA) #6
- br label %try.cont
-
-ehcleanup: ; preds = %if.end, %invoke.cont1
- %2 = cleanuppad within none []
- call void @"??1A@?1??crash@@YAXH at Z@QEAA at XZ"(ptr %ObjA) #6 [ "funclet"(token %2) ]
- cleanupret from %2 unwind label %catch.dispatch
-
-catch.dispatch: ; preds = %ehcleanup, %invoke.cont, %entry
- %3 = catchswitch within none [label %catch] unwind to caller
-
-catch: ; preds = %catch.dispatch
- %4 = catchpad within %3 [ptr null, i32 0, ptr null]
- call void (...) @"?printf@@YAXZZ"(ptr @"??_C at _0BJ@EIKFKKLB@?5in?5catch?$CI?4?4?4?$CJ?5funclet?5?6?$AA@") [ "funclet"(token %4) ]
- %5 = load i32, ptr %i.addr, align 4
- %cmp4 = icmp eq i32 %5, 1
- br i1 %cmp4, label %if.then5, label %if.end6
-
-if.then5: ; preds = %catch
- %6 = load i32, ptr %i.addr, align 4
- store i32 %6, ptr %tmp, align 4
- %7 = bitcast ptr %tmp to ptr
- call void @_CxxThrowException(ptr %7, ptr @_TI1H) #7 [ "funclet"(token %4) ]
- unreachable
-
-if.end6: ; preds = %catch
- catchret from %4 to label %catchret.dest
-
-catchret.dest: ; preds = %if.end6
- br label %try.cont
-
-try.cont: ; preds = %catchret.dest, %invoke.cont3
- ret void
-}
-
-; Function Attrs: nounwind willreturn
-declare dso_local void @llvm.seh.try.begin() #2
-
-declare dso_local i32 @__CxxFrameHandler3(...)
-
-; Function Attrs: noinline optnone
-define internal ptr @"??0A@?1??crash@@YAXH at Z@QEAA at XZ"(ptr returned %this) unnamed_addr #1 align 2 {
-entry:
- %retval = alloca ptr, align 8
- %this.addr = alloca ptr, align 8
- store ptr %this, ptr %this.addr, align 8
- %this1 = load ptr, ptr %this.addr, align 8
- store ptr %this1, ptr %retval, align 8
- call void (...) @"?printf@@YAXZZ"(ptr @"??_C at _0N@LJHFFAKD@?5in?5A?5ctor?5?6?$AA@")
- %0 = load i32, ptr @"?g@@3HA", align 4
- %cmp = icmp eq i32 %0, 0
- br i1 %cmp, label %if.then, label %if.end
-
-if.then: ; preds = %entry
- store volatile i32 0, ptr inttoptr (i64 17 to ptr), align 4
- br label %if.end
-
-if.end: ; preds = %if.then, %entry
- %1 = load ptr, ptr %retval, align 8
- ret ptr %1
-}
-
-; Function Attrs: nounwind readnone
-declare dso_local void @llvm.seh.scope.begin() #3
-
-; Function Attrs: nounwind readnone
-declare dso_local void @llvm.seh.scope.end() #3
-
-; Function Attrs: noinline nounwind optnone
-define internal void @"??1A@?1??crash@@YAXH at Z@QEAA at XZ"(ptr %this) unnamed_addr #0 align 2 {
-entry:
- %this.addr = alloca ptr, align 8
- store ptr %this, ptr %this.addr, align 8
- %this1 = load ptr, ptr %this.addr, align 8
- call void (...) @"?printf@@YAXZZ"(ptr @"??_C at _0N@HMNCGOCN@?5in?5A?5dtor?5?6?$AA@")
- ret void
-}
-
-declare dso_local void @"?printf@@YAXZZ"(...) #4
-
-declare dso_local void @_CxxThrowException(ptr, ptr)
-
-; Function Attrs: noinline norecurse optnone
-define dso_local i32 @main() #5 personality ptr @__C_specific_handler {
-entry:
- %retval = alloca i32, align 4
- %i = alloca i32, align 4
- %__exception_code = alloca i32, align 4
- store i32 0, ptr %retval, align 4
- store i32 0, ptr %i, align 4
- br label %for.cond
-
-for.cond: ; preds = %for.inc, %entry
- %0 = load i32, ptr %i, align 4
- %cmp = icmp slt i32 %0, 2
- br i1 %cmp, label %for.body, label %for.end
-
-for.body: ; preds = %for.cond
- invoke void @llvm.seh.try.begin()
- to label %invoke.cont unwind label %catch.dispatch
-
-invoke.cont: ; preds = %for.body
- %1 = load volatile i32, ptr %i, align 4
- invoke void @"?crash@@YAXH at Z"(i32 %1) #8
- to label %invoke.cont1 unwind label %catch.dispatch
-
-invoke.cont1: ; preds = %invoke.cont
- invoke void @llvm.seh.try.end()
- to label %invoke.cont2 unwind label %catch.dispatch
-
-catch.dispatch: ; preds = %invoke.cont1, %invoke.cont, %for.body
- %2 = catchswitch within none [label %__except] unwind to caller
-
-__except: ; preds = %catch.dispatch
- %3 = catchpad within %2 [ptr null]
- catchret from %3 to label %__except3
-
-__except3: ; preds = %__except
- %4 = call i32 @llvm.eh.exceptioncode(token %3)
- store i32 %4, ptr %__exception_code, align 4
- %5 = load i32, ptr %i, align 4
- call void (...) @"?printf@@YAXZZ"(ptr @"??_C at _0CN@MKCAOFNA@?5Test?5CPP?5unwind?3?5in?5except?5hand@", i32 %5)
- br label %__try.cont
-
-__try.cont: ; preds = %__except3, %invoke.cont2
- br label %for.inc
-
-for.inc: ; preds = %__try.cont
- %6 = load i32, ptr %i, align 4
- %inc = add nsw i32 %6, 1
- store i32 %inc, ptr %i, align 4
- br label %for.cond
-
-invoke.cont2: ; preds = %invoke.cont1
- br label %__try.cont
-
-for.end: ; preds = %for.cond
- ret i32 0
-}
-
-declare dso_local i32 @__C_specific_handler(...)
-
-; Function Attrs: nounwind willreturn
-declare dso_local void @llvm.seh.try.end() #2
-
-; Function Attrs: nounwind readnone
-declare i32 @llvm.eh.exceptioncode(token) #3
-
-attributes #0 = { noinline nounwind optnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
-attributes #1 = { noinline optnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
-attributes #2 = { nounwind willreturn }
-attributes #3 = { nounwind readnone }
-attributes #4 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
-attributes #5 = { noinline norecurse optnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
-attributes #6 = { nounwind }
-attributes #7 = { noreturn }
-attributes #8 = { noinline }
-
-!llvm.module.flags = !{!0, !1}
-
-!0 = !{i32 1, !"wchar_size", i32 2}
-!1 = !{i32 2, !"eh-asynch", i32 1}
-
-
+; RUN: llc -verify-machineinstrs < %s | FileCheck %s
+
+; CHECK-LABEL: "$cppxdata$?crash@@YAXH at Z":
+; CHECK: .long ("$stateUnwindMap$?crash@@YAXH at Z")
+; CHECK: .long ("$tryMap$?crash@@YAXH at Z")@IMGREL # TryBlockMap
+; CHECK-NEXT: .long 6 # IPMapEntries
+; CHECK-NEXT: .long ("$ip2state$?crash@@YAXH at Z")
+
+; CHECK-LABEL: "$stateUnwindMap$?crash@@YAXH at Z":
+; CHECK-NEXT: .long -1
+; CHECK-NEXT: .long 0
+; CHECK-NEXT: .long 0
+; CHECK-NEXT: .long "?dtor$
+; CHECK-NEXT: .long -1
+; CHECK-NEXT: .long 0
+
+; CHECK-LABEL: "$tryMap$?crash@@YAXH at Z":
+; CHECK-NEXT: .long 0
+; CHECK-NEXT: .long 1
+; CHECK-NEXT: .long 2
+; CHECK-NEXT: .long 1
+; CHECK-NEXT: .long ("$handlerMap$
+
+; CHECK: "$handlerMap$0$?crash@@YAXH at Z"
+; CHECK-NEXT: .long 0
+; CHECK-NEXT: .long 0
+; CHECK-NEXT: .long 0
+; CHECK-NEXT: .long "?catch$
+
+; CHECK-LABEL: "$ip2state$?crash@@YAXH at Z":
+; CHECK-NEXT: .long .Lfunc_begin0 at IMGREL
+; CHECK-NEXT: .long -1
+; CHECK-NEXT: .long .Ltmp
+; CHECK-NEXT: .long 0
+; CHECK-NEXT: .long .Ltmp
+; CHECK-NEXT: .long 1
+; CHECK-NEXT: .long .Ltmp
+; CHECK-NEXT: .long 0
+; CHECK-NEXT: .long .Ltmp
+; CHECK-NEXT: .long -1
+; CHECK-NEXT: .long "?catch$
+; CHECK-NEXT: .long 2
+
+; ModuleID = 'windows-seh-EHa-CppCatchDotDotDot.cpp'
+source_filename = "windows-seh-EHa-CppCatchDotDotDot.cpp"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-windows-msvc"
+
+%rtti.TypeDescriptor2 = type { ptr, ptr, [3 x i8] }
+%eh.CatchableType = type { i32, i32, i32, i32, i32, i32, i32 }
+%eh.CatchableTypeArray.1 = type { i32, [1 x i32] }
+%eh.ThrowInfo = type { i32, i32, i32, i32 }
+%struct.A = type { i8 }
+
+$"??_C at _0BJ@EIKFKKLB@?5in?5catch?$CI?4?4?4?$CJ?5funclet?5?6?$AA@" = comdat any
+
+$"??_R0H at 8" = comdat any
+
+$"_CT??_R0H at 84" = comdat any
+
+$_CTA1H = comdat any
+
+$_TI1H = comdat any
+
+$"??_C at _0CN@MKCAOFNA@?5Test?5CPP?5unwind?3?5in?5except?5hand@" = comdat any
+
+$"??_C at _0N@LJHFFAKD@?5in?5A?5ctor?5?6?$AA@" = comdat any
+
+$"??_C at _0N@HMNCGOCN@?5in?5A?5dtor?5?6?$AA@" = comdat any
+
+@"?pt1@@3PEAHEA" = dso_local global ptr null, align 8
+@"?pt2@@3PEAHEA" = dso_local global ptr null, align 8
+@"?pt3@@3PEAHEA" = dso_local global ptr null, align 8
+@"?g@@3HA" = dso_local global i32 0, align 4
+@"??_C at _0BJ@EIKFKKLB@?5in?5catch?$CI?4?4?4?$CJ?5funclet?5?6?$AA@" = linkonce_odr dso_local unnamed_addr constant [25 x i8] c" in catch(...) funclet \0A\00", comdat, align 1
+@"??_7type_info@@6B@" = external constant ptr
+@"??_R0H at 8" = linkonce_odr global %rtti.TypeDescriptor2 { ptr @"??_7type_info@@6B@", ptr null, [3 x i8] c".H\00" }, comdat
+ at __ImageBase = external dso_local constant i8
+@"_CT??_R0H at 84" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0H at 8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 -1, i32 0, i32 4, i32 0 }, section ".xdata", comdat
+ at _CTA1H = linkonce_odr unnamed_addr constant %eh.CatchableTypeArray.1 { i32 1, [1 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"_CT??_R0H at 84" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32)] }, section ".xdata", comdat
+ at _TI1H = linkonce_odr unnamed_addr constant %eh.ThrowInfo { i32 0, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @_CTA1H to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, section ".xdata", comdat
+@"??_C at _0CN@MKCAOFNA@?5Test?5CPP?5unwind?3?5in?5except?5hand@" = linkonce_odr dso_local unnamed_addr constant [45 x i8] c" Test CPP unwind: in except handler i = %d \0A\00", comdat, align 1
+@"??_C at _0N@LJHFFAKD@?5in?5A?5ctor?5?6?$AA@" = linkonce_odr dso_local unnamed_addr constant [13 x i8] c" in A ctor \0A\00", comdat, align 1
+@"??_C at _0N@HMNCGOCN@?5in?5A?5dtor?5?6?$AA@" = linkonce_odr dso_local unnamed_addr constant [13 x i8] c" in A dtor \0A\00", comdat, align 1
+
+; Function Attrs: noinline nounwind optnone
+define dso_local void @"?foo@@YAXXZ"() #0 {
+entry:
+ store volatile i32 0, ptr inttoptr (i64 17 to ptr), align 4
+ ret void
+}
+
+; Function Attrs: noinline optnone
+define dso_local void @"?crash@@YAXH at Z"(i32 %i) #1 personality ptr @__CxxFrameHandler3 {
+entry:
+ %i.addr = alloca i32, align 4
+ %ObjA = alloca %struct.A, align 1
+ %tmp = alloca i32, align 4
+ store i32 %i, ptr %i.addr, align 4
+ %0 = load i32, ptr %i.addr, align 4
+ store i32 %0, ptr @"?g@@3HA", align 4
+ invoke void @llvm.seh.try.begin()
+ to label %invoke.cont unwind label %catch.dispatch
+
+invoke.cont: ; preds = %entry
+ %call = invoke ptr @"??0A@?1??crash@@YAXH at Z@QEAA at XZ"(ptr %ObjA)
+ to label %invoke.cont1 unwind label %catch.dispatch
+
+invoke.cont1: ; preds = %invoke.cont
+ invoke void @llvm.seh.scope.begin()
+ to label %invoke.cont2 unwind label %ehcleanup
+
+invoke.cont2: ; preds = %invoke.cont1
+ %1 = load i32, ptr %i.addr, align 4
+ %cmp = icmp eq i32 %1, 1
+ br i1 %cmp, label %if.then, label %if.end
+
+if.then: ; preds = %invoke.cont2
+ store volatile i32 0, ptr inttoptr (i64 17 to ptr), align 4
+ br label %if.end
+
+if.end: ; preds = %if.then, %invoke.cont2
+ invoke void @llvm.seh.scope.end()
+ to label %invoke.cont3 unwind label %ehcleanup
+
+invoke.cont3: ; preds = %if.end
+ call void @"??1A@?1??crash@@YAXH at Z@QEAA at XZ"(ptr %ObjA) #6
+ br label %try.cont
+
+ehcleanup: ; preds = %if.end, %invoke.cont1
+ %2 = cleanuppad within none []
+ call void @"??1A@?1??crash@@YAXH at Z@QEAA at XZ"(ptr %ObjA) #6 [ "funclet"(token %2) ]
+ cleanupret from %2 unwind label %catch.dispatch
+
+catch.dispatch: ; preds = %ehcleanup, %invoke.cont, %entry
+ %3 = catchswitch within none [label %catch] unwind to caller
+
+catch: ; preds = %catch.dispatch
+ %4 = catchpad within %3 [ptr null, i32 0, ptr null]
+ call void (...) @"?printf@@YAXZZ"(ptr @"??_C at _0BJ@EIKFKKLB@?5in?5catch?$CI?4?4?4?$CJ?5funclet?5?6?$AA@") [ "funclet"(token %4) ]
+ %5 = load i32, ptr %i.addr, align 4
+ %cmp4 = icmp eq i32 %5, 1
+ br i1 %cmp4, label %if.then5, label %if.end6
+
+if.then5: ; preds = %catch
+ %6 = load i32, ptr %i.addr, align 4
+ store i32 %6, ptr %tmp, align 4
+ %7 = bitcast ptr %tmp to ptr
+ call void @_CxxThrowException(ptr %7, ptr @_TI1H) #7 [ "funclet"(token %4) ]
+ unreachable
+
+if.end6: ; preds = %catch
+ catchret from %4 to label %catchret.dest
+
+catchret.dest: ; preds = %if.end6
+ br label %try.cont
+
+try.cont: ; preds = %catchret.dest, %invoke.cont3
+ ret void
+}
+
+; Function Attrs: nounwind willreturn
+declare dso_local void @llvm.seh.try.begin() #2
+
+declare dso_local i32 @__CxxFrameHandler3(...)
+
+; Function Attrs: noinline optnone
+define internal ptr @"??0A@?1??crash@@YAXH at Z@QEAA at XZ"(ptr returned %this) unnamed_addr #1 align 2 {
+entry:
+ %retval = alloca ptr, align 8
+ %this.addr = alloca ptr, align 8
+ store ptr %this, ptr %this.addr, align 8
+ %this1 = load ptr, ptr %this.addr, align 8
+ store ptr %this1, ptr %retval, align 8
+ call void (...) @"?printf@@YAXZZ"(ptr @"??_C at _0N@LJHFFAKD@?5in?5A?5ctor?5?6?$AA@")
+ %0 = load i32, ptr @"?g@@3HA", align 4
+ %cmp = icmp eq i32 %0, 0
+ br i1 %cmp, label %if.then, label %if.end
+
+if.then: ; preds = %entry
+ store volatile i32 0, ptr inttoptr (i64 17 to ptr), align 4
+ br label %if.end
+
+if.end: ; preds = %if.then, %entry
+ %1 = load ptr, ptr %retval, align 8
+ ret ptr %1
+}
+
+; Function Attrs: nounwind readnone
+declare dso_local void @llvm.seh.scope.begin() #3
+
+; Function Attrs: nounwind readnone
+declare dso_local void @llvm.seh.scope.end() #3
+
+; Function Attrs: noinline nounwind optnone
+define internal void @"??1A@?1??crash@@YAXH at Z@QEAA at XZ"(ptr %this) unnamed_addr #0 align 2 {
+entry:
+ %this.addr = alloca ptr, align 8
+ store ptr %this, ptr %this.addr, align 8
+ %this1 = load ptr, ptr %this.addr, align 8
+ call void (...) @"?printf@@YAXZZ"(ptr @"??_C at _0N@HMNCGOCN@?5in?5A?5dtor?5?6?$AA@")
+ ret void
+}
+
+declare dso_local void @"?printf@@YAXZZ"(...) #4
+
+declare dso_local void @_CxxThrowException(ptr, ptr)
+
+; Function Attrs: noinline norecurse optnone
+define dso_local i32 @main() #5 personality ptr @__C_specific_handler {
+entry:
+ %retval = alloca i32, align 4
+ %i = alloca i32, align 4
+ %__exception_code = alloca i32, align 4
+ store i32 0, ptr %retval, align 4
+ store i32 0, ptr %i, align 4
+ br label %for.cond
+
+for.cond: ; preds = %for.inc, %entry
+ %0 = load i32, ptr %i, align 4
+ %cmp = icmp slt i32 %0, 2
+ br i1 %cmp, label %for.body, label %for.end
+
+for.body: ; preds = %for.cond
+ invoke void @llvm.seh.try.begin()
+ to label %invoke.cont unwind label %catch.dispatch
+
+invoke.cont: ; preds = %for.body
+ %1 = load volatile i32, ptr %i, align 4
+ invoke void @"?crash@@YAXH at Z"(i32 %1) #8
+ to label %invoke.cont1 unwind label %catch.dispatch
+
+invoke.cont1: ; preds = %invoke.cont
+ invoke void @llvm.seh.try.end()
+ to label %invoke.cont2 unwind label %catch.dispatch
+
+catch.dispatch: ; preds = %invoke.cont1, %invoke.cont, %for.body
+ %2 = catchswitch within none [label %__except] unwind to caller
+
+__except: ; preds = %catch.dispatch
+ %3 = catchpad within %2 [ptr null]
+ catchret from %3 to label %__except3
+
+__except3: ; preds = %__except
+ %4 = call i32 @llvm.eh.exceptioncode(token %3)
+ store i32 %4, ptr %__exception_code, align 4
+ %5 = load i32, ptr %i, align 4
+ call void (...) @"?printf@@YAXZZ"(ptr @"??_C at _0CN@MKCAOFNA@?5Test?5CPP?5unwind?3?5in?5except?5hand@", i32 %5)
+ br label %__try.cont
+
+__try.cont: ; preds = %__except3, %invoke.cont2
+ br label %for.i