Merge "Switch to clang-r383902" am: a0ba9fab45
Change-Id: I039499a777e7dc3bfb46ae23e0205862dfb8cd93
This commit is contained in:
@@ -15,5 +15,5 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
export LLVM_BUILD_HOST_TOOLS=true
|
export LLVM_BUILD_HOST_TOOLS=true
|
||||||
export LLVM_PREBUILTS_VERSION=clang-r377782d
|
export LLVM_PREBUILTS_VERSION=clang-r383902
|
||||||
export LLVM_RELEASE_VERSION=10.0.6
|
export LLVM_RELEASE_VERSION=11.0.1
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ static std::string GetConfigFilePath(const std::string &dump_file_path) {
|
|||||||
llvm::SmallString<128> config_file_path(dump_file_path);
|
llvm::SmallString<128> config_file_path(dump_file_path);
|
||||||
llvm::sys::path::remove_filename(config_file_path);
|
llvm::sys::path::remove_filename(config_file_path);
|
||||||
llvm::sys::path::append(config_file_path, "config.ini");
|
llvm::sys::path::append(config_file_path, "config.ini");
|
||||||
return config_file_path.str();
|
return std::string(config_file_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ReadConfigFile(const std::string &config_file_path) {
|
static void ReadConfigFile(const std::string &config_file_path) {
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ std::string ABIWrapper::GetMangledNameDecl(
|
|||||||
const clang::NamedDecl *decl, clang::MangleContext *mangle_contextp) {
|
const clang::NamedDecl *decl, clang::MangleContext *mangle_contextp) {
|
||||||
if (!mangle_contextp->shouldMangleDeclName(decl)) {
|
if (!mangle_contextp->shouldMangleDeclName(decl)) {
|
||||||
clang::IdentifierInfo *identifier = decl->getIdentifier();
|
clang::IdentifierInfo *identifier = decl->getIdentifier();
|
||||||
return identifier ? identifier->getName() : "";
|
return identifier ? identifier->getName().str() : "";
|
||||||
}
|
}
|
||||||
std::string mangled_name;
|
std::string mangled_name;
|
||||||
llvm::raw_string_ostream ostream(mangled_name);
|
llvm::raw_string_ostream ostream(mangled_name);
|
||||||
@@ -223,7 +223,7 @@ bool ABIWrapper::CreateExtendedType(clang::QualType qual_type,
|
|||||||
static std::string GetAnonymousEnumUniqueId(llvm::StringRef mangled_name,
|
static std::string GetAnonymousEnumUniqueId(llvm::StringRef mangled_name,
|
||||||
const clang::EnumDecl *enum_decl) {
|
const clang::EnumDecl *enum_decl) {
|
||||||
// Get the type name from the mangled name.
|
// Get the type name from the mangled name.
|
||||||
const std::string mangled_name_str = mangled_name;
|
const std::string mangled_name_str(mangled_name);
|
||||||
std::smatch match_result;
|
std::smatch match_result;
|
||||||
std::string old_suffix;
|
std::string old_suffix;
|
||||||
std::string nested_name_suffix;
|
std::string nested_name_suffix;
|
||||||
@@ -274,7 +274,7 @@ std::string ABIWrapper::GetTypeUniqueId(clang::QualType qual_type) {
|
|||||||
return GetAnonymousEnumUniqueId(uid.str(), enum_decl);
|
return GetAnonymousEnumUniqueId(uid.str(), enum_decl);
|
||||||
}
|
}
|
||||||
|
|
||||||
return uid.str();
|
return std::string(uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateBasicNamedAndTypedDecl creates a BasicNamedAndTypedDecl which will
|
// CreateBasicNamedAndTypedDecl creates a BasicNamedAndTypedDecl which will
|
||||||
@@ -602,7 +602,7 @@ bool RecordDeclWrapper::SetupRecordFields(repr::RecordTypeIR *recordp,
|
|||||||
llvm::errs() << "Creation of Type failed\n";
|
llvm::errs() << "Creation of Type failed\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
std::string field_name = field->getName();
|
std::string field_name(field->getName());
|
||||||
uint64_t field_offset = record_layout.getFieldOffset(field_index);
|
uint64_t field_offset = record_layout.getFieldOffset(field_index);
|
||||||
recordp->AddRecordField(repr::RecordFieldIR(
|
recordp->AddRecordField(repr::RecordFieldIR(
|
||||||
field_name, GetTypeUniqueId(field_type), field_offset,
|
field_name, GetTypeUniqueId(field_type), field_offset,
|
||||||
@@ -855,7 +855,7 @@ std::string RecordDeclWrapper::GetMangledRTTI(
|
|||||||
llvm::SmallString<256> uid;
|
llvm::SmallString<256> uid;
|
||||||
llvm::raw_svector_ostream out(uid);
|
llvm::raw_svector_ostream out(uid);
|
||||||
mangle_contextp_->mangleCXXRTTI(qual_type, out);
|
mangle_contextp_->mangleCXXRTTI(qual_type, out);
|
||||||
return uid.str();
|
return std::string(uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ ELFSoFileParser<T>::ELFSoFileParser(const llvm::object::ELFObjectFile<T> *obj) {
|
|||||||
|
|
||||||
ElfSymbolIR::ElfSymbolBinding symbol_binding =
|
ElfSymbolIR::ElfSymbolBinding symbol_binding =
|
||||||
LLVMToIRSymbolBinding(elf_sym->getBinding());
|
LLVMToIRSymbolBinding(elf_sym->getBinding());
|
||||||
std::string symbol_name = UnWrap(symbol_it.getName());
|
std::string symbol_name(UnWrap(symbol_it.getName()));
|
||||||
|
|
||||||
switch (symbol_it.getELFType()) {
|
switch (symbol_it.getELFType()) {
|
||||||
case llvm::ELF::STT_OBJECT:
|
case llvm::ELF::STT_OBJECT:
|
||||||
|
|||||||
Reference in New Issue
Block a user