From cc42d2c3ccd17a82c3c0abc95a720e183e84dbdd Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 14 Feb 2004 04:52:06 +0000 Subject: [PATCH] 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 --- lib/CodeGen/IntrinsicLowering.cpp | 3 +++ lib/VMCore/IntrinsicLowering.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lib/CodeGen/IntrinsicLowering.cpp b/lib/CodeGen/IntrinsicLowering.cpp index d0030eaea6a..99357c14b64 100644 --- a/lib/CodeGen/IntrinsicLowering.cpp +++ b/lib/CodeGen/IntrinsicLowering.cpp @@ -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(CI->getType()))); break; diff --git a/lib/VMCore/IntrinsicLowering.cpp b/lib/VMCore/IntrinsicLowering.cpp index d0030eaea6a..99357c14b64 100644 --- a/lib/VMCore/IntrinsicLowering.cpp +++ b/lib/VMCore/IntrinsicLowering.cpp @@ -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(CI->getType()))); break;