mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 06:32:09 +00:00
use stripPointerCasts to simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76397 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
857755c2a5
commit
1d5c49327b
@ -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…
x
Reference in New Issue
Block a user