Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit 3ae9cf5

Browse files
committed
Revert r141079: tblgen: add preprocessor as a separate mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141492 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent f855795 commit 3ae9cf5

File tree

4 files changed

+0
-680
lines changed

4 files changed

+0
-680
lines changed

lib/TableGen/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ add_llvm_library(LLVMTableGen
99
TableGenBackend.cpp
1010
TGLexer.cpp
1111
TGParser.cpp
12-
TGPreprocessor.cpp
1312
)
1413

1514
add_llvm_library_dependencies(LLVMTableGen

lib/TableGen/Main.cpp

-23
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
//===----------------------------------------------------------------------===//
1717

1818
#include "TGParser.h"
19-
#include "TGPreprocessor.h"
2019
#include "llvm/ADT/OwningPtr.h"
2120
#include "llvm/Support/CommandLine.h"
2221
#include "llvm/Support/MemoryBuffer.h"
@@ -44,12 +43,6 @@ namespace {
4443
cl::list<std::string>
4544
IncludeDirs("I", cl::desc("Directory of include files"),
4645
cl::value_desc("directory"), cl::Prefix);
47-
48-
cl::opt<bool>
49-
PreprocessOnly("E",
50-
cl::desc("Stop after the preprocessing stage; "
51-
"This is work in progress and has no effect yet"),
52-
cl::init(false));
5346
}
5447

5548
namespace llvm {
@@ -74,22 +67,6 @@ int TableGenMain(char *argv0, TableGenAction &Action) {
7467
// it later.
7568
SrcMgr.setIncludeDirs(IncludeDirs);
7669

77-
// TODO(clchiou): Integrate preprocessor into TGParser
78-
if (PreprocessOnly) {
79-
std::string Error;
80-
tool_output_file Out(OutputFilename.c_str(), Error);
81-
if (!Error.empty()) {
82-
errs() << argv0 << ": error opening " << OutputFilename
83-
<< ":" << Error << "\n";
84-
return 1;
85-
}
86-
TGPreprocessor Preprocessor(SrcMgr, Out);
87-
if (Preprocessor.PreprocessFile())
88-
return 1;
89-
Out.keep();
90-
return 0;
91-
}
92-
9370
TGParser Parser(SrcMgr, Records);
9471

9572
if (Parser.ParseFile())

0 commit comments

Comments
 (0)