A target that doesn't support these intrinsics will still meet spec (the
authorChris Lattner <sabre@nondot.org>
Sat, 14 Feb 2004 04:52:06 +0000 (04:52 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 14 Feb 2004 04:52:06 +0000 (04:52 +0000)
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
lib/VMCore/IntrinsicLowering.cpp

index d0030eaea6a8f80bf39ae8e9902217b43fc34835..99357c14b649dd835fa86dbc4561c76dcd76d2f3 100644 (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;
index d0030eaea6a8f80bf39ae8e9902217b43fc34835..99357c14b649dd835fa86dbc4561c76dcd76d2f3 100644 (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;