mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-14 15:19:33 +00:00
use stripPointerCasts to simplify some code.
llvm-svn: 76397
This commit is contained in:
parent
36b89d4fb7
commit
cbd8366755
@ -96,12 +96,10 @@ void MachineModuleInfo::AnalyzeModule(Module &M) {
|
||||
ConstantArray *InitList = dyn_cast<ConstantArray>(GV->getInitializer());
|
||||
if (InitList == 0) return;
|
||||
|
||||
for (unsigned i = 0, e = InitList->getNumOperands(); i != e; ++i) {
|
||||
if (ConstantExpr *CE = dyn_cast<ConstantExpr>(InitList->getOperand(i)))
|
||||
if (CE->getOpcode() == Instruction::BitCast)
|
||||
if (Function *F = dyn_cast<Function>(CE->getOperand(0)))
|
||||
UsedFunctions.insert(F);
|
||||
}
|
||||
for (unsigned i = 0, e = InitList->getNumOperands(); i != e; ++i)
|
||||
if (Function *F =
|
||||
dyn_cast<Function>(InitList->getOperand(i)->stripPointerCasts()))
|
||||
UsedFunctions.insert(F);
|
||||
}
|
||||
|
||||
//===-EH-------------------------------------------------------------------===//
|
||||
|
Loading…
Reference in New Issue
Block a user