All pastes #329403 Raw Edit

accessesGlobal

public cpp v1 · immutable
#329403 ·published 2007-01-26 18:45 UTC
rendered paste body
void accessesGlobal(StoreInst* SI) {  Value *V = SI->getPointerOperand();  if (isa<GlobalValue>(V))    return true;  if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V))    if (CE->getOpcode() == Instruction::GetElementPtr)      if (isa<GlobalValue>(CE->getOperand(0)))        return true;  return false;}