forked from OSchip/llvm-project
Make bugpoint work with gcc5 again.
This commit is contained in:
parent
bd31243a34
commit
cd87e207ec
|
@ -499,7 +499,8 @@ bool ReduceCrashingBlocks::TestBlocks(std::vector<const BasicBlock *> &BBs) {
|
||||||
std::vector<std::pair<std::string, std::string>> BlockInfo;
|
std::vector<std::pair<std::string, std::string>> BlockInfo;
|
||||||
|
|
||||||
for (BasicBlock *BB : Blocks)
|
for (BasicBlock *BB : Blocks)
|
||||||
BlockInfo.emplace_back(BB->getParent()->getName(), BB->getName());
|
BlockInfo.emplace_back(std::string(BB->getParent()->getName()),
|
||||||
|
BB->getName());
|
||||||
|
|
||||||
SmallVector<BasicBlock *, 16> ToProcess;
|
SmallVector<BasicBlock *, 16> ToProcess;
|
||||||
for (auto &F : *M) {
|
for (auto &F : *M) {
|
||||||
|
|
|
@ -389,7 +389,8 @@ ExtractLoops(BugDriver &BD,
|
||||||
|
|
||||||
std::vector<std::pair<std::string, FunctionType *>> MisCompFunctions;
|
std::vector<std::pair<std::string, FunctionType *>> MisCompFunctions;
|
||||||
for (Function *F : MiscompiledFunctions) {
|
for (Function *F : MiscompiledFunctions) {
|
||||||
MisCompFunctions.emplace_back(F->getName(), F->getFunctionType());
|
MisCompFunctions.emplace_back(std::string(F->getName()),
|
||||||
|
F->getFunctionType());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Linker::linkModules(*ToNotOptimize,
|
if (Linker::linkModules(*ToNotOptimize,
|
||||||
|
@ -415,7 +416,8 @@ ExtractLoops(BugDriver &BD,
|
||||||
E = ToOptimizeLoopExtracted->end();
|
E = ToOptimizeLoopExtracted->end();
|
||||||
I != E; ++I)
|
I != E; ++I)
|
||||||
if (!I->isDeclaration())
|
if (!I->isDeclaration())
|
||||||
MisCompFunctions.emplace_back(I->getName(), I->getFunctionType());
|
MisCompFunctions.emplace_back(std::string(I->getName()),
|
||||||
|
I->getFunctionType());
|
||||||
|
|
||||||
// Okay, great! Now we know that we extracted a loop and that loop
|
// Okay, great! Now we know that we extracted a loop and that loop
|
||||||
// extraction both didn't break the program, and didn't mask the problem.
|
// extraction both didn't break the program, and didn't mask the problem.
|
||||||
|
|
|
@ -48,7 +48,7 @@ getSectionRefsByNameOrIndex(const object::ObjectFile *Obj,
|
||||||
if (!Section.getAsInteger(0, SecIndex))
|
if (!Section.getAsInteger(0, SecIndex))
|
||||||
SecIndices.emplace(SecIndex, false);
|
SecIndices.emplace(SecIndex, false);
|
||||||
else
|
else
|
||||||
SecNames.emplace(Section, false);
|
SecNames.emplace(std::string(Section), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
SecIndex = Obj->isELF() ? 0 : 1;
|
SecIndex = Obj->isELF() ? 0 : 1;
|
||||||
|
|
Loading…
Reference in New Issue