diff --git a/libclambcc/CMakeLists.txt b/libclambcc/CMakeLists.txt index 88ea7ce2c8..def262f64c 100644 --- a/libclambcc/CMakeLists.txt +++ b/libclambcc/CMakeLists.txt @@ -1,6 +1,8 @@ # Copyright (C) 2021 Cisco Systems, Inc. and/or its affiliates. All rights reserved. +set (CLAMBC_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + add_subdirectory(ClamBCLogicalCompiler) add_subdirectory(ClamBCLogicalCompilerHelper) #add_subdirectory(ClamBCRemoveUndefs) diff --git a/libclambcc/ClamBCAnalyzer/CMakeLists.txt b/libclambcc/ClamBCAnalyzer/CMakeLists.txt index b060f69754..e5692d8e73 100644 --- a/libclambcc/ClamBCAnalyzer/CMakeLists.txt +++ b/libclambcc/ClamBCAnalyzer/CMakeLists.txt @@ -11,9 +11,9 @@ target_sources(clambcanalyzer_obj target_include_directories(clambcanalyzer_obj PRIVATE - ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCAnalyzer/ClamBCAnalyzer.cpp b/libclambcc/ClamBCAnalyzer/ClamBCAnalyzer.cpp index 30d3d46f5c..90d2e03ad5 100644 --- a/libclambcc/ClamBCAnalyzer/ClamBCAnalyzer.cpp +++ b/libclambcc/ClamBCAnalyzer/ClamBCAnalyzer.cpp @@ -20,8 +20,9 @@ * MA 02110-1301, USA. */ #include "ClamBCAnalyzer.h" -#include "Common/ClamBCCommon.h" -#include "Common/ClamBCUtilities.h" + +#include "ClamBCCommon.h" +#include "ClamBCUtilities.h" #include #include diff --git a/libclambcc/ClamBCAnalyzer/ClamBCAnalyzer.h b/libclambcc/ClamBCAnalyzer/ClamBCAnalyzer.h index 2b3aad21c3..ca33380c96 100644 --- a/libclambcc/ClamBCAnalyzer/ClamBCAnalyzer.h +++ b/libclambcc/ClamBCAnalyzer/ClamBCAnalyzer.h @@ -22,7 +22,7 @@ #ifndef CLAMBC_ANALYZER_H_ #define CLAMBC_ANALYZER_H_ -#include "Common/clambc.h" +#include "clambc.h" #include #include diff --git a/libclambcc/ClamBCChangeMallocArgSize/CMakeLists.txt b/libclambcc/ClamBCChangeMallocArgSize/CMakeLists.txt index db24c8f009..354336d8c3 100644 --- a/libclambcc/ClamBCChangeMallocArgSize/CMakeLists.txt +++ b/libclambcc/ClamBCChangeMallocArgSize/CMakeLists.txt @@ -12,8 +12,8 @@ target_sources(clambcchangemallocargsize_obj target_include_directories(clambcchangemallocargsize_obj PRIVATE ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCChangeMallocArgSize/ClamBCChangeMallocArgSize.cpp b/libclambcc/ClamBCChangeMallocArgSize/ClamBCChangeMallocArgSize.cpp index fd812e8941..c6b003eff0 100644 --- a/libclambcc/ClamBCChangeMallocArgSize/ClamBCChangeMallocArgSize.cpp +++ b/libclambcc/ClamBCChangeMallocArgSize/ClamBCChangeMallocArgSize.cpp @@ -1,3 +1,4 @@ +#include "clambc.h" #include #include @@ -11,7 +12,6 @@ #include #include -#include "Common/clambc.h" using namespace llvm; diff --git a/libclambcc/ClamBCConvertIntrinsicsTo32Bit/CMakeLists.txt b/libclambcc/ClamBCConvertIntrinsicsTo32Bit/CMakeLists.txt index 46bcb21f6d..8972bc30bc 100644 --- a/libclambcc/ClamBCConvertIntrinsicsTo32Bit/CMakeLists.txt +++ b/libclambcc/ClamBCConvertIntrinsicsTo32Bit/CMakeLists.txt @@ -12,8 +12,8 @@ target_sources(clambcconvertintrinsicsto32bit_obj target_include_directories(clambcconvertintrinsicsto32bit_obj PRIVATE ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCConvertIntrinsicsTo32Bit/ClamBCConvertIntrinsicsTo32Bit.cpp b/libclambcc/ClamBCConvertIntrinsicsTo32Bit/ClamBCConvertIntrinsicsTo32Bit.cpp index c033a98dac..b310d1357d 100644 --- a/libclambcc/ClamBCConvertIntrinsicsTo32Bit/ClamBCConvertIntrinsicsTo32Bit.cpp +++ b/libclambcc/ClamBCConvertIntrinsicsTo32Bit/ClamBCConvertIntrinsicsTo32Bit.cpp @@ -1,3 +1,4 @@ +#include "clambc.h" #include #include @@ -14,7 +15,6 @@ #include #include -#include "Common/clambc.h" #include diff --git a/libclambcc/ClamBCExtendPHIsTo64Bit/CMakeLists.txt b/libclambcc/ClamBCExtendPHIsTo64Bit/CMakeLists.txt index 8d1b1a9e43..01084a3fcc 100644 --- a/libclambcc/ClamBCExtendPHIsTo64Bit/CMakeLists.txt +++ b/libclambcc/ClamBCExtendPHIsTo64Bit/CMakeLists.txt @@ -12,8 +12,8 @@ target_sources(clambcextendphisto64bit_obj target_include_directories(clambcextendphisto64bit_obj PRIVATE ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCExtendPHIsTo64Bit/ClamBCExtendPHIsTo64Bit.cpp b/libclambcc/ClamBCExtendPHIsTo64Bit/ClamBCExtendPHIsTo64Bit.cpp index 02c55cea4a..614d30e16c 100644 --- a/libclambcc/ClamBCExtendPHIsTo64Bit/ClamBCExtendPHIsTo64Bit.cpp +++ b/libclambcc/ClamBCExtendPHIsTo64Bit/ClamBCExtendPHIsTo64Bit.cpp @@ -19,9 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ -#include "Common/bytecode_api.h" -#include "Common/clambc.h" -#include "Common/ClamBCUtilities.h" +#include "bytecode_api.h" +#include "clambc.h" +#include "ClamBCUtilities.h" #include #include diff --git a/libclambcc/ClamBCLogicalCompiler/CMakeLists.txt b/libclambcc/ClamBCLogicalCompiler/CMakeLists.txt index 07c3262da8..391b8a6a4f 100644 --- a/libclambcc/ClamBCLogicalCompiler/CMakeLists.txt +++ b/libclambcc/ClamBCLogicalCompiler/CMakeLists.txt @@ -12,8 +12,8 @@ target_sources(clambclogicalcompiler_obj target_include_directories(clambclogicalcompiler_obj PRIVATE ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCLogicalCompiler/ClamBCLogicalCompiler.cpp b/libclambcc/ClamBCLogicalCompiler/ClamBCLogicalCompiler.cpp index 9dc437203e..83e48453fd 100644 --- a/libclambcc/ClamBCLogicalCompiler/ClamBCLogicalCompiler.cpp +++ b/libclambcc/ClamBCLogicalCompiler/ClamBCLogicalCompiler.cpp @@ -20,11 +20,11 @@ * MA 02110-1301, USA. */ -#include "Common/clambc.h" -#include "Common/bytecode_api.h" -#include "Common/ClamBCDiagnostics.h" -#include "Common/ClamBCCommon.h" -#include "Common/ClamBCUtilities.h" +#include "clambc.h" +#include "bytecode_api.h" +#include "ClamBCDiagnostics.h" +#include "ClamBCCommon.h" +#include "ClamBCUtilities.h" #include #include diff --git a/libclambcc/ClamBCLogicalCompilerHelper/CMakeLists.txt b/libclambcc/ClamBCLogicalCompilerHelper/CMakeLists.txt index aec5d8b16c..0cc815c218 100644 --- a/libclambcc/ClamBCLogicalCompilerHelper/CMakeLists.txt +++ b/libclambcc/ClamBCLogicalCompilerHelper/CMakeLists.txt @@ -12,8 +12,8 @@ target_sources(clambclogicalcompilerhelper_obj target_include_directories(clambclogicalcompilerhelper_obj PRIVATE ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCLogicalCompilerHelper/ClamBCLogicalCompilerHelper.cpp b/libclambcc/ClamBCLogicalCompilerHelper/ClamBCLogicalCompilerHelper.cpp index 8aef2c086f..b2b43050ed 100644 --- a/libclambcc/ClamBCLogicalCompilerHelper/ClamBCLogicalCompilerHelper.cpp +++ b/libclambcc/ClamBCLogicalCompilerHelper/ClamBCLogicalCompilerHelper.cpp @@ -20,11 +20,11 @@ * MA 02110-1301, USA. */ -#include "Common/clambc.h" -#include "Common/bytecode_api.h" -#include "Common/ClamBCDiagnostics.h" -#include "Common/ClamBCCommon.h" -#include "Common/ClamBCUtilities.h" +#include "clambc.h" +#include "bytecode_api.h" +#include "ClamBCDiagnostics.h" +#include "ClamBCCommon.h" +#include "ClamBCUtilities.h" #include #include diff --git a/libclambcc/ClamBCLowering/CMakeLists.txt b/libclambcc/ClamBCLowering/CMakeLists.txt index 147427227a..d6d46c149b 100644 --- a/libclambcc/ClamBCLowering/CMakeLists.txt +++ b/libclambcc/ClamBCLowering/CMakeLists.txt @@ -13,8 +13,8 @@ target_sources(clambcloweringf_obj target_include_directories(clambcloweringf_obj PRIVATE ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) @@ -58,8 +58,8 @@ target_sources(clambcloweringnf_obj target_include_directories(clambcloweringnf_obj PRIVATE ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCLowering/ClamBCLowering.cpp b/libclambcc/ClamBCLowering/ClamBCLowering.cpp index 5346bc2730..da63d44f99 100644 --- a/libclambcc/ClamBCLowering/ClamBCLowering.cpp +++ b/libclambcc/ClamBCLowering/ClamBCLowering.cpp @@ -21,7 +21,7 @@ */ #include "ClamBCLowering.h" -#include "Common/clambc.h" +#include "clambc.h" #include #include diff --git a/libclambcc/ClamBCLowering/ClamBCLoweringF.cpp b/libclambcc/ClamBCLowering/ClamBCLoweringF.cpp index 4167e97cc8..b5de956aaf 100644 --- a/libclambcc/ClamBCLowering/ClamBCLoweringF.cpp +++ b/libclambcc/ClamBCLowering/ClamBCLoweringF.cpp @@ -22,7 +22,7 @@ #include "ClamBCLowering.h" -#include "Common/clambc.h" +#include "clambc.h" #include diff --git a/libclambcc/ClamBCLowering/ClamBCLoweringNF.cpp b/libclambcc/ClamBCLowering/ClamBCLoweringNF.cpp index 967108895f..8b26b3ff72 100644 --- a/libclambcc/ClamBCLowering/ClamBCLoweringNF.cpp +++ b/libclambcc/ClamBCLowering/ClamBCLoweringNF.cpp @@ -22,7 +22,7 @@ #include "ClamBCLowering.h" -#include "Common/clambc.h" +#include "clambc.h" #include diff --git a/libclambcc/ClamBCOutlineEndiannessCalls/CMakeLists.txt b/libclambcc/ClamBCOutlineEndiannessCalls/CMakeLists.txt index c923f22ca5..3fba904bca 100644 --- a/libclambcc/ClamBCOutlineEndiannessCalls/CMakeLists.txt +++ b/libclambcc/ClamBCOutlineEndiannessCalls/CMakeLists.txt @@ -12,8 +12,8 @@ target_sources(clambcoutlineendiannesscalls_obj target_include_directories(clambcoutlineendiannesscalls_obj PRIVATE ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCOutlineEndiannessCalls/ClamBCOutlineEndiannessCalls.cpp b/libclambcc/ClamBCOutlineEndiannessCalls/ClamBCOutlineEndiannessCalls.cpp index 34f6ba7294..b3449fe530 100644 --- a/libclambcc/ClamBCOutlineEndiannessCalls/ClamBCOutlineEndiannessCalls.cpp +++ b/libclambcc/ClamBCOutlineEndiannessCalls/ClamBCOutlineEndiannessCalls.cpp @@ -1,5 +1,5 @@ -#include "Common/clambc.h" +#include "clambc.h" #include #include diff --git a/libclambcc/ClamBCPrepareGEPsForWriter/CMakeLists.txt b/libclambcc/ClamBCPrepareGEPsForWriter/CMakeLists.txt index 4a7e476d25..ad914a0d63 100644 --- a/libclambcc/ClamBCPrepareGEPsForWriter/CMakeLists.txt +++ b/libclambcc/ClamBCPrepareGEPsForWriter/CMakeLists.txt @@ -11,9 +11,9 @@ target_sources(clambcpreparegepsforwriter_obj target_include_directories(clambcpreparegepsforwriter_obj PRIVATE - ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCPrepareGEPsForWriter/ClamBCPrepareGEPsForWriter.cpp b/libclambcc/ClamBCPrepareGEPsForWriter/ClamBCPrepareGEPsForWriter.cpp index 3452220868..948a2b7a82 100644 --- a/libclambcc/ClamBCPrepareGEPsForWriter/ClamBCPrepareGEPsForWriter.cpp +++ b/libclambcc/ClamBCPrepareGEPsForWriter/ClamBCPrepareGEPsForWriter.cpp @@ -19,11 +19,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ -#include "Common/bytecode_api.h" -#include "Common/clambc.h" -#include "Common/ClamBCModule.h" +#include "bytecode_api.h" +#include "clambc.h" +#include "ClamBCModule.h" +#include "ClamBCUtilities.h" + #include "ClamBCAnalyzer/ClamBCAnalyzer.h" -#include "Common/ClamBCUtilities.h" #include #include diff --git a/libclambcc/ClamBCPreserveABIs/CMakeLists.txt b/libclambcc/ClamBCPreserveABIs/CMakeLists.txt index b41affb10b..e9a928c480 100644 --- a/libclambcc/ClamBCPreserveABIs/CMakeLists.txt +++ b/libclambcc/ClamBCPreserveABIs/CMakeLists.txt @@ -12,8 +12,8 @@ target_sources(clambcpreserveabis_obj target_include_directories(clambcpreserveabis_obj PRIVATE ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCPreserveABIs/ClamBCPreserveABIs.cpp b/libclambcc/ClamBCPreserveABIs/ClamBCPreserveABIs.cpp index b87c6502ee..254a0997e3 100644 --- a/libclambcc/ClamBCPreserveABIs/ClamBCPreserveABIs.cpp +++ b/libclambcc/ClamBCPreserveABIs/ClamBCPreserveABIs.cpp @@ -1,4 +1,7 @@ +#include "clambc.h" +#include "ClamBCUtilities.h" + #include #include "llvm/IR/Module.h" #include "llvm/IR/Module.h" @@ -7,14 +10,10 @@ #include -//#include "llvm/IR/LegacyPassManager.h" #include #include #include -#include "Common/clambc.h" -#include "Common/ClamBCUtilities.h" - #include #include using namespace llvm; diff --git a/libclambcc/ClamBCRebuild/CMakeLists.txt b/libclambcc/ClamBCRebuild/CMakeLists.txt index 80db99e344..3020913e03 100644 --- a/libclambcc/ClamBCRebuild/CMakeLists.txt +++ b/libclambcc/ClamBCRebuild/CMakeLists.txt @@ -11,9 +11,9 @@ target_sources(clambcrebuild_obj target_include_directories(clambcrebuild_obj PRIVATE - ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCRebuild/ClamBCRebuild.cpp b/libclambcc/ClamBCRebuild/ClamBCRebuild.cpp index d8f41af04d..2b83c21c89 100644 --- a/libclambcc/ClamBCRebuild/ClamBCRebuild.cpp +++ b/libclambcc/ClamBCRebuild/ClamBCRebuild.cpp @@ -20,9 +20,9 @@ * MA 02110-1301, USA. */ -#include "Common/ClamBCModule.h" -#include "Common/clambc.h" -#include "Common/ClamBCUtilities.h" +#include "ClamBCModule.h" +#include "clambc.h" +#include "ClamBCUtilities.h" #include #include diff --git a/libclambcc/ClamBCRegAlloc/CMakeLists.txt b/libclambcc/ClamBCRegAlloc/CMakeLists.txt index 40a24c4abf..2fc8955153 100644 --- a/libclambcc/ClamBCRegAlloc/CMakeLists.txt +++ b/libclambcc/ClamBCRegAlloc/CMakeLists.txt @@ -12,8 +12,8 @@ target_sources(clambcregalloc_obj target_include_directories(clambcregalloc_obj PRIVATE ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCRegAlloc/ClamBCRegAlloc.cpp b/libclambcc/ClamBCRegAlloc/ClamBCRegAlloc.cpp index 856f0a048d..38ae1d076e 100644 --- a/libclambcc/ClamBCRegAlloc/ClamBCRegAlloc.cpp +++ b/libclambcc/ClamBCRegAlloc/ClamBCRegAlloc.cpp @@ -20,12 +20,10 @@ * MA 02110-1301, USA. */ #include "ClamBCRegAlloc.h" -#include "Common/ClamBCUtilities.h" -#include "Common/clambc.h" +#include "ClamBCUtilities.h" +#include "clambc.h" #include -//#include "llvm/Analysis/LiveValues.h" -//#include "llvm/Config/config.h" #include #include #include diff --git a/libclambcc/ClamBCRegAlloc/ClamBCRegAlloc.h b/libclambcc/ClamBCRegAlloc/ClamBCRegAlloc.h index 2abe975828..7777ce79bc 100644 --- a/libclambcc/ClamBCRegAlloc/ClamBCRegAlloc.h +++ b/libclambcc/ClamBCRegAlloc/ClamBCRegAlloc.h @@ -21,7 +21,9 @@ */ #ifndef CLAMBC_REGALLOC_H #define CLAMBC_REGALLOC_H -#include + +#include "clambc.h" + #include #include #include @@ -36,8 +38,7 @@ #include #include - -#include "Common/clambc.h" +#include class ClamBCRegAllocAnalysis { diff --git a/libclambcc/ClamBCRemoveFSHL/CMakeLists.txt b/libclambcc/ClamBCRemoveFSHL/CMakeLists.txt index ef42ff6bbc..80739edcf0 100644 --- a/libclambcc/ClamBCRemoveFSHL/CMakeLists.txt +++ b/libclambcc/ClamBCRemoveFSHL/CMakeLists.txt @@ -12,8 +12,8 @@ target_sources(clambcremovefshl_obj target_include_directories(clambcremovefshl_obj PRIVATE ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCRemoveFSHL/ClamBCRemoveFSHL.cpp b/libclambcc/ClamBCRemoveFSHL/ClamBCRemoveFSHL.cpp index afd0373bca..a6698fd34c 100644 --- a/libclambcc/ClamBCRemoveFSHL/ClamBCRemoveFSHL.cpp +++ b/libclambcc/ClamBCRemoveFSHL/ClamBCRemoveFSHL.cpp @@ -20,8 +20,8 @@ * MA 02110-1301, USA. */ -#include "Common/clambc.h" -#include "Common/ClamBCUtilities.h" +#include "clambc.h" +#include "ClamBCUtilities.h" #include #include diff --git a/libclambcc/ClamBCRemoveFreezeInsts/CMakeLists.txt b/libclambcc/ClamBCRemoveFreezeInsts/CMakeLists.txt index 22f5af655c..2148e721c5 100644 --- a/libclambcc/ClamBCRemoveFreezeInsts/CMakeLists.txt +++ b/libclambcc/ClamBCRemoveFreezeInsts/CMakeLists.txt @@ -12,8 +12,8 @@ target_sources(clambcremovefreezeinsts_obj target_include_directories(clambcremovefreezeinsts_obj PRIVATE ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCRemoveFreezeInsts/ClamBCRemoveFreezeInsts.cpp b/libclambcc/ClamBCRemoveFreezeInsts/ClamBCRemoveFreezeInsts.cpp index b7d5d9dc7c..1d3607570a 100644 --- a/libclambcc/ClamBCRemoveFreezeInsts/ClamBCRemoveFreezeInsts.cpp +++ b/libclambcc/ClamBCRemoveFreezeInsts/ClamBCRemoveFreezeInsts.cpp @@ -20,8 +20,8 @@ * MA 02110-1301, USA. */ -#include "Common/clambc.h" -#include "Common/ClamBCUtilities.h" +#include "clambc.h" +#include "ClamBCUtilities.h" #include #include diff --git a/libclambcc/ClamBCRemoveICMPSLE/CMakeLists.txt b/libclambcc/ClamBCRemoveICMPSLE/CMakeLists.txt index 9a7478755b..27a20ce288 100644 --- a/libclambcc/ClamBCRemoveICMPSLE/CMakeLists.txt +++ b/libclambcc/ClamBCRemoveICMPSLE/CMakeLists.txt @@ -12,8 +12,8 @@ target_sources(clambcremoveicmpsle_obj target_include_directories(clambcremoveicmpsle_obj PRIVATE ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCRemoveICMPSLE/ClamBCRemoveICMPSLE.cpp b/libclambcc/ClamBCRemoveICMPSLE/ClamBCRemoveICMPSLE.cpp index ae138afc5f..c6db611925 100644 --- a/libclambcc/ClamBCRemoveICMPSLE/ClamBCRemoveICMPSLE.cpp +++ b/libclambcc/ClamBCRemoveICMPSLE/ClamBCRemoveICMPSLE.cpp @@ -20,8 +20,7 @@ * MA 02110-1301, USA. */ -#include "Common/clambc.h" -//#include "Common/ClamBCUtilities.h" +#include "clambc.h" #include #include diff --git a/libclambcc/ClamBCRemovePointerPHIs/CMakeLists.txt b/libclambcc/ClamBCRemovePointerPHIs/CMakeLists.txt index 07f95309f1..74d9a9efd0 100644 --- a/libclambcc/ClamBCRemovePointerPHIs/CMakeLists.txt +++ b/libclambcc/ClamBCRemovePointerPHIs/CMakeLists.txt @@ -12,8 +12,8 @@ target_sources(clambcremovepointerphis_obj target_include_directories(clambcremovepointerphis_obj PRIVATE ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCRemovePointerPHIs/ClamBCRemovePointerPHIs.cpp b/libclambcc/ClamBCRemovePointerPHIs/ClamBCRemovePointerPHIs.cpp index 8a6c349bd7..26af45e0cf 100644 --- a/libclambcc/ClamBCRemovePointerPHIs/ClamBCRemovePointerPHIs.cpp +++ b/libclambcc/ClamBCRemovePointerPHIs/ClamBCRemovePointerPHIs.cpp @@ -1,4 +1,7 @@ -// +#include "clambc.h" +#include "ClamBCUtilities.h" +#include "ClamBCModule.h" + #include #include #include @@ -8,14 +11,10 @@ #include -//#include #include #include #include -#include "Common/clambc.h" -#include "Common/ClamBCUtilities.h" -#include "Common/ClamBCModule.h" using namespace llvm; #include diff --git a/libclambcc/ClamBCRemoveUSUB/CMakeLists.txt b/libclambcc/ClamBCRemoveUSUB/CMakeLists.txt index 1ded2e2832..f024437198 100644 --- a/libclambcc/ClamBCRemoveUSUB/CMakeLists.txt +++ b/libclambcc/ClamBCRemoveUSUB/CMakeLists.txt @@ -12,8 +12,8 @@ target_sources(clambcremoveusub_obj target_include_directories(clambcremoveusub_obj PRIVATE ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCRemoveUSUB/ClamBCRemoveUSUB.cpp b/libclambcc/ClamBCRemoveUSUB/ClamBCRemoveUSUB.cpp index eede390453..2888d5c2a4 100644 --- a/libclambcc/ClamBCRemoveUSUB/ClamBCRemoveUSUB.cpp +++ b/libclambcc/ClamBCRemoveUSUB/ClamBCRemoveUSUB.cpp @@ -20,8 +20,8 @@ * MA 02110-1301, USA. */ -#include "Common/clambc.h" -#include "Common/ClamBCUtilities.h" +#include "clambc.h" +#include "ClamBCUtilities.h" #include #include diff --git a/libclambcc/ClamBCRemoveUndefs/CMakeLists.txt b/libclambcc/ClamBCRemoveUndefs/CMakeLists.txt index 7234fc8a47..950a74e576 100644 --- a/libclambcc/ClamBCRemoveUndefs/CMakeLists.txt +++ b/libclambcc/ClamBCRemoveUndefs/CMakeLists.txt @@ -12,8 +12,8 @@ target_sources(clambcremoveundefs_obj target_include_directories(clambcremoveundefs_obj PRIVATE ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCRemoveUndefs/ClamBCRemoveUndefs.cpp b/libclambcc/ClamBCRemoveUndefs/ClamBCRemoveUndefs.cpp index c52c5fee1f..5f5ed29502 100644 --- a/libclambcc/ClamBCRemoveUndefs/ClamBCRemoveUndefs.cpp +++ b/libclambcc/ClamBCRemoveUndefs/ClamBCRemoveUndefs.cpp @@ -1,4 +1,7 @@ +#include "clambc.h" +#include "ClamBCUtilities.h" + #include #include #include @@ -9,11 +12,8 @@ #include -//#include #include -#include "Common/clambc.h" -#include "Common/ClamBCUtilities.h" using namespace llvm; /* THIS APPEARS TO NO LONGER BE NEEDED. LEAVING IN PLACE DURING THE RC PHASE, JUST IN CASE. */ diff --git a/libclambcc/ClamBCRemoveUnsupportedICMPIntrinsics/CMakeLists.txt b/libclambcc/ClamBCRemoveUnsupportedICMPIntrinsics/CMakeLists.txt index 1a8f0674c8..7a03f1b74e 100644 --- a/libclambcc/ClamBCRemoveUnsupportedICMPIntrinsics/CMakeLists.txt +++ b/libclambcc/ClamBCRemoveUnsupportedICMPIntrinsics/CMakeLists.txt @@ -12,8 +12,8 @@ target_sources(clambcremoveunsupportedicmpintrinsics_obj target_include_directories(clambcremoveunsupportedicmpintrinsics_obj PRIVATE ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCRemoveUnsupportedICMPIntrinsics/ClamBCRemoveUnsupportedICMPIntrinsics.cpp b/libclambcc/ClamBCRemoveUnsupportedICMPIntrinsics/ClamBCRemoveUnsupportedICMPIntrinsics.cpp index ea73681d24..9a7ae73374 100644 --- a/libclambcc/ClamBCRemoveUnsupportedICMPIntrinsics/ClamBCRemoveUnsupportedICMPIntrinsics.cpp +++ b/libclambcc/ClamBCRemoveUnsupportedICMPIntrinsics/ClamBCRemoveUnsupportedICMPIntrinsics.cpp @@ -20,8 +20,8 @@ * MA 02110-1301, USA. */ -#include "Common/clambc.h" -#include "Common/ClamBCUtilities.h" +#include "clambc.h" +#include "ClamBCUtilities.h" #include #include diff --git a/libclambcc/ClamBCTrace/CMakeLists.txt b/libclambcc/ClamBCTrace/CMakeLists.txt index 5f58317e18..d209e73666 100644 --- a/libclambcc/ClamBCTrace/CMakeLists.txt +++ b/libclambcc/ClamBCTrace/CMakeLists.txt @@ -12,8 +12,8 @@ target_sources(clambctrace_obj target_include_directories(clambctrace_obj PRIVATE ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCTrace/ClamBCTrace.cpp b/libclambcc/ClamBCTrace/ClamBCTrace.cpp index 734e1cc69c..0b55884c68 100644 --- a/libclambcc/ClamBCTrace/ClamBCTrace.cpp +++ b/libclambcc/ClamBCTrace/ClamBCTrace.cpp @@ -19,9 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ -#include "Common/clambc.h" -#include "Common/ClamBCCommon.h" -#include "Common/ClamBCUtilities.h" +#include "clambc.h" +#include "ClamBCCommon.h" +#include "ClamBCUtilities.h" #include #include diff --git a/libclambcc/ClamBCVerifier/CMakeLists.txt b/libclambcc/ClamBCVerifier/CMakeLists.txt index 480e34f436..ca3bf30ec8 100644 --- a/libclambcc/ClamBCVerifier/CMakeLists.txt +++ b/libclambcc/ClamBCVerifier/CMakeLists.txt @@ -12,8 +12,8 @@ target_sources(clambcverifier_obj target_include_directories(clambcverifier_obj PRIVATE ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCVerifier/ClamBCVerifier.cpp b/libclambcc/ClamBCVerifier/ClamBCVerifier.cpp index 540737b1db..f4e6f3a9fb 100644 --- a/libclambcc/ClamBCVerifier/ClamBCVerifier.cpp +++ b/libclambcc/ClamBCVerifier/ClamBCVerifier.cpp @@ -41,9 +41,9 @@ * } */ -#include "Common/ClamBCDiagnostics.h" -#include "Common/clambc.h" -#include "Common/ClamBCUtilities.h" +#include "ClamBCDiagnostics.h" +#include "clambc.h" +#include "ClamBCUtilities.h" #include #include diff --git a/libclambcc/ClamBCWriter/CMakeLists.txt b/libclambcc/ClamBCWriter/CMakeLists.txt index dd5260f4d0..a3d1fc3b65 100644 --- a/libclambcc/ClamBCWriter/CMakeLists.txt +++ b/libclambcc/ClamBCWriter/CMakeLists.txt @@ -12,8 +12,8 @@ target_sources(clambcwriter_obj target_include_directories(clambcwriter_obj PRIVATE ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + .. + ${CLAMBC_LIB_DIR}/Common # For anything in 'Common' ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/ClamBCWriter/ClamBCWriter.cpp b/libclambcc/ClamBCWriter/ClamBCWriter.cpp index e9ca056942..471a1d8133 100644 --- a/libclambcc/ClamBCWriter/ClamBCWriter.cpp +++ b/libclambcc/ClamBCWriter/ClamBCWriter.cpp @@ -19,12 +19,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ -#include "Common/bytecode_api.h" -#include "Common/clambc.h" -#include "Common/ClamBCModule.h" +#include "bytecode_api.h" +#include "clambc.h" +#include "ClamBCModule.h" +#include "ClamBCUtilities.h" + #include "ClamBCAnalyzer/ClamBCAnalyzer.h" #include "ClamBCRegAlloc/ClamBCRegAlloc.h" -#include "Common/ClamBCUtilities.h" #include #include diff --git a/libclambcc/Common/CMakeLists.txt b/libclambcc/Common/CMakeLists.txt index 3211090fdc..f5938d51c0 100644 --- a/libclambcc/Common/CMakeLists.txt +++ b/libclambcc/Common/CMakeLists.txt @@ -14,8 +14,7 @@ target_sources(clambccommon_obj target_include_directories(clambccommon_obj PRIVATE ${CMAKE_BINARY_DIR} # For clambc-version.h (generated file) - . # For Common/clambc.h - .. # For clambc.h #TODO: change all passes to use "Common" and then delete this line. + .. ${LLVM_INCLUDE_DIRS} ) diff --git a/libclambcc/Common/ClamBCDiagnostics.cpp b/libclambcc/Common/ClamBCDiagnostics.cpp index 5499578ec9..f7323dde9c 100644 --- a/libclambcc/Common/ClamBCDiagnostics.cpp +++ b/libclambcc/Common/ClamBCDiagnostics.cpp @@ -20,7 +20,10 @@ * MA 02110-1301, USA. */ #define DEBUGTYPE "clambcdiags" + +#include "clambc.h" #include "ClamBCDiagnostics.h" + #include #include #include @@ -29,7 +32,6 @@ #include #include -#include "clambc.h" using namespace llvm; // Print the main compile unit's source filename, diff --git a/libclambcc/Common/ClamBCModule.h b/libclambcc/Common/ClamBCModule.h index 1ed0675719..ea7b74a7b5 100644 --- a/libclambcc/Common/ClamBCModule.h +++ b/libclambcc/Common/ClamBCModule.h @@ -21,19 +21,22 @@ */ #ifndef CLAMBC_MODULE_H #define CLAMBC_MODULE_H -#include -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/DenseSet.h" -#include "llvm/ADT/StringMap.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/ADT/Twine.h" + +#include "clambc.h" + +#include +#include +#include +#include +#include #include #include -#include "llvm/Support/raw_ostream.h" +#include + #include #include +#include -#include "clambc.h" class ClamBCWriter; class ClamBCRegAlloc; diff --git a/libclambcc/Common/ClamBCUtilities.cpp b/libclambcc/Common/ClamBCUtilities.cpp index 8648bfe025..f94c5c5810 100644 --- a/libclambcc/Common/ClamBCUtilities.cpp +++ b/libclambcc/Common/ClamBCUtilities.cpp @@ -1,12 +1,12 @@ -#include -#include -#include - #include "ClamBCUtilities.h" #include "ClamBCDiagnostics.h" #include "clambc.h" +#include +#include +#include + using namespace llvm; void ClamBCStop(const Twine &Msg, const Module *M) diff --git a/libclambcc/Common/ClamBCUtilities.h b/libclambcc/Common/ClamBCUtilities.h index a745cf746d..ec3d882a47 100644 --- a/libclambcc/Common/ClamBCUtilities.h +++ b/libclambcc/Common/ClamBCUtilities.h @@ -1,6 +1,8 @@ #ifndef CLAMBC_UTILITIES_H_ #define CLAMBC_UTILITIES_H_ +#include "ClamBCDiagnostics.h" + #include #include #include @@ -13,8 +15,6 @@ #include #include -#include "ClamBCDiagnostics.h" - /*These are a temporary replacement for ClamBCModule::stop. */ void ClamBCStop(const llvm::Twine &Msg, const llvm::Module *M);