mirror of
https://github.com/obfuscator-llvm/obfuscator
synced 2026-06-08 16:28:34 +00:00
Initial commit of LLVM 3.4
This commit is contained in:
@@ -195,8 +195,6 @@ class FunctionDifferenceEngine {
|
||||
BasicBlock::iterator LI = L->begin(), LE = L->end();
|
||||
BasicBlock::iterator RI = R->begin();
|
||||
|
||||
llvm::SmallVector<std::pair<Instruction*,Instruction*>, 20> TentativePairs;
|
||||
|
||||
do {
|
||||
assert(LI != LE && RI != R->end());
|
||||
Instruction *LeftI = &*LI, *RightI = &*RI;
|
||||
@@ -316,15 +314,15 @@ class FunctionDifferenceEngine {
|
||||
|
||||
bool Difference = false;
|
||||
|
||||
DenseMap<Constant*, BasicBlock*> LCases;
|
||||
DenseMap<ConstantInt*,BasicBlock*> LCases;
|
||||
|
||||
for (SwitchInst::CaseIt I = LI->case_begin(), E = LI->case_end();
|
||||
I != E; ++I)
|
||||
LCases[I.getCaseValueEx()] = I.getCaseSuccessor();
|
||||
LCases[I.getCaseValue()] = I.getCaseSuccessor();
|
||||
|
||||
for (SwitchInst::CaseIt I = RI->case_begin(), E = RI->case_end();
|
||||
I != E; ++I) {
|
||||
IntegersSubset CaseValue = I.getCaseValueEx();
|
||||
ConstantInt *CaseValue = I.getCaseValue();
|
||||
BasicBlock *LCase = LCases[CaseValue];
|
||||
if (LCase) {
|
||||
if (TryUnify) tryUnify(LCase, I.getCaseSuccessor());
|
||||
@@ -336,7 +334,7 @@ class FunctionDifferenceEngine {
|
||||
}
|
||||
}
|
||||
if (!Difference)
|
||||
for (DenseMap<Constant*, BasicBlock*>::iterator
|
||||
for (DenseMap<ConstantInt*,BasicBlock*>::iterator
|
||||
I = LCases.begin(), E = LCases.end(); I != E; ++I) {
|
||||
if (Complain)
|
||||
Engine.logf("left switch has extra case %l") << I->first;
|
||||
|
||||
Reference in New Issue
Block a user