mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11444 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -51,6 +51,9 @@ void DefaultIntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
|
|||||||
|
|
||||||
case Intrinsic::returnaddress:
|
case Intrinsic::returnaddress:
|
||||||
case Intrinsic::frameaddress:
|
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(
|
CI->replaceAllUsesWith(ConstantPointerNull::get(
|
||||||
cast<PointerType>(CI->getType())));
|
cast<PointerType>(CI->getType())));
|
||||||
break;
|
break;
|
||||||
|
@ -51,6 +51,9 @@ void DefaultIntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
|
|||||||
|
|
||||||
case Intrinsic::returnaddress:
|
case Intrinsic::returnaddress:
|
||||||
case Intrinsic::frameaddress:
|
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(
|
CI->replaceAllUsesWith(ConstantPointerNull::get(
|
||||||
cast<PointerType>(CI->getType())));
|
cast<PointerType>(CI->getType())));
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user