A target that doesn't support these intrinsics will still meet spec (the

intrinsic will always produce zero), but it will behave unexpectedly, so
warn like GCC does.

llvm-svn: 11444
This commit is contained in:
Chris Lattner 2004-02-14 04:52:06 +00:00
parent d6a39eaa70
commit 0c48a03374
1 changed files with 3 additions and 0 deletions

View File

@ -51,6 +51,9 @@ void DefaultIntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
case Intrinsic::returnaddress:
case Intrinsic::frameaddress:
std::cerr << "WARNING: this target does not support the llvm."
<< (Callee->getIntrinsicID() == Intrinsic::returnaddress ?
"return" : "frame") << "address intrinsic.\n";
CI->replaceAllUsesWith(ConstantPointerNull::get(
cast<PointerType>(CI->getType())));
break;