]> granicus.if.org Git - clang/commitdiff
Explicitly use setVolatile instead of extra IRBuilder argument.
authorDaniel Dunbar <daniel@zuster.org>
Sun, 29 Nov 2009 21:11:47 +0000 (21:11 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sun, 29 Nov 2009 21:11:47 +0000 (21:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90095 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGBuiltin.cpp

index 399b8733e720ca5f013a52af3424295d052afcd2..3e22e36237afcc5c41335f7c1ff1277aa1579860 100644 (file)
@@ -530,7 +530,9 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
     Value *Ptr = EmitScalarExpr(E->getArg(0));
     const llvm::Type *ElTy =
       cast<llvm::PointerType>(Ptr->getType())->getElementType();
-    Builder.CreateStore(llvm::Constant::getNullValue(ElTy), Ptr, true);
+    llvm::StoreInst *Store = 
+      Builder.CreateStore(llvm::Constant::getNullValue(ElTy), Ptr);
+    Store->setVolatile(true);
     return RValue::get(0);
   }