Use quotation for libspirv.h and sort headers.

This commit is contained in:
Lei Zhang 2015-11-11 12:45:23 -05:00 committed by David Neto
parent 7a222e4abf
commit 923f6c13fc
21 changed files with 51 additions and 44 deletions

View File

@ -27,7 +27,7 @@
#ifndef LIBSPIRV_ASSEMBLY_GRAMMAR_H_
#define LIBSPIRV_ASSEMBLY_GRAMMAR_H_
#include <libspirv/libspirv.h>
#include "libspirv/libspirv.h"
#include "operand.h"
#include "table.h"

View File

@ -31,11 +31,11 @@
#include <limits>
#include <unordered_map>
#include <libspirv/libspirv.h>
#include "assembly_grammar.h"
#include "diagnostic.h"
#include "endian.h"
#include "ext_inst.h"
#include "libspirv/libspirv.h"
#include "opcode.h"
#include "operand.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 <libspirv/libspirv.h>
#include "diagnostic.h"
#include <assert.h>
@ -32,6 +31,8 @@
#include <iostream>
#include "libspirv/libspirv.h"
// Diagnostic API
spv_diagnostic spvDiagnosticCreate(const spv_position position,

View File

@ -27,12 +27,12 @@
#ifndef LIBSPIRV_DIAGNOSTIC_H_
#define LIBSPIRV_DIAGNOSTIC_H_
#include <libspirv/libspirv.h>
#include <iostream>
#include <sstream>
#include <utility>
#include "libspirv/libspirv.h"
class diagnostic_helper {
public:
diagnostic_helper(spv_position_t& position, spv_diagnostic* pDiagnostic)

View File

@ -27,7 +27,7 @@
#ifndef LIBSPIRV_ENDIAN_H_
#define LIBSPIRV_ENDIAN_H_
#include <libspirv/libspirv.h>
#include "libspirv/libspirv.h"
/// @brief Fix the endianness of a word
///

View File

@ -27,7 +27,7 @@
#ifndef LIBSPIRV_EXT_INST_H_
#define LIBSPIRV_EXT_INST_H_
#include <libspirv/libspirv.h>
#include "libspirv/libspirv.h"
#include "table.h"
/// @brief Get the type from the extended instruction library string

View File

@ -32,6 +32,8 @@
#include <headers/spirv.h>
#include "table.h"
// Describes an instruction.
struct spv_instruction_t {
// Normally, both opcode and extInstType contain valid data.

View File

@ -24,14 +24,15 @@
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
#include <libspirv/libspirv.h>
#include "endian.h"
#include "instruction.h"
#include "opcode.h"
#include <assert.h>
#include <string.h>
#include "endian.h"
#include "instruction.h"
#include "libspirv/libspirv.h"
namespace {
// Descriptions of each opcode. Each entry describes the format of the

View File

@ -28,7 +28,7 @@
#define LIBSPIRV_OPCODE_H_
#include "instruction.h"
#include <libspirv/libspirv.h>
#include "libspirv/libspirv.h"
#include "table.h"
// Functions

View File

@ -29,7 +29,7 @@
#include <deque>
#include <libspirv/libspirv.h>
#include "libspirv/libspirv.h"
#include "table.h"
/// @brief A sequence of operand types.

View File

@ -27,7 +27,7 @@
#ifndef LIBSPIRV_TABLE_H_
#define LIBSPIRV_TABLE_H_
#include <libspirv/libspirv.h>
#include "libspirv/libspirv.h"
typedef struct spv_opcode_desc_t {
const char* name;

View File

@ -38,12 +38,12 @@
#include <unordered_map>
#include <vector>
#include <libspirv/libspirv.h>
#include "assembly_grammar.h"
#include "binary.h"
#include "diagnostic.h"
#include "ext_inst.h"
#include "instruction.h"
#include "libspirv/libspirv.h"
#include "opcode.h"
#include "operand.h"
#include "table.h"

View File

@ -27,11 +27,11 @@
#ifndef LIBSPIRV_TEXT_H_
#define LIBSPIRV_TEXT_H_
#include <libspirv/libspirv.h>
#include "operand.h"
#include <string>
#include "libspirv/libspirv.h"
#include "operand.h"
// Structures
typedef enum spv_literal_type_t {

View File

@ -32,9 +32,9 @@
#include <type_traits>
#include <unordered_map>
#include <libspirv/libspirv.h>
#include "diagnostic.h"
#include "instruction.h"
#include "libspirv/libspirv.h"
#include "text.h"
namespace libspirv {

View File

@ -24,13 +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 <libspirv/libspirv.h>
#include "binary.h"
#include "diagnostic.h"
#include "endian.h"
#include "instruction.h"
#include "opcode.h"
#include "operand.h"
#include "validate.h"
#include <assert.h>
@ -39,6 +32,14 @@
#include <vector>
#include "binary.h"
#include "diagnostic.h"
#include "endian.h"
#include "instruction.h"
#include "libspirv/libspirv.h"
#include "opcode.h"
#include "operand.h"
#define spvCheckReturn(expression) \
if (spv_result_t error = (expression)) return error;

View File

@ -28,7 +28,7 @@
#define LIBSPIRV_VALIDATE_H_
#include "instruction.h"
#include <libspirv/libspirv.h>
#include "libspirv/libspirv.h"
#include "table.h"
// Structures

View File

@ -24,18 +24,18 @@
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
#include <libspirv/libspirv.h>
#include "diagnostic.h"
#include "instruction.h"
#include "opcode.h"
#include "validate.h"
#include <assert.h>
#include <iostream>
#include <unordered_map>
#include <vector>
#include "diagnostic.h"
#include "instruction.h"
#include "libspirv/libspirv.h"
#include "opcode.h"
#include "validate.h"
#define spvCheck(condition, action) \
if (condition) { \
action; \

View File

@ -27,7 +27,11 @@
#ifndef LIBSPIRV_TEST_UNITSPIRV_H_
#define LIBSPIRV_TEST_UNITSPIRV_H_
#include <libspirv/libspirv.h>
#include <stdint.h>
#include <iomanip>
#include "libspirv/libspirv.h"
#include "../source/assembly_grammar.h"
#include "../source/binary.h"
#include "../source/diagnostic.h"
@ -37,7 +41,7 @@
#include "../source/text_handler.h"
#include "../source/validate.h"
#include <iomanip>
#include <gtest/gtest.h>
#ifdef __ANDROID__
#include <sstream>
@ -51,10 +55,6 @@ std::string to_string(const T& val) {
}
#endif
#include <gtest/gtest.h>
#include <stdint.h>
// Determine endianness & predicate tests on it
enum {
I32_ENDIAN_LITTLE = 0x03020100ul,

View File

@ -24,11 +24,12 @@
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
#include <libspirv/libspirv.h>
#include <stdio.h>
#include <vector>
#include "libspirv/libspirv.h"
void print_usage(char* argv0) {
printf(
"Assemble a *.svasm file into a *.sv binary.\n\n"

View File

@ -24,11 +24,12 @@
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
#include <libspirv/libspirv.h>
#include <stdio.h>
#include <vector>
#include "libspirv/libspirv.h"
void print_usage(char* argv0) {
printf(
"Dissassemble a *.sv file into a *.svasm text file.\n\n"

View File

@ -24,14 +24,14 @@
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
#include <libspirv/libspirv.h>
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include "libspirv/libspirv.h"
void print_usage(char* argv0) {
printf(
"Validate a SPIR-V binary file.\n\n"