[llvm-commits] [llvm-gcc-4.2] r77348 - in /llvm-gcc-4.2/trunk/gcc: llvm-backend.cpp llvm-convert.cpp llvm-types.cpp
Owen Anderson
resistor at mac.com
Tue Jul 28 11:32:26 PDT 2009
Author: resistor
Date: Tue Jul 28 13:32:26 2009
New Revision: 77348
URL: http://llvm.org/viewvc/llvm-project?rev=77348&view=rev
Log:
Update for LLVM API change.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=77348&r1=77347&r2=77348&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Tue Jul 28 13:32:26 2009
@@ -813,7 +813,7 @@
StructInit[1] = TheFolder->CreateBitCast(Tors[i].first, FPTy);
InitList.push_back(ConstantStruct::get(StructInit, false));
}
- Constant *Array = Context.getConstantArray(
+ Constant *Array = ConstantArray::get(
Context.getArrayType(InitList[0]->getType(), InitList.size()), InitList);
new GlobalVariable(*TheModule, Array->getType(), false,
GlobalValue::AppendingLinkage,
@@ -850,7 +850,7 @@
}
ArrayType *AT = Context.getArrayType(SBP, AUGs.size());
- Constant *Init = Context.getConstantArray(AT, AUGs);
+ Constant *Init = ConstantArray::get(AT, AUGs);
GlobalValue *gv = new GlobalVariable(*TheModule, AT, false,
GlobalValue::AppendingLinkage, Init,
"llvm.used");
@@ -860,7 +860,7 @@
// Add llvm.global.annotations
if (!AttributeAnnotateGlobals.empty()) {
- Constant *Array = Context.getConstantArray(
+ Constant *Array = ConstantArray::get(
Context.getArrayType(AttributeAnnotateGlobals[0]->getType(),
AttributeAnnotateGlobals.size()),
AttributeAnnotateGlobals);
@@ -1093,7 +1093,7 @@
/// global if possible.
Constant* ConvertMetadataStringToGV(const char *str) {
- Constant *Init = getGlobalContext().getConstantArray(std::string(str));
+ Constant *Init = ConstantArray::get(std::string(str));
// Use cached string if it exists.
static std::map<Constant*, GlobalVariable*> StringCSTCache;
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=77348&r1=77347&r2=77348&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Tue Jul 28 13:32:26 2009
@@ -7117,7 +7117,7 @@
Elts.push_back(C);
}
}
- return Context.getConstantArray(StrTy, Elts);
+ return ConstantArray::get(StrTy, Elts);
}
Constant *TreeConstantToLLVM::ConvertCOMPLEX_CST(tree exp) {
@@ -7281,7 +7281,7 @@
// Zero length array.
if (ResultElts.empty())
- return Context.getConstantArray(
+ return ConstantArray::get(
cast<ArrayType>(ConvertType(TREE_TYPE(exp))), ResultElts);
assert(SomeVal && "If we had some initializer, we should have some value!");
@@ -7308,7 +7308,7 @@
}
if (AllEltsSameType)
- return Context.getConstantArray(
+ return ConstantArray::get(
Context.getArrayType(ElTy, ResultElts.size()), ResultElts);
return ConstantStruct::get(ResultElts, false);
}
Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-types.cpp?rev=77348&r1=77347&r2=77348&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-types.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Tue Jul 28 13:32:26 2009
@@ -188,7 +188,7 @@
}
const std::string &TypeName = TypeNameMap[*I];
- LTypesNames.push_back(Context.getConstantArray(TypeName, false));
+ LTypesNames.push_back(ConstantArray::get(TypeName, false));
}
// Create string table.
More information about the llvm-commits
mailing list