summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/IntrinsicLowering.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-12-28 08:30:20 +0000
committerChris Lattner <sabre@nondot.org>2003-12-28 08:30:20 +0000
commit24650d2b5ebf30102bd730e737392352af89528d (patch)
treefa7b9b8fe86278e168e12ff43c64b8ed5d8ed6b5 /llvm/lib/CodeGen/IntrinsicLowering.cpp
parent6e7d2fa79cdaea8227c99c90002d99dc71c31a58 (diff)
downloadbcm5719-llvm-24650d2b5ebf30102bd730e737392352af89528d.tar.gz
bcm5719-llvm-24650d2b5ebf30102bd730e737392352af89528d.zip
Move into the VMCore library
llvm-svn: 10623
Diffstat (limited to 'llvm/lib/CodeGen/IntrinsicLowering.cpp')
-rw-r--r--llvm/lib/CodeGen/IntrinsicLowering.cpp57
1 files changed, 0 insertions, 57 deletions
diff --git a/llvm/lib/CodeGen/IntrinsicLowering.cpp b/llvm/lib/CodeGen/IntrinsicLowering.cpp
deleted file mode 100644
index b7b67d25857..00000000000
--- a/llvm/lib/CodeGen/IntrinsicLowering.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-//===-- IntrinsicLowering.cpp - Intrinsic Lowering default implementation -===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file implements the default intrinsic lowering implementation.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/CodeGen/IntrinsicLowering.h"
-#include "llvm/Constant.h"
-#include "llvm/Intrinsics.h"
-#include "llvm/Module.h"
-#include "llvm/Type.h"
-#include "llvm/iOther.h"
-using namespace llvm;
-
-void DefaultIntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
- Function *Callee = CI->getCalledFunction();
- assert(Callee && "Cannot lower an indirect call!");
-
- Module *M = Callee->getParent();
-
- switch (Callee->getIntrinsicID()) {
- case Intrinsic::not_intrinsic:
- std::cerr << "Cannot lower a call to a non-intrinsic function '"
- << Callee->getName() << "'!\n";
- abort();
- default:
- std::cerr << "Error: Code generator does not support intrinsic function '"
- << Callee->getName() << "'!\n";
- abort();
-
- // The default implementation of setjmp/longjmp transforms setjmp into a
- // noop that always returns zero and longjmp into a call to abort. This
- // allows code that never longjmps to work correctly.
- case Intrinsic::setjmp:
- case Intrinsic::sigsetjmp:
- if (CI->getType() != Type::VoidTy)
- CI->replaceAllUsesWith(Constant::getNullValue(CI->getType()));
- break;
-
- case Intrinsic::longjmp:
- case Intrinsic::siglongjmp:
- // Insert the call to abort
- new CallInst(M->getOrInsertFunction("abort", Type::VoidTy, 0), "", CI);
- break;
- }
-
- assert(CI->use_empty() &&
- "Lowering should have eliminated any uses of the intrinsic call!");
- CI->getParent()->getInstList().erase(CI);
-}
OpenPOWER on IntegriCloud