summaryrefslogtreecommitdiff
path: root/include/mcld/Script/FileToken.h
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2014-02-14 18:00:16 -0800
committerStephen Hines <srhines@google.com>2014-02-19 16:29:27 -0800
commit87f34658dec9097d987d254a990ea7f311bfc95f (patch)
treeaaf3301283eddb3884dd21317f5861e66c4b7aad /include/mcld/Script/FileToken.h
parentb3ee01ade7820351a29904d942b73ce83340f4f8 (diff)
downloadmclinker-87f34658dec9097d987d254a990ea7f311bfc95f.tar.gz
Update MCLinker to work with LLVM 3.4.
This corresponds to merging upstream MCLinker with the following SHA: 6dcbf36cdb146d6f175ba2f18a9004753cafeaff Change-Id: I1bc8c2ce4accc563450bc71ee295a6e47a0c0469
Diffstat (limited to 'include/mcld/Script/FileToken.h')
-rw-r--r--include/mcld/Script/FileToken.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/include/mcld/Script/FileToken.h b/include/mcld/Script/FileToken.h
new file mode 100644
index 0000000..92faab4
--- /dev/null
+++ b/include/mcld/Script/FileToken.h
@@ -0,0 +1,50 @@
+//===- FileToken.h --------------------------------------------------------===//
+//
+// The MCLinker Project
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+#ifndef MCLD_SCRIPT_FILETOKEN_H
+#define MCLD_SCRIPT_FILETOKEN_H
+#ifdef ENABLE_UNITTEST
+#include <gtest.h>
+#endif
+
+#include <mcld/Script/InputToken.h>
+#include <mcld/Support/Allocators.h>
+#include <mcld/Config/Config.h>
+
+namespace mcld
+{
+
+/** \class FileToken
+ * \brief This class defines the interfaces to a filename in INPUT/GROUP
+ * command.
+ */
+
+class FileToken : public InputToken
+{
+private:
+ friend class Chunk<FileToken, MCLD_SYMBOLS_PER_INPUT>;
+ FileToken();
+ FileToken(const std::string& pName, bool pAsNeeded);
+
+public:
+ ~FileToken();
+
+ static bool classof(const InputToken* pToken)
+ {
+ return pToken->type() == InputToken::File;
+ }
+
+ /* factory method */
+ static FileToken* create(const std::string& pName, bool pAsNeeded);
+ static void destroy(FileToken*& pToken);
+ static void clear();
+};
+
+} // namepsace of mcld
+
+#endif