Skip to content

Commit

Permalink
Accidently merged an incomplete upstream patch in 10e6ee5 - reverting…
Browse files Browse the repository at this point in the history
… the changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316359 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
hctim committed Oct 23, 2017
1 parent 10e6ee5 commit 879f02b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
5 changes: 3 additions & 2 deletions tools/llvm-cfi-verify/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ set(LLVM_LINK_COMPONENTS
AllTargetsDescs
AllTargetsDisassemblers
AllTargetsInfos
CFIVerify
MC
MCParser
Object
Support
)

add_llvm_tool(llvm-cfi-verify
llvm-cfi-verify.cpp)
llvm-cfi-verify.cpp
lib/FileAnalysis.cpp
)

add_subdirectory(lib)
4 changes: 1 addition & 3 deletions tools/llvm-cfi-verify/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions tools/llvm-cfi-verify/lib/FileAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -162,7 +161,7 @@ class FileAnalysis {

// 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;
Expand Down
5 changes: 2 additions & 3 deletions unittests/tools/llvm-cfi-verify/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set(LLVM_LINK_COMPONENTS
AllTargetsDescs
AllTargetsDisassemblers
AllTargetsInfos
CFIVerify
MC
MCParser
Object
Expand All @@ -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()

0 comments on commit 879f02b

Please sign in to comment.