diff options
author | Mike Stump <mrs@apple.com> | 2009-11-09 22:40:09 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-11-09 22:40:09 +0000 |
commit | 3ada2df42673b41ac173c0c9a3a2cb482837a424 (patch) | |
tree | 662469dbd2e4c13e1f8451c9e076f5cc4ca61f5a /lib/CodeGen | |
parent | d288bafe2dbb7b43173950f23589b2586c537e02 (diff) |
Enable the use of the new llvm objectsize intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86607 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CGBuiltin.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp index c26921969a..ab4b3bf868 100644 --- a/lib/CodeGen/CGBuiltin.cpp +++ b/lib/CodeGen/CGBuiltin.cpp @@ -199,8 +199,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD, return RValue::get(Builder.CreateCall(F, ArgValue, "tmp")); } case Builtin::BI__builtin_object_size: { - // FIXME: We're awaiting the llvm intrincis. -#if 0 +#if 1 // We pass this builtin onto the optimizer so that it can // figure out the object size in more complex cases. const llvm::Type *ResType[] = { @@ -211,8 +210,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD, EmitScalarExpr(E->getArg(0)), EmitScalarExpr(E->getArg(1)))); #else - // FIXME: Implement. For now we just always fail and pretend we - // don't know the object size. + // FIXME: Remove after testing. llvm::APSInt TypeArg = E->getArg(1)->EvaluateAsInt(CGM.getContext()); const llvm::Type *ResType = ConvertType(E->getType()); // bool UseSubObject = TypeArg.getZExtValue() & 1; |