Revamp the "ConstantStruct::get" methods. Previously, these were scattered
authorChris Lattner <sabre@nondot.org>
Mon, 20 Jun 2011 04:01:31 +0000 (04:01 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 20 Jun 2011 04:01:31 +0000 (04:01 +0000)
commitb065b06c12dba6001b8140df2744d0c856ef6ea1
treef5acc3cd50c70497e3cfd6490de4f33190acd81e
parent5d6fa7f2ac10f5494d3645abfc91a9045b70c802
Revamp the "ConstantStruct::get" methods.  Previously, these were scattered
all over the place in different styles and variants.  Standardize on two
preferred entrypoints: one that takes a StructType and ArrayRef, and one that
takes StructType and varargs.

In cases where there isn't a struct type convenient, we now add a
ConstantStruct::getAnon method (whose name will make more sense after a few
more patches land).

It would be "really really nice" if the ConstantStruct::get and
ConstantVector::get methods didn't make temporary std::vectors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133412 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
include/llvm/Constants.h
lib/Analysis/ConstantFolding.cpp
lib/AsmParser/LLParser.cpp
lib/Bitcode/Reader/BitcodeReader.cpp
lib/CodeGen/ShadowStackGC.cpp
lib/Transforms/IPO/GlobalOpt.cpp
lib/Transforms/InstCombine/InstCombineCalls.cpp
lib/Transforms/Instrumentation/ProfilingUtils.cpp
lib/VMCore/ConstantFold.cpp
lib/VMCore/Constants.cpp
lib/VMCore/Core.cpp
tools/bugpoint/ExtractFunction.cpp
unittests/VMCore/DerivedTypesTest.cpp