aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/MC/MCAssembler.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/MC/MCAssembler.h')
-rw-r--r--include/llvm/MC/MCAssembler.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h
index 2c8c602..0cf2b1d 100644
--- a/include/llvm/MC/MCAssembler.h
+++ b/include/llvm/MC/MCAssembler.h
@@ -19,6 +19,7 @@
#include "llvm/MC/MCInst.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/DataTypes.h"
+#include <algorithm>
#include <vector> // FIXME: Shouldn't be needed.
namespace mcld {
@@ -824,6 +825,9 @@ public:
typedef SymbolDataListType::const_iterator const_symbol_iterator;
typedef SymbolDataListType::iterator symbol_iterator;
+ typedef std::vector<std::string> FileNameVectorType;
+ typedef FileNameVectorType::const_iterator const_file_name_iterator;
+
typedef std::vector<IndirectSymbolData>::const_iterator
const_indirect_symbol_iterator;
typedef std::vector<IndirectSymbolData>::iterator indirect_symbol_iterator;
@@ -867,6 +871,9 @@ private:
/// The list of linker options to propagate into the object file.
std::vector<std::vector<std::string> > LinkerOptions;
+ /// List of declared file names
+ FileNameVectorType FileNames;
+
/// The set of function symbols for which a .thumb_func directive has
/// been seen.
//
@@ -1162,6 +1169,20 @@ public:
return *Entry;
}
+ const_file_name_iterator file_names_begin() const {
+ return FileNames.begin();
+ }
+
+ const_file_name_iterator file_names_end() const {
+ return FileNames.end();
+ }
+
+ void addFileName(StringRef FileName) {
+ if (std::find(file_names_begin(), file_names_end(), FileName) ==
+ file_names_end())
+ FileNames.push_back(FileName);
+ }
+
/// @}
void dump();