virtual Action GenerateAction (llvm::sys::Path const& inFile,
llvm::sys::Path const& outFile) const = 0;
virtual Action GenerateAction (llvm::sys::Path const& inFile,
llvm::sys::Path const& outFile) const = 0;
- virtual std::string Name() const = 0;
- virtual std::string InputLanguage() const = 0;
- virtual std::string OutputLanguage() const = 0;
- virtual std::string OutputSuffix() const = 0;
+ virtual const char* Name() const = 0;
+ virtual const char* InputLanguage() const = 0;
+ virtual const char* OutputLanguage() const = 0;
+ virtual const char* OutputSuffix() const = 0;
virtual bool IsLast() const = 0;
virtual bool IsJoin() const = 0;
virtual bool IsLast() const = 0;
virtual bool IsJoin() const = 0;
// Emit static [Input,Output]Language() methods for Tool classes
void EmitInOutLanguageMethods (const ToolProperties& P, std::ostream& O) {
// Emit static [Input,Output]Language() methods for Tool classes
void EmitInOutLanguageMethods (const ToolProperties& P, std::ostream& O) {
- O << Indent1 << "std::string InputLanguage() const {\n"
+ O << Indent1 << "const char* InputLanguage() const {\n"
<< Indent2 << "return \"" << P.InLanguage << "\";\n"
<< Indent1 << "}\n\n";
<< Indent2 << "return \"" << P.InLanguage << "\";\n"
<< Indent1 << "}\n\n";
- O << Indent1 << "std::string OutputLanguage() const {\n"
+ O << Indent1 << "const char* OutputLanguage() const {\n"
<< Indent2 << "return \"" << P.OutLanguage << "\";\n"
<< Indent1 << "}\n\n";
}
// Emit static [Input,Output]Language() methods for Tool classes
void EmitOutputSuffixMethod (const ToolProperties& P, std::ostream& O) {
<< Indent2 << "return \"" << P.OutLanguage << "\";\n"
<< Indent1 << "}\n\n";
}
// Emit static [Input,Output]Language() methods for Tool classes
void EmitOutputSuffixMethod (const ToolProperties& P, std::ostream& O) {
- O << Indent1 << "std::string OutputSuffix() const {\n"
+ O << Indent1 << "const char* OutputSuffix() const {\n"
<< Indent2 << "return \"" << P.OutputSuffix << "\";\n"
<< Indent1 << "}\n\n";
}
// Emit static Name() method for Tool classes
void EmitNameMethod (const ToolProperties& P, std::ostream& O) {
<< Indent2 << "return \"" << P.OutputSuffix << "\";\n"
<< Indent1 << "}\n\n";
}
// Emit static Name() method for Tool classes
void EmitNameMethod (const ToolProperties& P, std::ostream& O) {
- O << Indent1 << "std::string Name() const {\n"
+ O << Indent1 << "const char* Name() const {\n"
<< Indent2 << "return \"" << P.Name << "\";\n"
<< Indent1 << "}\n\n";
}
<< Indent2 << "return \"" << P.Name << "\";\n"
<< Indent1 << "}\n\n";
}