Imported Upstream version 5.18.0.167

Former-commit-id: 289509151e0fee68a1b591a20c9f109c3c789d3a
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-10-20 08:25:10 +00:00
parent e19d552987
commit b084638f15
28489 changed files with 184 additions and 3866856 deletions

View File

@ -1,21 +0,0 @@
set(LLVM_LINK_COMPONENTS
${LLVM_TARGETS_TO_BUILD}
AsmPrinter
DebugInfoDWARF
MC
Object
Support
Target
)
add_llvm_tool(llvm-dwp
llvm-dwp.cpp
DWPError.cpp
DEPENDS
intrinsics_gen
)
if(LLVM_INSTALL_BINUTILS_SYMLINKS)
add_llvm_tool_symlink(dwp llvm-dwp)
endif()

View File

@ -1,3 +0,0 @@
#include "DWPError.h"
using namespace llvm;
char DWPError::ID;

View File

@ -1,23 +0,0 @@
#ifndef TOOLS_LLVM_DWP_DWPERROR
#define TOOLS_LLVM_DWP_DWPERROR
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include <string>
namespace llvm {
class DWPError : public ErrorInfo<DWPError> {
public:
DWPError(std::string Info) : Info(std::move(Info)) {}
void log(raw_ostream &OS) const override { OS << Info; }
std::error_code convertToErrorCode() const override {
llvm_unreachable("Not implemented");
}
static char ID;
private:
std::string Info;
};
}
#endif

View File

@ -1,56 +0,0 @@
#ifndef TOOLS_LLVM_DWP_DWPSTRINGPOOL
#define TOOLS_LLVM_DWP_DWPSTRINGPOOL
#include "llvm/ADT/DenseMap.h"
#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCStreamer.h"
#include <cassert>
namespace llvm {
class DWPStringPool {
struct CStrDenseMapInfo {
static inline const char *getEmptyKey() {
return reinterpret_cast<const char *>(~static_cast<uintptr_t>(0));
}
static inline const char *getTombstoneKey() {
return reinterpret_cast<const char *>(~static_cast<uintptr_t>(1));
}
static unsigned getHashValue(const char *Val) {
assert(Val != getEmptyKey() && "Cannot hash the empty key!");
assert(Val != getTombstoneKey() && "Cannot hash the tombstone key!");
return (unsigned)hash_value(StringRef(Val));
}
static bool isEqual(const char *LHS, const char *RHS) {
if (RHS == getEmptyKey())
return LHS == getEmptyKey();
if (RHS == getTombstoneKey())
return LHS == getTombstoneKey();
return strcmp(LHS, RHS) == 0;
}
};
MCStreamer &Out;
MCSection *Sec;
DenseMap<const char *, uint32_t, CStrDenseMapInfo> Pool;
uint32_t Offset = 0;
public:
DWPStringPool(MCStreamer &Out, MCSection *Sec) : Out(Out), Sec(Sec) {}
uint32_t getOffset(const char *Str, unsigned Length) {
assert(strlen(Str) + 1 == Length && "Ensure length hint is correct");
auto Pair = Pool.insert(std::make_pair(Str, Offset));
if (Pair.second) {
Out.SwitchSection(Sec);
Out.EmitBytes(StringRef(Str, Length));
Offset += Length;
}
return Pair.first->second;
}
};
}
#endif

View File

@ -1,23 +0,0 @@
;===- ./tools/llvm-dwp/LLVMBuild.txt ---------------------------*- Conf -*--===;
;
; The LLVM Compiler Infrastructure
;
; This file is distributed under the University of Illinois Open Source
; License. See LICENSE.TXT for details.
;
;===------------------------------------------------------------------------===;
;
; This is an LLVMBuild description file for the components in this subdirectory.
;
; For more information on the LLVMBuild system, please see:
;
; http://llvm.org/docs/LLVMBuild.html
;
;===------------------------------------------------------------------------===;
[component_0]
type = Tool
name = llvm-dwp
parent = Tools
required_libraries = AsmPrinter DebugInfoDWARF MC Object Support all-targets

File diff suppressed because it is too large Load Diff