summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/cpp11-migrate/tool/Cpp11Migrate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/cpp11-migrate/tool/Cpp11Migrate.cpp')
-rw-r--r--clang-tools-extra/cpp11-migrate/tool/Cpp11Migrate.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang-tools-extra/cpp11-migrate/tool/Cpp11Migrate.cpp b/clang-tools-extra/cpp11-migrate/tool/Cpp11Migrate.cpp
index 26c2ac4bfa2..15f5aa12f5c 100644
--- a/clang-tools-extra/cpp11-migrate/tool/Cpp11Migrate.cpp
+++ b/clang-tools-extra/cpp11-migrate/tool/Cpp11Migrate.cpp
@@ -179,6 +179,19 @@ int main(int argc, const char **argv) {
llvm::raw_fd_ostream FileStream(I->first.c_str(), ErrorInfo,
llvm::raw_fd_ostream::F_Binary);
FileStream << I->second.MainFileOverride;
+
+ // FIXME: The Migrator shouldn't be responsible for writing headers
+ // to disk. Instead, it should write replacement info and another tool
+ // should take all replacement info for a header from possibly many other
+ // migration processes and merge it into a final form. For now, the
+ // updated header is written to disk for testing purposes.
+ for (HeaderOverrides::const_iterator HeaderI = I->second.Headers.begin(),
+ HeaderE = I->second.Headers.end();
+ HeaderI != HeaderE; ++HeaderI) {
+ llvm::raw_fd_ostream HeaderStream(I->first.c_str(), ErrorInfo,
+ llvm::raw_fd_ostream::F_Binary);
+ HeaderStream << HeaderI->second.FileOverride;
+ }
}
// Report execution times.
OpenPOWER on IntegriCloud