Adjust for LLVM name tweaks requested by Chandler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154824 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan Sands 2012-04-16 16:29:47 +00:00
Родитель 62d9f110b8
Коммит 60c77079d4
2 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -910,7 +910,7 @@ llvm::MDNode *CodeGenFunction::getRangeForLoadFromType(QualType Ty) {
}
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 @@ void CodeGenFunction::SetFPAccuracy(llvm::Value *Val, float Accuracy) {
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);
}

Просмотреть файл

@ -40,7 +40,7 @@ llvm::MDNode *CodeGenTBAA::getRoot() {
// (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 @@ llvm::MDNode *CodeGenTBAA::getChar() {
// 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 @@ CodeGenTBAA::getTBAAInfo(QualType QTy) {
// "underlying types".
default:
return MetadataCache[Ty] =
MDHelper.CreateTBAANode(BTy->getName(Features), getChar());
MDHelper.createTBAANode(BTy->getName(Features), getChar());
}
}
@ -123,7 +123,7 @@ CodeGenTBAA::getTBAAInfo(QualType QTy) {
// 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 @@ CodeGenTBAA::getTBAAInfo(QualType QTy) {
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 @@ CodeGenTBAA::getTBAAInfo(QualType QTy) {
}
llvm::MDNode *CodeGenTBAA::getTBAAInfoForVTablePtr() {
return MDHelper.CreateTBAANode("vtable pointer", getRoot());
return MDHelper.createTBAANode("vtable pointer", getRoot());
}