summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/ConstantBuilder.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/ConstantBuilder.h')
-rw-r--r--clang/lib/CodeGen/ConstantBuilder.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/ConstantBuilder.h b/clang/lib/CodeGen/ConstantBuilder.h
index 727023bf486..bedab3e2013 100644
--- a/clang/lib/CodeGen/ConstantBuilder.h
+++ b/clang/lib/CodeGen/ConstantBuilder.h
@@ -155,6 +155,13 @@ public:
add(llvm::ConstantExpr::getBitCast(value, type));
}
+ /// Add a bunch of new values to this initializer.
+ void addAll(ArrayRef<llvm::Constant *> values) {
+ assert(!Finished && "cannot add more values after finishing builder");
+ assert(!Frozen && "cannot add values while subbuilder is active");
+ Builder.Buffer.append(values.begin(), values.end());
+ }
+
/// An opaque class to hold the abstract position of a placeholder.
class PlaceholderPosition {
size_t Index;
OpenPOWER on IntegriCloud