diff options
author | Youngsuk Kim <youngsuk.kim@hpe.com> | 2024-09-19 13:36:53 -0500 |
---|---|---|
committer | Youngsuk Kim <youngsuk.kim@hpe.com> | 2024-09-19 14:56:45 -0500 |
commit | ac664697c54cf2ffa9ebef0215f734bcca3b718f (patch) | |
tree | e51c26852b32915c90c3f4ebf399827f8b45324d /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 434c9c50f99b1ad4e551c64af93287869389b087 (diff) | |
download | llvm-ac664697c54cf2ffa9ebef0215f734bcca3b718f.zip llvm-ac664697c54cf2ffa9ebef0215f734bcca3b718f.tar.gz llvm-ac664697c54cf2ffa9ebef0215f734bcca3b718f.tar.bz2 |
[clang] Tidy uses of raw_string_ostream (NFC)
As specified in the docs,
1) raw_string_ostream is always unbuffered and
2) the underlying buffer may be used directly
( 65b13610a5226b84889b923bae884ba395ad084d for further reference )
* Don't call raw_string_ostream::flush(), which is essentially a no-op.
* Avoid unneeded calls to raw_string_ostream::str(), to avoid excess indirection.
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 5a27347..5f2a963 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -1383,7 +1383,6 @@ static bool compileModule(CompilerInstance &ImportingInstance, std::string InferredModuleMapContent; llvm::raw_string_ostream OS(InferredModuleMapContent); Module->print(OS); - OS.flush(); Result = compileModuleImpl( ImportingInstance, ImportLoc, Module->getTopLevelModuleName(), |