[llvm] r188871 - MC CFG: Add a getter for MCDataAtom's data array.
Ahmed Bougacha
ahmed.bougacha at gmail.com
Wed Aug 21 00:27:41 PDT 2013
Author: ab
Date: Wed Aug 21 02:27:40 2013
New Revision: 188871
URL: http://llvm.org/viewvc/llvm-project?rev=188871&view=rev
Log:
MC CFG: Add a getter for MCDataAtom's data array.
While there, switch to new-style documentation.
Modified:
llvm/trunk/include/llvm/MC/MCAtom.h
Modified: llvm/trunk/include/llvm/MC/MCAtom.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAtom.h?rev=188871&r1=188870&r2=188871&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCAtom.h (original)
+++ llvm/trunk/include/llvm/MC/MCAtom.h Wed Aug 21 02:27:40 2013
@@ -16,6 +16,7 @@
#ifndef LLVM_MC_MCATOM_H
#define LLVM_MC_MCATOM_H
+#include "llvm/ADT/ArrayRef.h"
#include "llvm/MC/MCInst.h"
#include "llvm/Support/DataTypes.h"
#include <vector>
@@ -28,7 +29,7 @@ class MCAtom;
class MCTextAtom;
class MCDataAtom;
-/// MCAtom - Represents a contiguous range of either instructions (a TextAtom)
+/// \brief Represents a contiguous range of either instructions (a TextAtom)
/// or data (a DataAtom). Address ranges are expressed as _closed_ intervals.
class MCAtom {
public:
@@ -172,6 +173,9 @@ public:
/// Append a data entry, expanding the atom if necessary.
void addData(const MCData &D);
+ /// Get a reference to the data in this atom.
+ ArrayRef<MCData> getData() const { return Data; }
+
/// \name Atom type specific split/truncate logic.
/// @{
MCDataAtom *split(uint64_t SplitPt) LLVM_OVERRIDE;
More information about the llvm-commits
mailing list