Skip to content

Commit

Permalink
Another round of GCC5 fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
d0k committed Jan 29, 2020
1 parent 9a5c448 commit a9bc7b8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/ExecutionEngine/ExecutionEngine.cpp
Expand Up @@ -307,8 +307,8 @@ const GlobalValue *ExecutionEngine::getGlobalValueAtAddress(void *Addr) {
E = EEState.getGlobalAddressMap().end(); I != E; ++I) {
StringRef Name = I->first();
uint64_t Addr = I->second;
EEState.getGlobalAddressReverseMap().insert(std::make_pair(
Addr, Name));
EEState.getGlobalAddressReverseMap().insert(
std::make_pair(Addr, std::string(Name)));
}
}

Expand Down
3 changes: 2 additions & 1 deletion llvm/lib/Object/ModuleSymbolTable.cpp
Expand Up @@ -63,7 +63,8 @@ void ModuleSymbolTable::addModule(Module *M) {
SymTab.push_back(&GV);

CollectAsmSymbols(*M, [this](StringRef Name, BasicSymbolRef::Flags Flags) {
SymTab.push_back(new (AsmSymbols.Allocate()) AsmSymbol(Name, Flags));
SymTab.push_back(new (AsmSymbols.Allocate())
AsmSymbol(std::string(Name), Flags));
});
}

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Object/WasmObjectFile.cpp
Expand Up @@ -708,7 +708,7 @@ Error WasmObjectFile::parseProducersSection(ReadContext &Ctx) {
"Producers section contains repeated producer",
object_error::parse_failed);
}
ProducerVec->emplace_back(Name, Version);
ProducerVec->emplace_back(std::string(Name), std::string(Version));
}
}
if (Ctx.Ptr != Ctx.End)
Expand Down
3 changes: 2 additions & 1 deletion llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
Expand Up @@ -222,7 +222,8 @@ Error CoverageMapping::loadFunctionRecord(
Record.FunctionHash, Counts)) {
instrprof_error IPE = InstrProfError::take(std::move(E));
if (IPE == instrprof_error::hash_mismatch) {
FuncHashMismatches.emplace_back(Record.FunctionName, Record.FunctionHash);
FuncHashMismatches.emplace_back(std::string(Record.FunctionName),
Record.FunctionHash);
return Error::success();
} else if (IPE != instrprof_error::unknown_function)
return make_error<InstrProfError>(IPE);
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/TextAPI/MachO/InterfaceFile.cpp
Expand Up @@ -81,7 +81,7 @@ void InterfaceFile::addUUID(const Target &Target_, StringRef UUID) {
return;
}

UUIDs.emplace(Iter, Target_, UUID);
UUIDs.emplace(Iter, Target_, std::string(UUID));
return;
}

Expand Down

0 comments on commit a9bc7b8

Please sign in to comment.