[llvm] a9bc7b8 - Another round of GCC5 fixes.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 28 17:09:40 PST 2020
Author: Benjamin Kramer
Date: 2020-01-29T02:09:24+01:00
New Revision: a9bc7b83a402f2bf7d7c55ac4c9e9a2fb2b3ea13
URL: https://github.com/llvm/llvm-project/commit/a9bc7b83a402f2bf7d7c55ac4c9e9a2fb2b3ea13
DIFF: https://github.com/llvm/llvm-project/commit/a9bc7b83a402f2bf7d7c55ac4c9e9a2fb2b3ea13.diff
LOG: Another round of GCC5 fixes.
Added:
Modified:
llvm/lib/ExecutionEngine/ExecutionEngine.cpp
llvm/lib/Object/ModuleSymbolTable.cpp
llvm/lib/Object/WasmObjectFile.cpp
llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
llvm/lib/TextAPI/MachO/InterfaceFile.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
index 77f9d70eb543..42ce33a8f37a 100644
--- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -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)));
}
}
diff --git a/llvm/lib/Object/ModuleSymbolTable.cpp b/llvm/lib/Object/ModuleSymbolTable.cpp
index 17ac4afda2d6..45bcf7481890 100644
--- a/llvm/lib/Object/ModuleSymbolTable.cpp
+++ b/llvm/lib/Object/ModuleSymbolTable.cpp
@@ -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));
});
}
diff --git a/llvm/lib/Object/WasmObjectFile.cpp b/llvm/lib/Object/WasmObjectFile.cpp
index 1a692588e4ea..2e42324629f5 100644
--- a/llvm/lib/Object/WasmObjectFile.cpp
+++ b/llvm/lib/Object/WasmObjectFile.cpp
@@ -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)
diff --git a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
index 8d5e56e26c0f..9d39b7c63f8f 100644
--- a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
+++ b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
@@ -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);
diff --git a/llvm/lib/TextAPI/MachO/InterfaceFile.cpp b/llvm/lib/TextAPI/MachO/InterfaceFile.cpp
index aae5c231a62a..0a392a242441 100644
--- a/llvm/lib/TextAPI/MachO/InterfaceFile.cpp
+++ b/llvm/lib/TextAPI/MachO/InterfaceFile.cpp
@@ -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;
}
More information about the llvm-commits
mailing list