]> granicus.if.org Git - llvm/commitdiff
Accidently merged an incomplete upstream patch in 10e6ee563a6b5ca498f27972ca6dbe6c308...
authorMitch Phillips <mitchphillips@outlook.com>
Mon, 23 Oct 2017 18:17:56 +0000 (18:17 +0000)
committerMitch Phillips <mitchphillips@outlook.com>
Mon, 23 Oct 2017 18:17:56 +0000 (18:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316359 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-cfi-verify/CMakeLists.txt
tools/llvm-cfi-verify/lib/CMakeLists.txt
tools/llvm-cfi-verify/lib/FileAnalysis.h
unittests/tools/llvm-cfi-verify/CMakeLists.txt

index ae203e534700a710cf18663e4b57dd44a55822d6..bf65cf7785c9ced78c7f88aaddd628c5313e9d13 100644 (file)
@@ -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)
index 8cbbc79ceca52e52560c28096cec72f4a775fa22..814e30a234ba403c2b5e2d45e4c3edb34c76909a 100644 (file)
@@ -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
index 3c24bcda75ca47740dba8fa60f41a9906a31df43..df1ad603b6ce1c4c8907dbfd0011c22f53bb2c7e 100644 (file)
@@ -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<uint64_t, std::vector<uint64_t>> StaticBranchTargetings;
+  std::unordered_map<uint64_t, std::vector<uint64_t>> StaticBranchTargetings;
 
   // A list of addresses of indirect control flow instructions.
   std::set<uint64_t> IndirectInstructions;
index 938b90eb83b05e7a6cf9d0a19190b614f4170536..f370400c6302ff2ad74031512227a4e637c4c6d7 100644 (file)
@@ -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()