> + // Check for call to invalid intrinsic to avoid crashing later. > + if (Function *theF = dyn_cast<Function>(V)) { > + if (theF->hasName() && 0 == strncmp(theF->getName().c_str(), > "llvm.", 5)&&
Please don't use getName().c_str(). This requires construction of a temporary std::string (i.e. heap traffic). Instead, plz use Value::getValueName() etc. -Chris > + !theF->getIntrinsicID(true)) > + GEN_ERROR("Call to invalid LLVM intrinsic function '" + > + theF->getName() + "'"); > + } > + > // Check the arguments > ValueList Args; > if ($6->empty()) { // Has no > arguments? > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits@cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits