Merge "Switch to clang-r383902"

This commit is contained in:
Treehugger Robot
2020-05-01 18:11:01 +00:00
committed by Gerrit Code Review
4 changed files with 9 additions and 9 deletions

View File

@@ -15,5 +15,5 @@
# limitations under the License.
export LLVM_BUILD_HOST_TOOLS=true
export LLVM_PREBUILTS_VERSION=clang-r377782d
export LLVM_RELEASE_VERSION=10.0.6
export LLVM_PREBUILTS_VERSION=clang-r383902
export LLVM_RELEASE_VERSION=11.0.1

View File

@@ -150,7 +150,7 @@ static std::string GetConfigFilePath(const std::string &dump_file_path) {
llvm::SmallString<128> config_file_path(dump_file_path);
llvm::sys::path::remove_filename(config_file_path);
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) {

View File

@@ -96,7 +96,7 @@ std::string ABIWrapper::GetMangledNameDecl(
const clang::NamedDecl *decl, clang::MangleContext *mangle_contextp) {
if (!mangle_contextp->shouldMangleDeclName(decl)) {
clang::IdentifierInfo *identifier = decl->getIdentifier();
return identifier ? identifier->getName() : "";
return identifier ? identifier->getName().str() : "";
}
std::string 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,
const clang::EnumDecl *enum_decl) {
// 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::string old_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 uid.str();
return std::string(uid);
}
// CreateBasicNamedAndTypedDecl creates a BasicNamedAndTypedDecl which will
@@ -602,7 +602,7 @@ bool RecordDeclWrapper::SetupRecordFields(repr::RecordTypeIR *recordp,
llvm::errs() << "Creation of Type failed\n";
return false;
}
std::string field_name = field->getName();
std::string field_name(field->getName());
uint64_t field_offset = record_layout.getFieldOffset(field_index);
recordp->AddRecordField(repr::RecordFieldIR(
field_name, GetTypeUniqueId(field_type), field_offset,
@@ -855,7 +855,7 @@ std::string RecordDeclWrapper::GetMangledRTTI(
llvm::SmallString<256> uid;
llvm::raw_svector_ostream out(uid);
mangle_contextp_->mangleCXXRTTI(qual_type, out);
return uid.str();
return std::string(uid);
}

View File

@@ -99,7 +99,7 @@ ELFSoFileParser<T>::ELFSoFileParser(const llvm::object::ELFObjectFile<T> *obj) {
ElfSymbolIR::ElfSymbolBinding symbol_binding =
LLVMToIRSymbolBinding(elf_sym->getBinding());
std::string symbol_name = UnWrap(symbol_it.getName());
std::string symbol_name(UnWrap(symbol_it.getName()));
switch (symbol_it.getELFType()) {
case llvm::ELF::STT_OBJECT: