[llvm-commits] [llvm] r111826 - in /llvm/trunk: tools/llvmc/examples/Hello/Makefile utils/TableGen/LLVMCConfigurationEmitter.cpp
Mikhail Glushenkov
foldr at codedgers.com
Mon Aug 23 12:24:01 PDT 2010
Author: foldr
Date: Mon Aug 23 14:24:00 2010
New Revision: 111826
URL: http://llvm.org/viewvc/llvm-project?rev=111826&view=rev
Log:
llvmc: Do not mention plugins in the code.
Modified:
llvm/trunk/tools/llvmc/examples/Hello/Makefile
llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp
Modified: llvm/trunk/tools/llvmc/examples/Hello/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/examples/Hello/Makefile?rev=111826&r1=111825&r2=111826&view=diff
==============================================================================
--- llvm/trunk/tools/llvmc/examples/Hello/Makefile (original)
+++ llvm/trunk/tools/llvmc/examples/Hello/Makefile Mon Aug 23 14:24:00 2010
@@ -1,4 +1,4 @@
-##===- tools/llvmc/plugins/Hello/Makefile ------------------*- Makefile -*-===##
+##===- tools/llvmc/examples/Hello/Makefile -----------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
Modified: llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp?rev=111826&r1=111825&r2=111826&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/LLVMCConfigurationEmitter.cpp Mon Aug 23 14:24:00 2010
@@ -1094,9 +1094,7 @@
}
/// TypecheckGraph - Check that names for output and input languages
-/// on all edges do match. This doesn't do much when the information
-/// about the whole graph is not available (i.e. when compiling most
-/// plugins).
+/// on all edges do match.
void TypecheckGraph (const RecordVector& EdgeVector,
const ToolDescriptions& ToolDescs) {
StringMap<StringSet<> > ToolToInLang;
@@ -2628,9 +2626,7 @@
// TODO: change this to getAllDerivedDefinitions.
const Record* LangMapRecord = Records.getDef("LanguageMap");
- // It is allowed for a plugin to have no language map.
if (LangMapRecord) {
-
ListInit* LangsToSuffixesList = LangMapRecord->getValueAsListInit("map");
if (!LangsToSuffixesList)
throw "Error in the language map definition!";
@@ -2964,12 +2960,12 @@
}
-/// PluginData - Holds all information about a plugin.
-struct PluginData {
+/// DriverData - Holds all information about the driver.
+struct DriverData {
OptionDescriptions OptDescs;
- bool HasSink;
ToolDescriptions ToolDescs;
RecordVector Edges;
+ bool HasSink;
};
/// HasSink - Go through the list of tool descriptions and check if
@@ -2983,9 +2979,9 @@
return false;
}
-/// CollectPluginData - Collect compilation graph edges, tool properties and
+/// CollectDriverData - Collect compilation graph edges, tool properties and
/// option properties from the parse tree.
-void CollectPluginData (const RecordKeeper& Records, PluginData& Data) {
+void CollectDriverData (const RecordKeeper& Records, DriverData& Data) {
// Collect option properties.
const RecordVector& OptionLists =
Records.getAllDerivedDefinitions("OptionList");
@@ -3004,8 +3000,8 @@
Data.Edges);
}
-/// CheckPluginData - Perform some sanity checks on the collected data.
-void CheckPluginData(PluginData& Data) {
+/// CheckDriverData - Perform some sanity checks on the collected data.
+void CheckDriverData(DriverData& Data) {
// Filter out all tools not mentioned in the compilation graph.
FilterNotInGraph(Data.Edges, Data.ToolDescs);
@@ -3017,7 +3013,7 @@
CheckForSuperfluousOptions(Data.Edges, Data.ToolDescs, Data.OptDescs);
}
-void EmitPluginCode(const PluginData& Data, raw_ostream& O) {
+void EmitDriverCode(const DriverData& Data, raw_ostream& O) {
// Emit file header.
EmitIncludes(O);
@@ -3072,13 +3068,13 @@
/// run - The back-end entry point.
void LLVMCConfigurationEmitter::run (raw_ostream &O) {
try {
- PluginData Data;
+ DriverData Data;
- CollectPluginData(Records, Data);
- CheckPluginData(Data);
+ CollectDriverData(Records, Data);
+ CheckDriverData(Data);
- this->EmitSourceFileHeader("LLVMC Configuration Library", O);
- EmitPluginCode(Data, O);
+ this->EmitSourceFileHeader("llvmc-based driver: auto-generated code", O);
+ EmitDriverCode(Data, O);
} catch (std::exception& Error) {
throw Error.what() + std::string(" - usually this means a syntax error.");
More information about the llvm-commits
mailing list