Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Remove assert.h include from DxilPipelineStateValidation.h #6921

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions include/dxc/DxilContainer/DxilPipelineStateValidation.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,19 @@
#ifndef __DXIL_PIPELINE_STATE_VALIDATION__H__
#define __DXIL_PIPELINE_STATE_VALIDATION__H__

// Don't include assert.h here.
// Since this header is included from multiple environments,
// it is necessary to define assert before this header is included.
// #include <assert.h>
python3kgae marked this conversation as resolved.
Show resolved Hide resolved

#include "dxc/WinAdapter.h"
#include <assert.h>
#include <cstring>
#include <stdint.h>

namespace llvm {
class raw_ostream;
}

// Don't include assert.h here.
// Since this header is included from multiple environments,
// it is necessary to define assert before this header is included.
// #include <assert.h>

#ifndef UINT_MAX
#define UINT_MAX 0xffffffff
#endif
Expand Down
2 changes: 2 additions & 0 deletions lib/DxilContainer/DxilPipelineStateValidation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
// //
///////////////////////////////////////////////////////////////////////////////

#include <assert.h> // Needed for DxilPipelineStateValidation.h

#include "dxc/DxilContainer/DxilPipelineStateValidation.h"
#include "dxc/DXIL/DxilModule.h"
#include "dxc/DXIL/DxilResource.h"
Expand Down
2 changes: 2 additions & 0 deletions lib/DxilContainer/DxilRDATBuilder.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <assert.h> // Needed for DxilPipelineStateValidation.h

#include "dxc/DxilContainer/DxilRDATBuilder.h"
#include "dxc/DxilContainer/DxilPipelineStateValidation.h"
#include "dxc/Support/FileIOHelper.h"
Expand Down
1 change: 1 addition & 0 deletions lib/DxilValidation/DxilContainerValidation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

#include "DxilValidationUtils.h"

#include <assert.h> // Needed for DxilPipelineStateValidation.h
#include <memory>

using std::unique_ptr;
Expand Down
3 changes: 2 additions & 1 deletion lib/HLSL/DxcOptimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
#include "llvm/Transforms/IPO/PassManagerBuilder.h"

#include <algorithm>
#include <list> // should change this for string_table
#include <assert.h> // Needed for DxilPipelineStateValidation.h
#include <list> // should change this for string_table
#include <vector>

#include "llvm/PassPrinters/PassPrinters.h"
Expand Down
2 changes: 2 additions & 0 deletions tools/clang/tools/dxa/dxa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
// //
///////////////////////////////////////////////////////////////////////////////

#include <assert.h> // Needed for DxilPipelineStateValidation.h

#include "dxc/Support/Global.h"
#include "dxc/Support/Unicode.h"
#include "dxc/Support/WinIncludes.h"
Expand Down
1 change: 1 addition & 0 deletions tools/clang/unittests/HLSL/OptimizerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#endif

#include <algorithm>
#include <assert.h> // Needed for DxilPipelineStateValidation.h
#include <cassert>
#include <map>
#include <memory>
Expand Down