diff options
author | David Neto <dneto@google.com> | 2016-10-27 22:47:20 -0400 |
---|---|---|
committer | David Neto <dneto@google.com> | 2016-11-03 11:40:52 -0400 |
commit | bf190ec8393eadc4876de7306eef951956455ab1 (patch) | |
tree | 5367c7e4c411cc8c8cc92a0bef1e75e4c9fda1ea | |
parent | b371439d6fbc6b7b7cd5b4ef7046faa6cdf0e9e2 (diff) | |
download | spirv-tools-bf190ec8393eadc4876de7306eef951956455ab1.tar.gz |
Remove source/instruction.cpp
Avoids linker problems on Windows and OSX with duplicate object file
names. Avoids collision with source/val/instruction.cpp
Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/451
-rw-r--r-- | source/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/instruction.cpp | 20 | ||||
-rw-r--r-- | source/instruction.h | 4 |
3 files changed, 3 insertions, 22 deletions
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 0324aea9..4b9c52d9 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -142,7 +142,6 @@ set(SPIRV_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/diagnostic.cpp ${CMAKE_CURRENT_SOURCE_DIR}/disassemble.cpp ${CMAKE_CURRENT_SOURCE_DIR}/ext_inst.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/instruction.cpp ${CMAKE_CURRENT_SOURCE_DIR}/libspirv.cpp ${CMAKE_CURRENT_SOURCE_DIR}/message.cpp ${CMAKE_CURRENT_SOURCE_DIR}/name_mapper.cpp diff --git a/source/instruction.cpp b/source/instruction.cpp deleted file mode 100644 index 8436fdca..00000000 --- a/source/instruction.cpp +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2015-2016 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "instruction.h" - -void spvInstructionAddWord(spv_instruction_t* inst, uint32_t value) { - inst->words.push_back(value); -} - diff --git a/source/instruction.h b/source/instruction.h index ff735e71..5dd4d139 100644 --- a/source/instruction.h +++ b/source/instruction.h @@ -42,6 +42,8 @@ struct spv_instruction_t { }; // Appends a word to an instruction, without checking for overflow. -void spvInstructionAddWord(spv_instruction_t* inst, uint32_t value); +inline void spvInstructionAddWord(spv_instruction_t* inst, uint32_t value) { + inst->words.push_back(value); +} #endif // LIBSPIRV_INSTRUCTION_H_ |