Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/polly/lib
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2015-04-27 15:06:32 +0300
committerTobias Grosser <tobias@grosser.es>2015-04-27 15:06:32 +0300
commit4245372bee0af5f42296812562c64b144ca61fc2 (patch)
tree9fcaace68936e0fba6ac3eab89f0cea4a41b4f4e /polly/lib
parent1346663551d516f751f2fc43e5b25420cb500e67 (diff)
Fix PTXGenerator after raw_pwrite_stream has been introduced
Without this patch Polly with GPGPU support enabled did not compile any more. llvm-svn: 235868
Diffstat (limited to 'polly/lib')
-rw-r--r--polly/lib/CodeGen/PTXGenerator.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/polly/lib/CodeGen/PTXGenerator.cpp b/polly/lib/CodeGen/PTXGenerator.cpp
index e2432b5515f9..dc1339a3a2a4 100644
--- a/polly/lib/CodeGen/PTXGenerator.cpp
+++ b/polly/lib/CodeGen/PTXGenerator.cpp
@@ -19,6 +19,7 @@
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/ADT/SetVector.h"
+#include "llvm/ADT/SmallString.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Support/Debug.h"
@@ -566,19 +567,19 @@ static bool createASMAsString(Module *New, const StringRef &Triple,
PM.add(createTargetTransformInfoWrapperPass(Target.getTargetIRAnalysis()));
{
- raw_string_ostream NameROS(ASM);
- formatted_raw_ostream FOS(NameROS);
+ SmallString<100> ASMSmall;
+ raw_svector_ostream NameROSSmall(ASMSmall);
// Ask the target to add backend passes as necessary.
int UseVerifier = true;
- if (Target.addPassesToEmitFile(PM, FOS, TargetMachine::CGFT_AssemblyFile,
- UseVerifier)) {
+ if (Target.addPassesToEmitFile(
+ PM, NameROSSmall, TargetMachine::CGFT_AssemblyFile, UseVerifier)) {
errs() << "The target does not support generation of this file type!\n";
return false;
}
+ ASM = ASMSmall.c_str();
PM.run(*New);
- FOS.flush();
}
return true;