r348032 - Revert r348029. I was git-ing and jumped the gun.

Bill Wendling via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 30 12:44:11 PST 2018


Author: void
Date: Fri Nov 30 12:44:11 2018
New Revision: 348032

URL: http://llvm.org/viewvc/llvm-project?rev=348032&view=rev
Log:
Revert r348029. I was git-ing and jumped the gun.

Modified:
    cfe/trunk/lib/CodeGen/CGExprConstant.cpp
    cfe/trunk/test/CodeGen/builtin-constant-p.c

Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprConstant.cpp?rev=348032&r1=348031&r2=348032&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprConstant.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprConstant.cpp Fri Nov 30 12:44:11 2018
@@ -1552,8 +1552,7 @@ llvm::Constant *ConstantEmitter::tryEmit
   if (destType->isReferenceType())
     Success = E->EvaluateAsLValue(Result, CGM.getContext());
   else
-    Success = E->EvaluateAsRValue(Result, CGM.getContext(),
-                                  /* InConstantContext */ true);
+    Success = E->EvaluateAsRValue(Result, CGM.getContext());
 
   llvm::Constant *C;
   if (Success && !Result.HasSideEffects)

Modified: cfe/trunk/test/CodeGen/builtin-constant-p.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/builtin-constant-p.c?rev=348032&r1=348031&r2=348032&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/builtin-constant-p.c (original)
+++ cfe/trunk/test/CodeGen/builtin-constant-p.c Fri Nov 30 12:44:11 2018
@@ -157,14 +157,3 @@ static void src_fn(void) {
 void test14() {
   assign(dest_p, src_fn);
 }
-
-struct test15_s {
-  const char *name;
-  int num_args;
-};
-
-extern int test15_v;
-
-struct test15_s tcg_op_defs_org_x86_64[] = {
-    {"tag", __builtin_constant_p(test15_v) && !test15_v ? 0x10 : 0 },
-};




More information about the cfe-commits mailing list