Browse Source

Includes reordering, GCC conversion warnings enabled

Includes order as described in Coding Standards of cpp-ethereum project.
GCC warnings about lossy conversions enabled.
cl-refactor
Paweł Bylica 10 years ago
parent
commit
93cb4866fd
  1. 2
      CMakeLists.txt
  2. 9
      libevmjit/Arith256.cpp
  3. 1
      libevmjit/Arith256.h
  4. 5
      libevmjit/BasicBlock.cpp
  5. 4
      libevmjit/BasicBlock.h
  6. 7
      libevmjit/Cache.cpp
  7. 4
      libevmjit/Cache.h
  8. 1
      libevmjit/Common.h
  9. 29
      libevmjit/Compiler.cpp
  10. 1
      libevmjit/Compiler.h
  11. 6
      libevmjit/CompilerHelper.cpp
  12. 3
      libevmjit/Endianness.cpp
  13. 1
      libevmjit/ExecStats.cpp
  14. 4
      libevmjit/ExecStats.h
  15. 17
      libevmjit/ExecutionEngine.cpp
  16. 4
      libevmjit/ExecutionEngine.h
  17. 9
      libevmjit/Ext.cpp
  18. 4
      libevmjit/Ext.h
  19. 4
      libevmjit/GasMeter.cpp
  20. 1
      libevmjit/GasMeter.h
  21. 1
      libevmjit/Instruction.h
  22. 9
      libevmjit/Memory.cpp
  23. 1
      libevmjit/Memory.h
  24. 1
      libevmjit/Runtime.cpp
  25. 1
      libevmjit/Runtime.h
  26. 1
      libevmjit/RuntimeData.h
  27. 1
      libevmjit/RuntimeManager.h
  28. 7
      libevmjit/Stack.cpp
  29. 1
      libevmjit/Stack.h
  30. 3
      libevmjit/Type.h
  31. 4
      libevmjit/preprocessor/llvm_includes_end.h
  32. 5
      libevmjit/preprocessor/llvm_includes_start.h

2
CMakeLists.txt

@ -7,7 +7,7 @@ set(CMAKE_AUTOMOC OFF)
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC") if(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
else() else()
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra") set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wextra -Wconversion")
endif() endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")

9
libevmjit/Arith256.cpp

@ -1,13 +1,14 @@
#include "Arith256.h" #include "Arith256.h"
#include "Type.h"
#include "Endianness.h" #include <iostream>
#include <iomanip>
#include "preprocessor/llvm_includes_start.h" #include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/IntrinsicInst.h> #include <llvm/IR/IntrinsicInst.h>
#include "preprocessor/llvm_includes_end.h" #include "preprocessor/llvm_includes_end.h"
#include <iostream> #include "Type.h"
#include <iomanip> #include "Endianness.h"
namespace dev namespace dev
{ {

1
libevmjit/Arith256.h

@ -1,4 +1,5 @@
#pragma once #pragma once
#include "CompilerHelper.h" #include "CompilerHelper.h"
namespace dev namespace dev

5
libevmjit/BasicBlock.cpp

@ -1,5 +1,6 @@
#include "BasicBlock.h" #include "BasicBlock.h"
#include "Type.h"
#include <iostream>
#include "preprocessor/llvm_includes_start.h" #include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/CFG.h> #include <llvm/IR/CFG.h>
@ -9,7 +10,7 @@
#include <llvm/Support/raw_os_ostream.h> #include <llvm/Support/raw_os_ostream.h>
#include "preprocessor/llvm_includes_end.h" #include "preprocessor/llvm_includes_end.h"
#include <iostream> #include "Type.h"
namespace dev namespace dev
{ {

4
libevmjit/BasicBlock.h

@ -1,7 +1,9 @@
#pragma once #pragma once
#include <vector>
#include "Common.h" #include "Common.h"
#include "Stack.h" #include "Stack.h"
#include <vector>
namespace dev namespace dev
{ {

7
libevmjit/Cache.cpp

@ -1,5 +1,7 @@
#include "Cache.h" #include "Cache.h"
#include "ExecutionEngine.h"
#include <iostream>
#include <cassert>
#include "preprocessor/llvm_includes_start.h" #include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/Module.h> #include <llvm/IR/Module.h>
@ -10,8 +12,7 @@
#include <llvm/Support/raw_os_ostream.h> #include <llvm/Support/raw_os_ostream.h>
#include "preprocessor/llvm_includes_end.h" #include "preprocessor/llvm_includes_end.h"
#include <cassert> #include "ExecutionEngine.h"
#include <iostream>
namespace dev namespace dev
{ {

4
libevmjit/Cache.h

@ -1,7 +1,9 @@
#pragma once #pragma once
#include <llvm/ExecutionEngine/ObjectCache.h>
#include <memory> #include <memory>
#include <llvm/ExecutionEngine/ObjectCache.h>
namespace dev namespace dev
{ {
namespace eth namespace eth

1
libevmjit/Common.h

@ -1,4 +1,5 @@
#pragma once #pragma once
#include <vector> #include <vector>
#include <tuple> #include <tuple>
#include <cstdint> #include <cstdint>

29
libevmjit/Compiler.cpp

@ -1,14 +1,9 @@
#include "Compiler.h" #include "Compiler.h"
#include "Instruction.h"
#include "Type.h" #include <functional>
#include "Memory.h" #include <fstream>
#include "Stack.h" #include <chrono>
#include "Ext.h" #include <sstream>
#include "GasMeter.h"
#include "Utils.h"
#include "Endianness.h"
#include "Arith256.h"
#include "RuntimeManager.h"
#include "preprocessor/llvm_includes_start.h" #include "preprocessor/llvm_includes_start.h"
#include <llvm/ADT/PostOrderIterator.h> #include <llvm/ADT/PostOrderIterator.h>
@ -20,10 +15,16 @@
#include <llvm/Transforms/Scalar.h> #include <llvm/Transforms/Scalar.h>
#include "preprocessor/llvm_includes_end.h" #include "preprocessor/llvm_includes_end.h"
#include <functional> #include "Instruction.h"
#include <fstream> #include "Type.h"
#include <chrono> #include "Memory.h"
#include <sstream> #include "Stack.h"
#include "Ext.h"
#include "GasMeter.h"
#include "Utils.h"
#include "Endianness.h"
#include "Arith256.h"
#include "RuntimeManager.h"
namespace dev namespace dev
{ {

1
libevmjit/Compiler.h

@ -1,4 +1,5 @@
#pragma once #pragma once
#include "Common.h" #include "Common.h"
#include "BasicBlock.h" #include "BasicBlock.h"

6
libevmjit/CompilerHelper.cpp

@ -1,6 +1,10 @@
#include "CompilerHelper.h" #include "CompilerHelper.h"
#include "RuntimeManager.h"
#include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/Module.h> #include <llvm/IR/Module.h>
#include "preprocessor/llvm_includes_end.h"
#include "RuntimeManager.h"
namespace dev namespace dev
{ {

3
libevmjit/Endianness.cpp

@ -1,10 +1,11 @@
#include "Endianness.h" #include "Endianness.h"
#include "Type.h"
#include "preprocessor/llvm_includes_start.h" #include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/IntrinsicInst.h> #include <llvm/IR/IntrinsicInst.h>
#include "preprocessor/llvm_includes_end.h" #include "preprocessor/llvm_includes_end.h"
#include "Type.h"
namespace dev namespace dev
{ {
namespace eth namespace eth

1
libevmjit/ExecStats.cpp

@ -1,4 +1,5 @@
#include "ExecStats.h" #include "ExecStats.h"
#include <iostream> #include <iostream>
#include <iomanip> #include <iomanip>
#include <cassert> #include <cassert>

4
libevmjit/ExecStats.h

@ -1,7 +1,9 @@
#pragma once #pragma once
#include "ExecutionEngine.h"
#include <chrono> #include <chrono>
#include "ExecutionEngine.h"
namespace dev namespace dev
{ {
namespace eth namespace eth

17
libevmjit/ExecutionEngine.cpp

@ -1,9 +1,8 @@
#include "ExecutionEngine.h" #include "ExecutionEngine.h"
#include "Runtime.h"
#include "Compiler.h" #include <array>
#include "Cache.h" #include <cstdlib> // env options
#include "ExecStats.h" #include <iostream>
#include "BuildInfo.gen.h"
#include "preprocessor/llvm_includes_start.h" #include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/Module.h> #include <llvm/IR/Module.h>
@ -15,9 +14,11 @@
#include <llvm/Support/Host.h> #include <llvm/Support/Host.h>
#include "preprocessor/llvm_includes_end.h" #include "preprocessor/llvm_includes_end.h"
#include <array> #include "Runtime.h"
#include <cstdlib> // env options #include "Compiler.h"
#include <iostream> #include "Cache.h"
#include "ExecStats.h"
#include "BuildInfo.gen.h"
namespace dev namespace dev
{ {

4
libevmjit/ExecutionEngine.h

@ -1,7 +1,9 @@
#pragma once #pragma once
#include "RuntimeData.h"
#include <memory> #include <memory>
#include "RuntimeData.h"
namespace dev namespace dev
{ {
namespace eth namespace eth

9
libevmjit/Ext.cpp

@ -1,13 +1,14 @@
#include "Ext.h" #include "Ext.h"
#include "RuntimeManager.h"
#include "Memory.h"
#include "Type.h"
#include "Endianness.h"
#include "preprocessor/llvm_includes_start.h" #include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/IntrinsicInst.h> #include <llvm/IR/IntrinsicInst.h>
#include "preprocessor/llvm_includes_end.h" #include "preprocessor/llvm_includes_end.h"
#include "RuntimeManager.h"
#include "Memory.h"
#include "Type.h"
#include "Endianness.h"
namespace dev namespace dev
{ {
namespace eth namespace eth

4
libevmjit/Ext.h

@ -1,7 +1,9 @@
#pragma once #pragma once
#include "CompilerHelper.h"
#include <array> #include <array>
#include "CompilerHelper.h"
namespace dev namespace dev
{ {
namespace eth namespace eth

4
libevmjit/GasMeter.cpp

@ -1,11 +1,11 @@
#include "GasMeter.h" #include "GasMeter.h"
#include "Ext.h"
#include "RuntimeManager.h"
#include "preprocessor/llvm_includes_start.h" #include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/IntrinsicInst.h> #include <llvm/IR/IntrinsicInst.h>
#include "preprocessor/llvm_includes_end.h" #include "preprocessor/llvm_includes_end.h"
#include "Ext.h"
#include "RuntimeManager.h"
namespace dev namespace dev
{ {

1
libevmjit/GasMeter.h

@ -1,4 +1,5 @@
#pragma once #pragma once
#include "CompilerHelper.h" #include "CompilerHelper.h"
#include "Instruction.h" #include "Instruction.h"

1
libevmjit/Instruction.h

@ -1,4 +1,5 @@
#pragma once #pragma once
#include "Common.h" #include "Common.h"
namespace llvm namespace llvm

9
libevmjit/Memory.cpp

@ -1,14 +1,15 @@
#include "Memory.h" #include "Memory.h"
#include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/IntrinsicInst.h>
#include "preprocessor/llvm_includes_end.h"
#include "Type.h" #include "Type.h"
#include "Runtime.h" #include "Runtime.h"
#include "GasMeter.h" #include "GasMeter.h"
#include "Endianness.h" #include "Endianness.h"
#include "RuntimeManager.h" #include "RuntimeManager.h"
#include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/IntrinsicInst.h>
#include "preprocessor/llvm_includes_end.h"
namespace dev namespace dev
{ {
namespace eth namespace eth

1
libevmjit/Memory.h

@ -1,4 +1,5 @@
#pragma once #pragma once
#include "CompilerHelper.h" #include "CompilerHelper.h"
namespace dev namespace dev

1
libevmjit/Runtime.cpp

@ -1,4 +1,5 @@
#include "Runtime.h" #include "Runtime.h"
#include <cassert> #include <cassert>
namespace dev namespace dev

1
libevmjit/Runtime.h

@ -1,4 +1,5 @@
#pragma once #pragma once
#include "RuntimeData.h" #include "RuntimeData.h"
namespace dev namespace dev

1
libevmjit/RuntimeData.h

@ -1,4 +1,5 @@
#pragma once #pragma once
#include "Common.h" #include "Common.h"
namespace dev namespace dev

1
libevmjit/RuntimeManager.h

@ -1,4 +1,5 @@
#pragma once #pragma once
#include "CompilerHelper.h" #include "CompilerHelper.h"
#include "Type.h" #include "Type.h"
#include "RuntimeData.h" #include "RuntimeData.h"

7
libevmjit/Stack.cpp

@ -1,8 +1,11 @@
#include "Stack.h" #include "Stack.h"
#include "RuntimeManager.h"
#include "Runtime.h"
#include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/Function.h> #include <llvm/IR/Function.h>
#include "preprocessor/llvm_includes_end.h"
#include "RuntimeManager.h"
#include "Runtime.h"
namespace dev namespace dev
{ {

1
libevmjit/Stack.h

@ -1,4 +1,5 @@
#pragma once #pragma once
#include "CompilerHelper.h" #include "CompilerHelper.h"
namespace dev namespace dev

3
libevmjit/Type.h

@ -1,11 +1,12 @@
#pragma once #pragma once
#include "Common.h"
#include "preprocessor/llvm_includes_start.h" #include "preprocessor/llvm_includes_start.h"
#include <llvm/IR/Type.h> #include <llvm/IR/Type.h>
#include <llvm/IR/Constants.h> #include <llvm/IR/Constants.h>
#include "preprocessor/llvm_includes_end.h" #include "preprocessor/llvm_includes_end.h"
#include "Common.h"
namespace dev namespace dev
{ {
namespace eth namespace eth

4
libevmjit/preprocessor/llvm_includes_end.h

@ -1,3 +1,5 @@
#if defined(_MSC_VER)
#pragma warning(pop) #pragma warning(pop)
#else
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif

5
libevmjit/preprocessor/llvm_includes_start.h

@ -1,5 +1,8 @@
#if defined(_MSC_VER)
#pragma warning(push) #pragma warning(push)
#pragma warning(disable: 4267 4244 4800) #pragma warning(disable: 4267 4244 4800)
#else
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wconversion"
#endif

Loading…
Cancel
Save