[llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y
Chris Lattner
clattner at apple.com
Mon Apr 16 09:02:06 PDT 2007
> + // 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 at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list