Move bitwisecast.h to source/ and add include guard.

This commit is contained in:
Lei Zhang 2015-09-11 13:45:18 -04:00 committed by David Neto
parent a48678ab92
commit 4e092d3ac3
4 changed files with 7 additions and 4 deletions

View File

@ -96,7 +96,7 @@ include_directories(
set(SPIRV_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/include/libspirv/libspirv.h
${CMAKE_CURRENT_SOURCE_DIR}/include/utils/bitwisecast.h
${CMAKE_CURRENT_SOURCE_DIR}/source/bitwisecast.h
${CMAKE_CURRENT_SOURCE_DIR}/source/binary.h
${CMAKE_CURRENT_SOURCE_DIR}/source/diagnostic.h
${CMAKE_CURRENT_SOURCE_DIR}/source/opcode.h

View File

@ -24,6 +24,9 @@
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
#ifndef _LIBSPIRV_UTIL_BITWISECAST_H_
#define _LIBSPIRV_UTIL_BITWISECAST_H_
#include <cstring>
namespace spvutils {
@ -39,3 +42,5 @@ Dest BitwiseCast(Src source) {
}
} // namespace spvutils
#endif

View File

@ -25,8 +25,8 @@
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
#include <libspirv/libspirv.h>
#include <utils/bitwisecast.h>
#include "bitwisecast.h"
#include "binary.h"
#include "diagnostic.h"
#include "ext_inst.h"

View File

@ -24,7 +24,6 @@
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
#include <utils/bitwisecast.h>
#include "TestFixture.h"
#include "UnitSPIRV.h"
#include <algorithm>
@ -34,7 +33,6 @@
namespace {
using spvutils::BitwiseCast;
using test_fixture::TextToBinaryTest;
TEST(GetWord, Simple) {