diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
index 94d2299..9129558 100644
--- a/lib/AST/ExprConstant.cpp
+++ b/lib/AST/ExprConstant.cpp
@@ -873,6 +873,36 @@
   switch (E->isBuiltinCall(Info.Ctx)) {
   default:
     return Error(E->getLocStart(), diag::note_invalid_subexpr_in_ice, E);
+
+  case Builtin::BI__builtin_object_size: {
+    llvm::APSInt Result(32);
+    
+    if (!E->getArg(1)->isIntegerConstantExpr(Result, Info.Ctx))
+      assert(0 && "arg2 not ice in __builtin_object_size");
+
+    const Expr *Arg = E->getArg(0)->IgnoreParens();
+    Expr::EvalResult Base;
+    if (Arg->Evaluate(Base, Info.Ctx)
+        && Base.Val.getKind() == APValue::LValue
+        && !Base.HasSideEffects)
+      if (const Expr *LVBase = Base.Val.getLValueBase())
+        if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(LVBase)) {
+          if (const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl())) {
+            uint64_t Size = Info.Ctx.getTypeSize(VD->getType()) / 8;
+            Size -= Base.Val.getLValueOffset();
+            return Success(Size, E);
+          }
+        }
+
+    if (Base.HasSideEffects) {
+      if (Result.getSExtValue() < 2)
+        return Success(-1, E);
+      return Success(0, E);
+    }
+    
+    return Error(E->getLocStart(), diag::note_invalid_subexpr_in_ice, E);
+  }
+
   case Builtin::BI__builtin_classify_type:
     return Success(EvaluateBuiltinClassifyType(E), E);
 
