[cfe-commits] r154824 - in /cfe/trunk/lib/CodeGen: CGExpr.cpp CodeGenTBAA.cpp

Duncan Sands baldrick at free.fr
Mon Apr 16 09:29:48 PDT 2012


Author: baldrick
Date: Mon Apr 16 11:29:47 2012
New Revision: 154824

URL: http://llvm.org/viewvc/llvm-project?rev=154824&view=rev
Log:
Adjust for LLVM name tweaks requested by Chandler.

Modified:
    cfe/trunk/lib/CodeGen/CGExpr.cpp
    cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp

Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=154824&r1=154823&r2=154824&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Mon Apr 16 11:29:47 2012
@@ -910,7 +910,7 @@
   }
 
   llvm::MDBuilder MDHelper(getLLVMContext());
-  return MDHelper.CreateRange(Min, End);
+  return MDHelper.createRange(Min, End);
 }
 
 llvm::Value *CodeGenFunction::EmitLoadOfScalar(llvm::Value *Addr, bool Volatile,
@@ -3166,8 +3166,8 @@
   if (Accuracy == 0.0 || !isa<llvm::Instruction>(Val))
     return;
 
-  llvm::Value *ULPs = llvm::ConstantFP::get(Builder.getFloatTy(), Accuracy);
-  llvm::MDNode *Node = llvm::MDNode::get(getLLVMContext(), ULPs);
+  llvm::MDBuilder MDHelper(getLLVMContext());
+  llvm::MDNode *Node = MDHelper.createFPMath(Accuracy);
 
   cast<llvm::Instruction>(Val)->setMetadata(llvm::LLVMContext::MD_fpmath, Node);
 }

Modified: cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp?rev=154824&r1=154823&r2=154824&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp Mon Apr 16 11:29:47 2012
@@ -40,7 +40,7 @@
   // (or a different version of this front-end), their TBAA trees will
   // remain distinct, and the optimizer will treat them conservatively.
   if (!Root)
-    Root = MDHelper.CreateTBAARoot("Simple C/C++ TBAA");
+    Root = MDHelper.createTBAARoot("Simple C/C++ TBAA");
 
   return Root;
 }
@@ -51,7 +51,7 @@
   // these special powers only cover user-accessible memory, and doesn't
   // include things like vtables.
   if (!Char)
-    Char = MDHelper.CreateTBAANode("omnipotent char", getRoot());
+    Char = MDHelper.createTBAANode("omnipotent char", getRoot());
 
   return Char;
 }
@@ -115,7 +115,7 @@
     // "underlying types".
     default:
       return MetadataCache[Ty] =
-        MDHelper.CreateTBAANode(BTy->getName(Features), getChar());
+        MDHelper.createTBAANode(BTy->getName(Features), getChar());
     }
   }
 
@@ -123,7 +123,7 @@
   // TODO: Implement C++'s type "similarity" and consider dis-"similar"
   // pointers distinct.
   if (Ty->isPointerType())
-    return MetadataCache[Ty] = MDHelper.CreateTBAANode("any pointer",
+    return MetadataCache[Ty] = MDHelper.createTBAANode("any pointer",
                                                        getChar());
 
   // Enum types are distinct types. In C++ they have "underlying types",
@@ -151,7 +151,7 @@
     llvm::raw_svector_ostream Out(OutName);
     MContext.mangleCXXRTTIName(QualType(ETy, 0), Out);
     Out.flush();
-    return MetadataCache[Ty] = MDHelper.CreateTBAANode(OutName, getChar());
+    return MetadataCache[Ty] = MDHelper.createTBAANode(OutName, getChar());
   }
 
   // For now, handle any other kind of type conservatively.
@@ -159,5 +159,5 @@
 }
 
 llvm::MDNode *CodeGenTBAA::getTBAAInfoForVTablePtr() {
-  return MDHelper.CreateTBAANode("vtable pointer", getRoot());
+  return MDHelper.createTBAANode("vtable pointer", getRoot());
 }





More information about the cfe-commits mailing list