summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-07-11 20:22:55 +0000
committerReid Kleckner <reid@kleckner.net>2014-07-11 20:22:55 +0000
commited5d4adb36bf07481f16bfe46d055396eebb9d0c (patch)
tree007c89d0ca651dfd1f7feb1e919e23c4503ef3ce /clang/lib
parent10cd0f457a0b6d9b9fba0cd0286ee2b7c5065c45 (diff)
downloadbcm5719-llvm-ed5d4adb36bf07481f16bfe46d055396eebb9d0c.tar.gz
bcm5719-llvm-ed5d4adb36bf07481f16bfe46d055396eebb9d0c.zip
MS extension: Make __noop be the integer zero, not void
We still don't accept '__noop;', and we don't consider __noop to be the integer literal zero. More work is needed. llvm-svn: 212839
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGBuiltin.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index ded75c192ae..9d1ad673c20 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -1515,7 +1515,8 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
return EmitBuiltinNewDeleteCall(FD->getType()->castAs<FunctionProtoType>(),
E->getArg(0), true);
case Builtin::BI__noop:
- return RValue::get(nullptr);
+ // __noop always evaluates to an integer literal zero.
+ return RValue::get(ConstantInt::get(IntTy, 0));
case Builtin::BI_InterlockedExchange:
case Builtin::BI_InterlockedExchangePointer:
return EmitBinaryAtomic(*this, llvm::AtomicRMWInst::Xchg, E);
OpenPOWER on IntegriCloud