Commit 3da47749 authored by Reid Kleckner's avatar Reid Kleckner
Browse files

[IR] Move CallBase::getOperandBundlesAsDefs out of line, NFC

Copying operand bundles doesn't need to be inlined, and this template
instantiation shows up in ClangBuildAnalyzer.
parent 38fd1806
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -1876,10 +1876,7 @@ public:
  /// OperandBundleUser to a vector of OperandBundleDefs.  Note:
  /// OperandBundeUses and OperandBundleDefs are non-trivially *different*
  /// representations of operand bundles (see documentation above).
  void getOperandBundlesAsDefs(SmallVectorImpl<OperandBundleDef> &Defs) const {
    for (unsigned i = 0, e = getNumOperandBundles(); i != e; ++i)
      Defs.emplace_back(getOperandBundleAt(i));
  }
  void getOperandBundlesAsDefs(SmallVectorImpl<OperandBundleDef> &Defs) const;

  /// Return the operand bundle for the operand at index OpIdx.
  ///
+6 −0
Original line number Diff line number Diff line
@@ -352,6 +352,12 @@ bool CallBase::hasFnAttrOnCalledFunction(StringRef Kind) const {
  return false;
}

void CallBase::getOperandBundlesAsDefs(
    SmallVectorImpl<OperandBundleDef> &Defs) const {
  for (unsigned i = 0, e = getNumOperandBundles(); i != e; ++i)
    Defs.emplace_back(getOperandBundleAt(i));
}

CallBase::op_iterator
CallBase::populateBundleOperandInfos(ArrayRef<OperandBundleDef> Bundles,
                                     const unsigned BeginIndex) {