Граф коммитов

15 Коммитов

Автор SHA1 Сообщение Дата
Joshua Batista 071972d7df
Remove some warnings from GCC when building DXC (#5262)
* remove warnings on dxc

* address feedback

* remove removed functions' declarations

* get rid of another unused function

* use maybe_unused instead of if 0 when removing unused functions

* address commenting issues

* Revert "use maybe_unused instead of if 0 when removing unused functions" because c++17 extensions aren't enabled

This reverts commit 3a00d8eb84.

* remove incorrect scope
2023-06-02 13:10:20 -07:00
Greg Roth 7ad9c9c032
Fallthrough (#4843)
A common source of bugs. Although many of these were harmless, some were
not. By eliminating them and enabling this warning as an error, we won't
add more in the future.


Fixed a real SPIRV bug that required a test update to expect the correct behavior.
SPIRV testing was expecting incorrect results that came from a fallthrough error
2022-12-09 10:13:56 -08:00
Xiang Li 4452103355
Change getPassName return type to StringRef. (#4247) 2022-02-10 14:14:43 -08:00
Minmin Gong 7e0f44fa6f
Cleanup part of compiling warnings (#2903)
Try to fix some compiler warnings produced by clang when building the dxc compiler
2020-06-25 02:57:41 -06:00
Adam Yang 5c64108bcc
Optimized bitcode loading. Added function to only materialize named MD. (#2854) 2020-04-28 14:04:19 -07:00
Adam Yang 3bf5ad44d3
Fixed hash difference between debug and non-debug by sorting named value serialization. (#2259) 2019-06-13 16:10:42 -07:00
Tristan Labelle 7d1a397e4f
Fix double-delete when failing to load llvm bitcode (#2169)
We added an exception when the bitcode reader reports an error, however the code higher up in the call stack isn't fully exception-safe and it turns out that two unique_ptrs over the same MemoryBuffer are alive at the same time, hence the double-delete and, more often than not, crash.
2019-05-06 08:29:43 -07:00
Xiang Li 4df08af7c0
Move DxilModule into DXIL directory. (#1599)
* Move DxilModule into DXIL directory.
2018-10-16 00:28:35 -07:00
Greg Roth edf7cd0fcf [linux-port] Enable ValidationTest for Unix (#1468)
Cast negative char literals. Fix capitalization of various shader
files. Add FileCheckerTest and FileCheckForTest to the build. These
are utility files in spite of the *Test suffix on one that enable
running tests according to header comment instructions and testing
results automaticlaly, which ValidationTest and other tests still to
come make use of.

* Fix out-of-scope access of warning messages

ValidationTest would sometimes fail in release builds because the
warning message which needed to match what was expected was being
communicated through a reference that was to a Twine object created
as a result of a C string passed to an argument taking Twine, when
the function exited, the temporary Twine was out of scope. It often
had the same values anyway, but not always.

By creating a new Twine object with the scope of the calling function
body, it sticks around long enough to pass its information into the
DiagnosticPrinter object. The warning message matches and the test
passes.
2018-07-31 13:17:06 -04:00
Greg Roth e7973d1525 Match throws and use standard string exception (#1264)
Some compilers require function prototypes and bodies to match with
throw() attributes. This corrects them.

Additionally, it replaces thrown std::exceptions with a string
parameter with runtime_errors, which can take a string on any
system.

Finally, I moved GetPosition in FileIOHelper.cpp to its proper
place with the rest of the AbstractMemoryStream implementation
instead of grouping it with the IDxcBlob implementation

Nonfunctional change. Just inching toward cross platform compatibility
2018-05-08 15:06:07 -04:00
Tex Riddell c225dead63
Merge types in linker, and recognize class.matrix.* type for library. (#1033) 2018-01-31 13:47:05 -08:00
Xiang Li f0c3cbd454 Resolve name collison for dxil types in BitcodeReader. (#411)
Resolve name collison for dxil types in BitcodeReader.
2017-07-10 16:28:23 -07:00
Marcelo Lopez Ruiz d5bb3089cf Add support for custom allocators (#390)
Supporting a custom allocator for dxcompiler.
Adds recovery for exceptions and out-of-memory handling.
Add custom allocator support to linker.
Fix for release-only test failure.
Removes assertion about presence of command-line option registration
2017-07-06 16:45:48 -07:00
David Peixotto f805233b49 Revert license text in banner comments to original llvm verbage (#33)
Fix #30: Revert license text in banner comments to original llvm verbage

This commit removes the Microsoft-specific copyright in llvm files
and reverts the copyright wording to the original llvm wording.

We used the following method to find the files to change:
1. Find all files in DirectXShaderCompiler that are also in llvm 3.7
2. For those files that have the Microsoft-specific copyright, revert
   it to the original llvm copyright as present in llvm 3.7
3. Revert the copyright in a few files that are not in llvm, but are
   mostly copies of files in llvm:
	lib\Transforms\Scalar\ScalarReplAggregatesHLSL.cpp
	lib\Transforms\Scalar\Reg2MemHLSL.cpp

Leave the Microsoft-specific copyright header in files not present
in stock llvm:

    include\dxc\*
    lib\HLSL\*
    lib\DxcSupport\*
    tools\clang\test\HLSL\*
    tools\clang\test\CodeGenHLSL\*
    tools\clang\unittests\HLSL\*
    tools\clang\unittests\HLSLHost\*
    tools\clang\tools\dxcompiler\*
    tools\clang\tools\dxa\*
    tools\clang\tools\dxc\*
    tools\clang\tools\dxopt\*
    tools\clang\tools\dxr\*
    tools\clang\tools\dxv\*
    tools\clang\tools\dotnetc\*
    utils\hct\*
    CONTRIBUTING.md
    COPYRIGHT
    LICENSE-MIT
    README.md
    cmake\modules\FindD3D12.cmake
    cmake\modules\FindDiaSDK.cmake
    cmake\modules\FindTAEF.cmake
    docs\DXIL.rst
    docs\HLSLChanges.rst
    docs\_themes\dxc-theme\layout.html
    docs\_themes\dxc-theme\theme.conf
    docs\_themes\dxc-theme\static\dxc-theme.css
    include\llvm\llvm_assert\assert.h
    include\llvm\llvm_assert\cassert
    include\llvm\Support\MSFileSystem.h
    include\llvm\Support\OacrIgnoreCond.h
    lib\MSSupport\CMakeLists.txt
    lib\MSSupport\MSFileSystemImpl.cpp
    lib\Support\assert.cpp
    lib\Support\MSFileSystemBasic.cpp
    lib\Support\Windows\MSFileSystem.inc.cpp
    lib\Transforms\Scalar\Reg2MemHLSL.cpp
    lib\Transforms\Scalar\ScalarReplAggregatesHLSL.cpp
    tools\clang\docs\UsingDxc.rst
    tools\clang\include\clang\AST\HlslTypes.h
    tools\clang\include\clang\Basic\BuiltinsDXIL.def
    tools\clang\include\clang\Basic\LangOptions.fixed.def
    tools\clang\include\clang\Parse\ParseHLSL.h
    tools\clang\include\clang\Sema\SemaHLSL.h
    tools\clang\lib\AST\ASTContextHLSL.cpp
    tools\clang\lib\AST\HlslTypes.cpp
    tools\clang\lib\CodeGen\CGHLSLMS.cpp
    tools\clang\lib\CodeGen\CGHLSLRuntime.cpp
    tools\clang\lib\CodeGen\CGHLSLRuntime.h
    tools\clang\lib\Frontend\Rewrite\FrontendActions_rewrite.cpp
    tools\clang\lib\Parse\HLSLRootSignature.cpp
    tools\clang\lib\Parse\HLSLRootSignature.h
    tools\clang\lib\Parse\ParseHLSL.cpp
    tools\clang\lib\Sema\gen_intrin_main_tables_15.h
    tools\clang\lib\Sema\SemaHLSL.cpp
    tools\clang\tools\d3dcomp\CMakeLists.txt
    tools\clang\tools\d3dcomp\d3dcomp.cpp
    tools\clang\tools\d3dcomp\d3dcomp.def
    tools\clang\tools\libclang\dxcisenseimpl.cpp
    tools\clang\tools\libclang\dxcisenseimpl.h
    tools\clang\tools\libclang\dxcrewriteunused.cpp
    tools\clang\tools\libclang\libclang.rc
    tools\dxexp\CMakeLists.txt
    tools\dxexp\dxexp.cpp
    tools\dxexp\LLVMBuild.txt
2017-01-24 17:54:00 -08:00
Marcelo Lopez Ruiz 6ee4074a4b first commit 2016-12-28 11:52:27 -08:00