moved PtxString to Globals

This commit is contained in:
Evghenii
2013-10-30 21:05:22 +01:00
parent f9ec1a0097
commit 8db3d25844
2 changed files with 5 additions and 4 deletions

View File

@@ -2325,7 +2325,7 @@ Module::CompileAndOutput(const char *srcFile,
++suffix_orig;
assert(suffix_orig!=NULL);
std::string PtxString;
g->PtxString = std::string();
for (int itarget = 0; itarget < 2; itarget++)
{
@@ -2378,7 +2378,7 @@ Module::CompileAndOutput(const char *srcFile,
pm.add(new llvm::DataLayout(*g->target->getDataLayout()));
#endif
llvm::raw_string_ostream rso(PtxString);
llvm::raw_string_ostream rso(g->PtxString);
llvm::formatted_raw_ostream fos(rso);
llvm::TargetMachine::CodeGenFileType fileType = llvm::TargetMachine::CGFT_AssemblyFile;
@@ -2391,9 +2391,9 @@ Module::CompileAndOutput(const char *srcFile,
llvm::Module *module = m->module;
pm.run(*module);
fos.flush();
assert(!PtxString.empty());
assert(!g->PtxString.empty());
#if 0
std::cout << PtxString << std::endl;
std::cout << g->PtxString << std::endl;
#endif
}