From 49b4d6538e75d11b62d575076583a13779df4b11 Mon Sep 17 00:00:00 2001 From: Mitch Phillips Date: Mon, 23 Oct 2017 18:17:56 +0000 Subject: [PATCH] Accidently merged an incomplete upstream patch in 10e6ee563a6b5ca498f27972ca6dbe6c308f1ac2 - reverting the changes. llvm-svn: 316359 --- tools/llvm-cfi-verify/CMakeLists.txt | 5 +++-- tools/llvm-cfi-verify/lib/CMakeLists.txt | 4 +--- tools/llvm-cfi-verify/lib/FileAnalysis.h | 3 +-- unittests/tools/llvm-cfi-verify/CMakeLists.txt | 5 ++--- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/tools/llvm-cfi-verify/CMakeLists.txt b/tools/llvm-cfi-verify/CMakeLists.txt index ae203e53470..bf65cf7785c 100644 --- a/tools/llvm-cfi-verify/CMakeLists.txt +++ b/tools/llvm-cfi-verify/CMakeLists.txt @@ -4,7 +4,6 @@ set(LLVM_LINK_COMPONENTS AllTargetsDescs AllTargetsDisassemblers AllTargetsInfos - CFIVerify MC MCParser Object @@ -12,6 +11,8 @@ set(LLVM_LINK_COMPONENTS ) add_llvm_tool(llvm-cfi-verify - llvm-cfi-verify.cpp) + llvm-cfi-verify.cpp + lib/FileAnalysis.cpp + ) add_subdirectory(lib) diff --git a/tools/llvm-cfi-verify/lib/CMakeLists.txt b/tools/llvm-cfi-verify/lib/CMakeLists.txt index 8cbbc79ceca..814e30a234b 100644 --- a/tools/llvm-cfi-verify/lib/CMakeLists.txt +++ b/tools/llvm-cfi-verify/lib/CMakeLists.txt @@ -1,9 +1,7 @@ add_library(LLVMCFIVerify STATIC FileAnalysis.cpp - FileAnalysis.h - GraphBuilder.cpp - GraphBuilder.h) + FileAnalysis.h) llvm_update_compile_flags(LLVMCFIVerify) llvm_map_components_to_libnames(libs diff --git a/tools/llvm-cfi-verify/lib/FileAnalysis.h b/tools/llvm-cfi-verify/lib/FileAnalysis.h index 3c24bcda75c..df1ad603b6c 100644 --- a/tools/llvm-cfi-verify/lib/FileAnalysis.h +++ b/tools/llvm-cfi-verify/lib/FileAnalysis.h @@ -10,7 +10,6 @@ #ifndef LLVM_CFI_VERIFY_FILE_ANALYSIS_H #define LLVM_CFI_VERIFY_FILE_ANALYSIS_H -#include "llvm/ADT/DenseMap.h" #include "llvm/BinaryFormat/ELF.h" #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCContext.h" @@ -162,7 +161,7 @@ private: // Contains a mapping between a specific address, and a list of instructions // that use this address as a branch target (including call instructions). - DenseMap> StaticBranchTargetings; + std::unordered_map> StaticBranchTargetings; // A list of addresses of indirect control flow instructions. std::set IndirectInstructions; diff --git a/unittests/tools/llvm-cfi-verify/CMakeLists.txt b/unittests/tools/llvm-cfi-verify/CMakeLists.txt index 938b90eb83b..f370400c630 100644 --- a/unittests/tools/llvm-cfi-verify/CMakeLists.txt +++ b/unittests/tools/llvm-cfi-verify/CMakeLists.txt @@ -4,7 +4,6 @@ set(LLVM_LINK_COMPONENTS AllTargetsDescs AllTargetsDisassemblers AllTargetsInfos - CFIVerify MC MCParser Object @@ -14,6 +13,6 @@ set(LLVM_LINK_COMPONENTS list(FIND LLVM_TARGETS_TO_BUILD "X86" x86_idx) if (NOT x86_idx LESS 0) add_llvm_unittest(CFIVerifyTests - FileAnalysis.cpp - GraphBuilder.cpp) + FileAnalysis.cpp) + target_link_libraries(CFIVerifyTests LLVMCFIVerify) endif()