diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-09-21 03:09:59 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-09-21 03:09:59 +0000 | 
| commit | bf20638966e205e6dc18451275e5c51264f255e6 (patch) | |
| tree | a1d94b0ca15cafbafdea10ae405e6b0fd8648cf9 /clang/lib/CodeGen/CGBuiltin.cpp | |
| parent | 26e37a77c6bc36d219aacd9edec9247df8725c3d (diff) | |
| download | bcm5719-llvm-bf20638966e205e6dc18451275e5c51264f255e6.tar.gz bcm5719-llvm-bf20638966e205e6dc18451275e5c51264f255e6.zip | |
Implement __builtin_unreachable(), a GCC 4.5 extension.
llvm-svn: 82433
Diffstat (limited to 'clang/lib/CodeGen/CGBuiltin.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGBuiltin.cpp | 7 | 
1 files changed, 6 insertions, 1 deletions
| diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index e049cc890d7..ffc8ea7daaf 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -224,7 +224,12 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,      Value *F = CGM.getIntrinsic(Intrinsic::trap, 0, 0);      return RValue::get(Builder.CreateCall(F));    } - +  case Builtin::BI__builtin_unreachable: { +    Value *V = Builder.CreateUnreachable(); +    Builder.ClearInsertionPoint(); +    return RValue::get(V); +  } +          case Builtin::BI__builtin_powi:    case Builtin::BI__builtin_powif:    case Builtin::BI__builtin_powil: { | 

