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
This commit is contained in:
David Neto 2016-10-27 22:47:20 -04:00
Родитель b371439d6f
Коммит bf190ec839
3 изменённых файлов: 3 добавлений и 22 удалений

Просмотреть файл

@ -142,7 +142,6 @@ set(SPIRV_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/diagnostic.cpp ${CMAKE_CURRENT_SOURCE_DIR}/diagnostic.cpp
${CMAKE_CURRENT_SOURCE_DIR}/disassemble.cpp ${CMAKE_CURRENT_SOURCE_DIR}/disassemble.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ext_inst.cpp ${CMAKE_CURRENT_SOURCE_DIR}/ext_inst.cpp
${CMAKE_CURRENT_SOURCE_DIR}/instruction.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libspirv.cpp ${CMAKE_CURRENT_SOURCE_DIR}/libspirv.cpp
${CMAKE_CURRENT_SOURCE_DIR}/message.cpp ${CMAKE_CURRENT_SOURCE_DIR}/message.cpp
${CMAKE_CURRENT_SOURCE_DIR}/name_mapper.cpp ${CMAKE_CURRENT_SOURCE_DIR}/name_mapper.cpp

Просмотреть файл

@ -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);
}

Просмотреть файл

@ -42,6 +42,8 @@ struct spv_instruction_t {
}; };
// Appends a word to an instruction, without checking for overflow. // 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_ #endif // LIBSPIRV_INSTRUCTION_H_