From d2cc5fb97178c80c82526d64c25a75f39d1d7e73 Mon Sep 17 00:00:00 2001 From: Mikhail Glushenkov Date: Fri, 13 Aug 2010 02:29:24 +0000 Subject: [PATCH] llvmc: fix two tests, remove XFAILs. Tested on Linux and Darwin; please add platform-specific XFAILs/mail me a bug report if this still fails. llvm-svn: 110998 --- llvm/test/LLVMC/MultiplePluginPriorities.td | 4 ---- llvm/test/LLVMC/OutputSuffixHook.td | 3 +-- llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp | 7 ++++--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/llvm/test/LLVMC/MultiplePluginPriorities.td b/llvm/test/LLVMC/MultiplePluginPriorities.td index 2fe06450eecb..f1086418f199 100644 --- a/llvm/test/LLVMC/MultiplePluginPriorities.td +++ b/llvm/test/LLVMC/MultiplePluginPriorities.td @@ -4,10 +4,6 @@ // Disable for Darwin PPC: // XFAIL: powerpc-apple-darwin -// Generally XFAIL'ed for now, this is (sometimes?) failing on x86_64-apple-darwin10. -// RUN: false -// XFAIL: * - include "llvm/CompilerDriver/Common.td" def Graph : CompilationGraph<[]>; diff --git a/llvm/test/LLVMC/OutputSuffixHook.td b/llvm/test/LLVMC/OutputSuffixHook.td index 4ecad2360ba0..39c8a8ae8846 100644 --- a/llvm/test/LLVMC/OutputSuffixHook.td +++ b/llvm/test/LLVMC/OutputSuffixHook.td @@ -2,7 +2,6 @@ // RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t // RUN: FileCheck -input-file %t %s // RUN: %compile_cxx -fexceptions -x c++ %t -// XFAIL: * include "llvm/CompilerDriver/Common.td" @@ -13,7 +12,7 @@ def OptList : OptionList<[ ]>; def dummy_tool : Tool<[ -(cmd_line "dummy_cmd $INFILE"), +(command "dummy_cmd"), (in_language "dummy_lang"), (out_language "dummy_lang"), (actions (case diff --git a/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp b/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp index d4624e26ccd8..7a68d696f921 100644 --- a/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp +++ b/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp @@ -2177,8 +2177,8 @@ void EmitGenerateActionMethodHeader(const ToolDescription& D, << "std::vector > vec;\n"; O.indent(Indent2) << "bool stop_compilation = !HasChildren;\n"; O.indent(Indent2) << "bool no_out_file = false;\n"; - O.indent(Indent2) << "const char* output_suffix = \"" - << D.OutputSuffix << "\";\n"; + O.indent(Indent2) << "std::string output_suffix(\"" + << D.OutputSuffix << "\");\n"; } } @@ -2235,7 +2235,8 @@ void EmitGenerateActionMethod (const ToolDescription& D, O.indent(Indent3) << "out_file = this->OutFilename(" << (IsJoin ? "sys::Path(),\n" : "inFile,\n"); - O.indent(Indent4) << "TempDir, stop_compilation, output_suffix).str();\n\n"; + O.indent(Indent4) << + "TempDir, stop_compilation, output_suffix.c_str()).str();\n\n"; O.indent(Indent3) << "vec.push_back(std::make_pair(65536, out_file));\n"; O.indent(Indent2) << "}\n\n";