From 77b1330ece6ea40b3b7700fe13e2ca64bd494203 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 5 Jan 2004 05:36:30 +0000 Subject: Add VMCore and code generator support for debugging intrinsics. By default code generators completely ignore them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10691 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/IntrinsicLowering.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/CodeGen/IntrinsicLowering.cpp') diff --git a/lib/CodeGen/IntrinsicLowering.cpp b/lib/CodeGen/IntrinsicLowering.cpp index 4815be9f28..52faefdf39 100644 --- a/lib/CodeGen/IntrinsicLowering.cpp +++ b/lib/CodeGen/IntrinsicLowering.cpp @@ -48,6 +48,14 @@ void DefaultIntrinsicLowering::LowerIntrinsicCall(CallInst *CI) { // Insert the call to abort new CallInst(M->getOrInsertFunction("abort", Type::VoidTy, 0), "", CI); break; + + case Intrinsic::dbg_stoppoint: + case Intrinsic::dbg_region_start: + case Intrinsic::dbg_region_end: + case Intrinsic::dbg_func_start: + if (CI->getType() != Type::VoidTy) + CI->replaceAllUsesWith(Constant::getNullValue(CI->getType())); + break; // Simply strip out debugging intrinsics } assert(CI->use_empty() && -- cgit v1.2.3-18-g5258