Browse Source

Updated to LLVM/Clang revisions 318543/318538 respectively.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/1005/head
Dimitar Dobrev 8 years ago
parent
commit
481bbc0351
  1. 2
      build/Clang-commit
  2. 2
      build/LLVM-commit
  3. 1
      build/scripts/LLVM.lua
  4. 6
      src/CppParser/ELFDumper.h
  5. 7
      src/CppParser/Parser.cpp

2
build/Clang-commit

@ -1 +1 @@
e20a5f4e97e6bde6c10d591e8466b030b717d258 ffc5930a5cffb23df03565739b8820d14a19d4bf

2
build/LLVM-commit

@ -1 +1 @@
cad1431a1e4e8f9ceb11d463682fd868897d7af6 9bde5fb8f8ea44d6ef0f2edb4f54cbff7a0aee53

1
build/scripts/LLVM.lua

@ -240,6 +240,7 @@ function cmake(gen, conf, builddir, options)
.. ' -DCLANG_TOOL_SCAN_VIEW_BUILD=false' .. ' -DCLANG_TOOL_SCAN_VIEW_BUILD=false'
.. ' -DLLVM_TARGETS_TO_BUILD="X86"' .. ' -DLLVM_TARGETS_TO_BUILD="X86"'
.. ' -DCMAKE_BUILD_TYPE=' .. conf .. ' ..' .. ' -DCMAKE_BUILD_TYPE=' .. conf .. ' ..'
.. ' -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11'
.. ' ' .. options .. ' ' .. options
execute_or_die(cmd) execute_or_die(cmd)
os.chdir(cwd) os.chdir(cwd)

6
src/CppParser/ELFDumper.h

@ -75,7 +75,11 @@ ELFDumper<ELFT>::ELFDumper(const llvm::object::ELFFile<ELFT> *Obj) {
auto toMappedAddr = [&](uint64_t VAddr) -> const uint8_t *{ auto toMappedAddr = [&](uint64_t VAddr) -> const uint8_t *{
const Elf_Phdr **I = std::upper_bound( const Elf_Phdr **I = std::upper_bound(
LoadSegments.begin(), LoadSegments.end(), VAddr, llvm::object::compareAddr<ELFT>); LoadSegments.begin(), LoadSegments.end(), VAddr,
[](uint64_t VAddr, const Elf_Phdr *Phdr)
{
return VAddr < Phdr->p_vaddr;
});
if (I == LoadSegments.begin()) if (I == LoadSegments.begin())
llvm::report_fatal_error("Virtual address is not in any segment"); llvm::report_fatal_error("Virtual address is not in any segment");
--I; --I;

7
src/CppParser/Parser.cpp

@ -4184,10 +4184,15 @@ ParserResultKind Parser::ParseSharedLib(llvm::StringRef File,
NativeLib->Dependencies.push_back(lib); NativeLib->Dependencies.push_back(lib);
} }
} }
for (const auto& Entry : MachOObjectFile->exports()) auto Error = llvm::Error::success();
for (const auto& Entry : MachOObjectFile->exports(Error))
{ {
NativeLib->Symbols.push_back(Entry.name()); NativeLib->Symbols.push_back(Entry.name());
} }
if (Error)
{
return ParserResultKind::Error;
}
return ParserResultKind::Success; return ParserResultKind::Success;
} }

Loading…
Cancel
Save