diff options
author | Albert Gutowski <agutowski@google.com> | 2016-10-12 22:13:19 +0000 |
---|---|---|
committer | Albert Gutowski <agutowski@google.com> | 2016-10-12 22:13:19 +0000 |
commit | 795d7d63810619af504ca1330aaa967c6e1c976d (patch) | |
tree | 4eebf0989b7ec2c007d25a9366eab6f76e90f18d /llvm/lib/CodeGen/IntrinsicLowering.cpp | |
parent | 2a0621e58a3929a0e1662c67ae59bfbb11b3b08f (diff) | |
download | bcm5719-llvm-795d7d63810619af504ca1330aaa967c6e1c976d.tar.gz bcm5719-llvm-795d7d63810619af504ca1330aaa967c6e1c976d.zip |
Create llvm.addressofreturnaddress intrinsic
Summary: We need a new LLVM intrinsic to implement MS _AddressOfReturnAddress builtin on 64-bit Windows.
Reviewers: majnemer, rnk
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D25293
llvm-svn: 284061
Diffstat (limited to 'llvm/lib/CodeGen/IntrinsicLowering.cpp')
-rw-r--r-- | llvm/lib/CodeGen/IntrinsicLowering.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/IntrinsicLowering.cpp b/llvm/lib/CodeGen/IntrinsicLowering.cpp index 2962f870162..afd24067ace 100644 --- a/llvm/lib/CodeGen/IntrinsicLowering.cpp +++ b/llvm/lib/CodeGen/IntrinsicLowering.cpp @@ -436,8 +436,14 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) { errs() << "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()))); + CI->replaceAllUsesWith( + ConstantPointerNull::get(cast<PointerType>(CI->getType()))); + break; + case Intrinsic::addressofreturnaddress: + errs() << "WARNING: this target does not support the " + "llvm.addressofreturnaddress intrinsic.\n"; + CI->replaceAllUsesWith( + ConstantPointerNull::get(cast<PointerType>(CI->getType()))); break; case Intrinsic::prefetch: |